summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2019-04-16 05:52:49 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-04-16 05:52:49 -0700
commite1134fc9b3c44ef8cc4ad8025bf3f25a48d9bb3a (patch)
tree6f958721a32deba6af1f4cb0b6dc65af855bbefb
parent87cb45fe5b0769f462d24d663fe0ea89048f9393 (diff)
parent9cdd40e95b928d143c3f2609417c7b6136fb3f55 (diff)
Merge "qcacld-2.0: Update PMK cache and fix SAE PMK Cache Auth failure" into wlan-cld2.driver.lnx.1.0
-rw-r--r--CORE/MAC/inc/sirApi.h2
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAuthFrame.c3
-rw-r--r--CORE/MAC/src/pe/lim/limSerDesUtils.c9
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c45
4 files changed, 36 insertions, 23 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 339b6899cdaa..eaed71548ef6 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -1133,6 +1133,7 @@ typedef struct sSirSmeJoinReq
tANI_U8 cc_switch_mode;
#endif
tVOS_CON_MODE staPersona; //Persona
+ bool sae_pmk_cached;
bool osen_association;
bool wps_registration;
ePhyChanBondState cbMode; // Pass CB mode value in Join.
@@ -1211,7 +1212,6 @@ typedef struct sSirSmeJoinReq
#ifdef WLAN_FEATURE_FILS_SK
struct cds_fils_connection_info fils_con_info;
#endif
- bool sae_pmk_cached;
tSirBssDescription bssDescription;
/*
* WARNING: Pls make bssDescription as last variable in struct
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index 04f6fc195030..02fc4cb6c675 100644
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -1248,9 +1248,8 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
FL("received Auth frame2 for unexpected auth algo number %d"
MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
MAC_ADDR_ARRAY(pHdr->sa));)
+ break;
}
-
- break;
}
if (pRxAuthFrameBody->authStatusCode ==
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index 2afb5e9c4fb4..255f01aef764 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2017, 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -947,6 +947,13 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf)
limLog(pMac, LOGE, FL("remaining len %d is too short"), len);
return eSIR_FAILURE;
}
+ pJoinReq->sae_pmk_cached = *pBuf++;
+ len--;
+ if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
+ {
+ limLog(pMac, LOGE, FL("remaining len %d is too short"), len);
+ return eSIR_FAILURE;
+ }
pJoinReq->osen_association = *pBuf++;
len--;
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 78edfc28d689..c663cd3ea1b2 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -13844,20 +13844,19 @@ static void csr_update_pmk_cache(tCsrRoamSession *pSession,
uint16_t cache_idx = pSession->curr_cache_idx;
/* Add entry to the cache */
- if (!pmksa->ssid_len) {
- vos_copy_macaddr(
- (v_MACADDR_t *)pSession->PmkidCacheInfo[cache_idx].BSSID,
- (v_MACADDR_t *)pmksa->BSSID);
- pSession->PmkidCacheInfo[cache_idx].ssid_len = 0;
- } else {
+ pSession->PmkidCacheInfo[cache_idx].ssid_len = 0;
+ if (pmksa->ssid_len) {
vos_mem_copy(pSession->PmkidCacheInfo[cache_idx].ssid,
pmksa->ssid, pmksa->ssid_len);
pSession->PmkidCacheInfo[cache_idx].ssid_len =
pmksa->ssid_len;
- vos_mem_copy(pSession->PmkidCacheInfo[cache_idx].cache_id,
- pmksa->cache_id, CACHE_ID_LEN);
-
}
+ vos_copy_macaddr(
+ (v_MACADDR_t *)pSession->PmkidCacheInfo[cache_idx].BSSID,
+ (v_MACADDR_t *)pmksa->BSSID);
+ vos_mem_copy(pSession->PmkidCacheInfo[cache_idx].cache_id,
+ pmksa->cache_id, CACHE_ID_LEN);
+
vos_mem_copy(
pSession->PmkidCacheInfo[cache_idx].PMKID,
pmksa->PMKID, CSR_RSN_PMKID_SIZE);
@@ -14439,27 +14438,34 @@ static void csr_update_fils_connection_info(tCsrRoamProfile *profile,
*
* Return: None
*/
-static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req,
- tpAniSirGlobal mac, tCsrRoamSession *session)
+static bool csr_update_sae_config(tSirMacAddr bssid,
+ tpAniSirGlobal mac,
+ tCsrRoamSession *session)
{
tPmkidCacheInfo pmkid_cache;
uint32_t index;
+ bool sae_pmk_cached;
vos_mem_copy(pmkid_cache.BSSID,
- csr_join_req->bssDescription.bssId, VOS_MAC_ADDR_SIZE);
+ bssid, VOS_MAC_ADDR_SIZE);
- csr_join_req->sae_pmk_cached =
+ sae_pmk_cached =
csr_lookup_pmkid_using_bssid(mac, session, &pmkid_cache, &index);
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
"pmk_cached %d for BSSID=" MAC_ADDRESS_STR,
- csr_join_req->sae_pmk_cached,
- MAC_ADDR_ARRAY(csr_join_req->bssDescription.bssId));
+ sae_pmk_cached,
+ MAC_ADDR_ARRAY(bssid));
+
+ return sae_pmk_cached;
}
#else
-static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req,
- tpAniSirGlobal mac, tCsrRoamSession *session)
-{ }
+static bool csr_update_sae_config(tSirMacAddr bssid,
+ tpAniSirGlobal mac,
+ tCsrRoamSession *session)
+{
+ return false;
+}
#endif
@@ -14703,6 +14709,8 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
//Persona
*pBuf = (tANI_U8)pProfile->csrPersona;
pBuf++;
+ *pBuf = csr_update_sae_config(pBssDescription->bssId, pMac, pSession);
+ pBuf++;
*pBuf = (tANI_U8)pProfile->bOSENAssociation;
pBuf++;
*pBuf = (tANI_U8)pProfile->bWPSAssociation;
@@ -15278,7 +15286,6 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
csrPrepareJoinReassocReqBuffer(pMac, pBssDescription, pBuf,
(tANI_U8)pProfile->uapsd_mask,
messageType, pProfile);
- csr_update_sae_config(pMsg, pMac, pSession);
pBuf += used_length;
/*