summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorService qcabuildsw <qcabuildsw@localhost>2016-12-22 09:36:34 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-22 09:36:34 -0800
commit1aec0c09dafb229501f319a8ce03764d1f821692 (patch)
tree2ce95316286be7dba66ccc34f76c8dec25ab29e6
parent230b24e99731654dd9da5d051231a33eb413bc4b (diff)
parent058db746588c52a1031cc6eb4b8e3485585dcd35 (diff)
Merge "qcacld-3.0: Ignore rates from hostapd when doing SAP channel switch" into wlan-cld3.driver.lnx.1.1-dev
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c3
-rw-r--r--core/sme/src/csr/csr_api_roam.c19
2 files changed, 16 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 3e9ee1d24b4f..25ea48ad9530 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7540,7 +7540,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 064ec9b0423e..2fca70196a60 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -12680,6 +12680,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
*
@@ -12688,7 +12689,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;
@@ -12723,8 +12725,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;
@@ -13000,7 +13002,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,
@@ -18549,7 +18552,13 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac,
tSirChanChangeRequest *pMsg;
tCsrRoamStartBssParams param;
- csr_roam_get_bss_start_parms(pMac, profile, &param);
+ /*
+ * 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, &param, true);
pMsg = qdf_mem_malloc(sizeof(tSirChanChangeRequest));
if (!pMsg) {
return QDF_STATUS_E_NOMEM;