瀏覽代碼

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
Varun Reddy Yeturu 9 年之前
父節點
當前提交
d521600a10
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      core/sme/src/csr/csr_api_roam.c

+ 11 - 1
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;