mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: Check band caps before initializing wiphy band
Currently driver initializes the wiphy 6ghz band without checking the band capability. If FW does not support 6Ghz then wiphy register is failed as wiphy 6ghz band is initialized by driver. To fix this, initialize the wiphy 6ghz band only when host driver and FW both supports 6Ghz band. CRs-Fixed: 2968968 Change-Id: I28d660f515d16d0eb4245311b42c69308576ac62
This commit is contained in:
parent
f01e822cca
commit
ccbf7d5494
1 changed files with 17 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue