diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 55b8ad8e55ca..ae82271450b1 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1539,8 +1539,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, if (QDF_STATUS_SUCCESS != status) hddLog(LOGE, FL("Get PCL failed")); - wlan_hdd_set_acs_ch_range(sap_config, ht_enabled, vht_enabled); - /* ACS override for android */ if (hdd_ctx->config->sap_p2p_11ac_override && ht_enabled) { hddLog(LOG1, FL("ACS Config override for 11AC")); @@ -1554,6 +1552,8 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, sap_config->acs_cfg.ch_width = eHT_CHANNEL_WIDTH_40MHZ; } + wlan_hdd_set_acs_ch_range(sap_config, ht_enabled, vht_enabled); + hddLog(LOG1, FL("ACS Config for wlan%d: HW_MODE: %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d"), adapter->dev->ifindex, sap_config->acs_cfg.hw_mode, ch_width, ht_enabled, vht_enabled, diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index a66b58f87931..1792ff79069e 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -1428,6 +1428,8 @@ void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams) } } + sap_sort_chl_weight(pSpectInfoParams); + pSpectInfo = pSpectInfoParams->pSpectCh; for (j = 0; j < (pSpectInfoParams->numSpectChans); j++) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, @@ -1565,6 +1567,8 @@ void sap_sort_chl_weight_vht160(tSapChSelSpectInfo *pSpectInfoParams) } } + sap_sort_chl_weight(pSpectInfoParams); + pSpectInfo = pSpectInfoParams->pSpectCh; for (j = 0; j < (pSpectInfoParams->numSpectChans); j++) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, @@ -1671,6 +1675,7 @@ void sap_sort_chl_weight_ht40_24_g(tSapChSelSpectInfo *pSpectInfoParams) } } } + sap_sort_chl_weight(pSpectInfoParams); } /*========================================================================== @@ -1797,14 +1802,11 @@ void sap_sort_chl_weight_all(ptSapContext pSapCtx, sap_sort_chl_weight_ht40_24_g(pSpectInfoParams); sap_sort_chl_weight_ht40_5_g(pSpectInfoParams); } - sap_sort_chl_weight(pSpectInfoParams); break; - case CH_WIDTH_80MHZ: case CH_WIDTH_80P80MHZ: sap_sort_chl_weight_ht80(pSpectInfoParams); break; - case CH_WIDTH_160MHZ: sap_sort_chl_weight_vht160(pSpectInfoParams); break;