|
@@ -3049,6 +3049,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
bool go_11ac_override = 0;
|
|
|
bool sap_11ac_override = 0;
|
|
|
uint8_t vht_ch_width;
|
|
|
+ uint32_t channel_bonding_mode_2g;
|
|
|
|
|
|
/* ***Note*** Donot set SME config related to ACS operation here because
|
|
|
* ACS operation is not synchronouse and ACS for Second AP may come when
|
|
@@ -3071,6 +3072,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
&sap_force_11n_for_11ac);
|
|
|
ucfg_mlme_get_go_force_11n_for_11ac(hdd_ctx->psoc,
|
|
|
&go_force_11n_for_11ac);
|
|
|
+ ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc,
|
|
|
+ &channel_bonding_mode_2g);
|
|
|
|
|
|
if (!((adapter->device_mode == QDF_SAP_MODE) ||
|
|
|
(adapter->device_mode == QDF_P2P_GO_MODE))) {
|
|
@@ -3282,6 +3285,17 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
if (sap_config->acs_cfg.ch_list_count == 1) {
|
|
|
sap_config->acs_cfg.pri_ch_freq =
|
|
|
sap_config->acs_cfg.freq_list[0];
|
|
|
+ if (sap_config->acs_cfg.pri_ch_freq <=
|
|
|
+ WLAN_REG_CH_TO_FREQ(CHAN_ENUM_2484) &&
|
|
|
+ sap_config->acs_cfg.ch_width >=
|
|
|
+ CH_WIDTH_40MHZ &&
|
|
|
+ !channel_bonding_mode_2g) {
|
|
|
+ sap_config->acs_cfg.ch_width = CH_WIDTH_20MHZ;
|
|
|
+ hdd_debug("2.4ghz channel resetting BW to %d 2.4 cbmode %d",
|
|
|
+ sap_config->acs_cfg.ch_width,
|
|
|
+ channel_bonding_mode_2g);
|
|
|
+ }
|
|
|
+
|
|
|
wlan_sap_set_sap_ctx_acs_cfg(
|
|
|
WLAN_HDD_GET_SAP_CTX_PTR(adapter), sap_config);
|
|
|
sap_config_acs_result(hdd_ctx->mac_handle,
|
|
@@ -3350,15 +3364,13 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
if (sap_config->acs_cfg.end_ch_freq <=
|
|
|
WLAN_REG_CH_TO_FREQ(CHAN_ENUM_2484) &&
|
|
|
sap_config->acs_cfg.ch_width >= eHT_CHANNEL_WIDTH_40MHZ) {
|
|
|
- uint32_t channel_bonding_mode;
|
|
|
|
|
|
- ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc,
|
|
|
- &channel_bonding_mode);
|
|
|
- sap_config->acs_cfg.ch_width = channel_bonding_mode ?
|
|
|
+ sap_config->acs_cfg.ch_width = channel_bonding_mode_2g ?
|
|
|
eHT_CHANNEL_WIDTH_40MHZ : eHT_CHANNEL_WIDTH_20MHZ;
|
|
|
|
|
|
hdd_debug("Only 2.4ghz channels, resetting BW to %d 2.4 cbmode %d",
|
|
|
- sap_config->acs_cfg.ch_width, channel_bonding_mode);
|
|
|
+ sap_config->acs_cfg.ch_width,
|
|
|
+ channel_bonding_mode_2g);
|
|
|
}
|
|
|
|
|
|
hdd_nofl_debug("ACS Config country %s ch_width %d hw_mode %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d band %d",
|