Browse Source

qcacld-3.0: Fix to avoid sending invalid PMKID in FT-SuiteB roam

In FT-SuiteB when STA connects to AP1 then PMK1 gets cached. And
then STA disconnects from AP1 and connects to AP2 then PMK2
gets cached. Now if STA roams to AP1 then FW uses PMK2 from mlme
session to create the PMKID. But the corresponding RSO command
from driver sends the PMK1 to FW and the same gets updated in
mlme session of FW. This results in failure of next roams, as the
invalid PMKID gets created using PMK1.
This fix helps in deleting the old/stale PMK cache entries that
are under the same mobility domain as of the newly added entry in
case of all the FT connections except FT-SAE.

Change-Id: Id960e955f8669e19e950c1edc38a9f0a715292b7
CRs-Fixed: 2798713
Srikanth Marepalli 4 years ago
parent
commit
01ee301fbc
1 changed files with 11 additions and 0 deletions
  1. 11 0
      core/sme/src/csr/csr_api_roam.c

+ 11 - 0
core/sme/src/csr/csr_api_roam.c

@@ -14112,6 +14112,7 @@ QDF_STATUS csr_roam_set_psk_pmk(struct mac_context *mac, uint32_t sessionId,
 				bool update_to_fw)
 {
 	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
+	enum csr_akm_type akm_type;
 
 	if (!pSession) {
 		sme_err("session %d not found", sessionId);
@@ -14126,6 +14127,16 @@ QDF_STATUS csr_roam_set_psk_pmk(struct mac_context *mac, uint32_t sessionId,
 		return QDF_STATUS_SUCCESS;
 	}
 
+	akm_type = pSession->connectedProfile.AuthType;
+	if ((akm_type == eCSR_AUTH_TYPE_FT_RSN ||
+	     akm_type == eCSR_AUTH_TYPE_FT_FILS_SHA256 ||
+	     akm_type == eCSR_AUTH_TYPE_FT_FILS_SHA384 ||
+	     akm_type == eCSR_AUTH_TYPE_FT_SUITEB_EAP_SHA384) &&
+	    pSession->connectedProfile.mdid.mdie_present) {
+		sme_debug("Auth type: %d update the MDID in cache", akm_type);
+		csr_update_pmk_cache_ft(mac, sessionId, pSession);
+	}
+
 	if (update_to_fw)
 		csr_roam_update_cfg(mac, sessionId,
 				    REASON_ROAM_PSK_PMK_CHANGED);