diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 0fd1ab3e7671..94591acf3da2 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -426,6 +426,21 @@ static void hdd_init_6ghz(struct hdd_context *hdd_ctx) struct ieee80211_channel *chlist = hdd_channels_6_ghz; uint32_t num = ARRAY_SIZE(hdd_channels_6_ghz); uint16_t base_freq; + QDF_STATUS status; + uint32_t band_capability; + + hdd_enter(); + + status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get MLME Band Capability"); + return; + } + + if (!(band_capability & (BIT(REG_BAND_6G)))) { + hdd_debug("6ghz band not enabled"); + return; + } qdf_mem_zero(chlist, sizeof(*chlist) * num); base_freq = wlan_reg_min_6ghz_chan_freq(); @@ -439,6 +454,8 @@ static void hdd_init_6ghz(struct hdd_context *hdd_ctx) wiphy->bands[HDD_NL80211_BAND_6GHZ] = &wlan_hdd_band_6_ghz; wiphy->bands[HDD_NL80211_BAND_6GHZ]->channels = chlist; wiphy->bands[HDD_NL80211_BAND_6GHZ]->n_channels = num; + + hdd_exit(); } #else static void hdd_init_6ghz(struct hdd_context *hdd_ctx)