From d521600a10fe7a495ca1a0ffa982ae1278bd2da1 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Wed, 3 Feb 2016 17:09:09 -0800 Subject: [PATCH] qcacld-3.0: Change channel bonding mode after roaming The CB mode could get changed after roaming since the non-AP STA can roam to an AP which has a different channel bonding mode. So, derive the CB mode from the IE's and accordingly set in the connected profile. CRs-Fixed: 972479 Change-Id: I01daa88d69397fb0e88615656903c43ed623ed38 --- core/sme/src/csr/csr_api_roam.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 43d82897bddd..4a4f47734ccc 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -7820,12 +7820,16 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, qdf_mem_free(pConnectProfile->pAddIEAssoc); pConnectProfile->pAddIEAssoc = NULL; } + /* + * In case of LFR2.0, the connected profile is copied into a temporary + * profile and cleared and then is copied back. This is not needed for + * LFR3.0, since the profile is not cleared. + */ if (!pSession->roam_synch_in_progress) { qdf_mem_set(&pSession->connectedProfile, sizeof(tCsrRoamConnectedProfile), 0); pConnectProfile->AuthType = pProfile->negotiatedAuthType; pConnectProfile->AuthInfo = pProfile->AuthType; - pConnectProfile->CBMode = pProfile->CBMode; pConnectProfile->EncryptionType = pProfile->negotiatedUCEncryptionType; pConnectProfile->EncryptionInfo = pProfile->EncryptionType; @@ -7861,6 +7865,12 @@ QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, pConnectProfile->MFPCapable = pProfile->MFPCapable; #endif } + if (pIes) + pConnectProfile->CBMode = csr_get_cb_mode_from_ies(pMac, + pSirBssDesc->channelId, pIes); + else + sms_log(pMac, LOGE, FL("IE unavailable to derive CB mode")); + /* Save bssid */ pConnectProfile->operationChannel = pSirBssDesc->channelId; pConnectProfile->beaconInterval = pSirBssDesc->beaconInterval;