diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index c518c3c7cf..ad78765077 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -7468,7 +7468,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, acl_entry++; } } - if (!pHddCtx->config->force_sap_acs) { + if (!pHddCtx->config->force_sap_acs && + (0 != qdf_mem_cmp(ssid, PRE_CAC_SSID, ssid_len))) { pIe = wlan_hdd_cfg80211_get_ie_ptr( &pMgmt_frame->u.beacon.variable[0], pBeacon->head_len, WLAN_EID_SUPP_RATES); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 9ffb3c0341..5fbccd4b60 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -12718,6 +12718,7 @@ static void csr_populate_supported_rates_from_hostapd(tSirMacRateSet *opr_rates, * @pMac: mac global context * @pProfile: roam profile * @pParam: out param, start bss params + * @skip_hostapd_rate: to skip given hostapd's rate * * This function populates start bss param from roam profile * @@ -12726,7 +12727,8 @@ static void csr_populate_supported_rates_from_hostapd(tSirMacRateSet *opr_rates, static void csr_roam_get_bss_start_parms(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, - tCsrRoamStartBssParams *pParam) + tCsrRoamStartBssParams *pParam, + bool skip_hostapd_rate) { eCsrBand band; uint8_t opr_ch = 0; @@ -12761,8 +12763,8 @@ csr_roam_get_bss_start_parms(tpAniSirGlobal pMac, * ignore basic and extended rates from hostapd.conf and should * populate default rates. */ - if (pProfile->supported_rates.numRates || - pProfile->extended_rates.numRates) { + if (!skip_hostapd_rate && (pProfile->supported_rates.numRates || + pProfile->extended_rates.numRates)) { csr_populate_supported_rates_from_hostapd(opr_rates, ext_rates, pProfile); pParam->operationChn = tmp_opr_ch; @@ -13038,7 +13040,8 @@ void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId, &pSession->selfMacAddr); } } else { - csr_roam_get_bss_start_parms(pMac, pProfile, &pSession->bssParams); + csr_roam_get_bss_start_parms(pMac, pProfile, + &pSession->bssParams, false); /* Use the first SSID */ if (pProfile->SSIDs.numOfSSIDs) qdf_mem_copy(&pSession->bssParams.ssId, @@ -18541,7 +18544,13 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac, tSirChanChangeRequest *pMsg; tCsrRoamStartBssParams param; - csr_roam_get_bss_start_parms(pMac, profile, ¶m); + /* + * while changing the channel, use basic rates given by driver + * and not by hostapd as there is a chance that hostapd might + * give us rates based on original channel which may not be + * suitable for new channel + */ + csr_roam_get_bss_start_parms(pMac, profile, ¶m, true); pMsg = qdf_mem_malloc(sizeof(tSirChanChangeRequest)); if (!pMsg) { return QDF_STATUS_E_NOMEM;