diff options
| author | Kapil Gupta <kapgupta@codeaurora.org> | 2017-03-28 18:46:01 +0530 |
|---|---|---|
| committer | spuligil <spuligil@codeaurora.org> | 2017-04-15 12:50:47 -0700 |
| commit | 8eff6d32a953bd3e27c7d78ac4bbe37a0dae3171 (patch) | |
| tree | 79fd789597a23ed2a6d8416e3a91a6f6eabac175 | |
| parent | 8e43fd0fc8215839bf1f4d0323b6f63749088924 (diff) | |
qcacld-3.0: Support for PMKSA caching
Add support for PMK and PMKID cache based on either bssid or
ssid + cache identifier.
CRs-Fixed: 2028113
Change-Id: Ic29b9dc3ad0c6c3d56af297494bc746d78e838d5
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 135 | ||||
| -rw-r--r-- | core/sme/inc/csr_api.h | 6 | ||||
| -rw-r--r-- | core/sme/inc/sme_api.h | 2 | ||||
| -rw-r--r-- | core/sme/src/common/sme_api.c | 5 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 84 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_inside_api.h | 2 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_util.c | 138 |
7 files changed, 302 insertions, 70 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 1bc75e14db55..b669a6807a0e 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -15577,6 +15577,99 @@ static int wlan_hdd_cfg80211_add_station(struct wiphy *wiphy, return ret; } +#ifdef CFG80211_FILS_SK_OFFLOAD_SUPPORT +/* + * wlan_hdd_is_pmksa_valid: API to validate pmksa + * @pmksa: pointer to cfg80211_pmksa structure + * + * Return: True if valid else false + */ +static inline bool wlan_hdd_is_pmksa_valid(struct cfg80211_pmksa *pmksa) +{ + if (!pmksa->bssid) { + hdd_err("bssid (%p) is NULL", + pmksa->bssid); + } else if (!pmksa->ssid || !pmksa->cache_id) { + hdd_err("either ssid (%p) or cache_id (%p) are NULL", + pmksa->ssid, pmksa->cache_id); + return false; + } + return true; +} + +/* + * hdd_update_pmksa_info: API to update tPmkidCacheInfo from cfg80211_pmksa + * @pmk_cache: pmksa from supplicant + * @pmk_cache: pmk needs to be updated + * + * Return: None + */ +static void hdd_update_pmksa_info(tPmkidCacheInfo *pmk_cache, + struct cfg80211_pmksa *pmksa, bool is_delete) +{ + if (pmksa->bssid) { + hdd_debug("set PMKSA for " MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(pmksa->bssid)); + qdf_mem_copy(pmk_cache->BSSID.bytes, + pmksa->bssid, QDF_MAC_ADDR_SIZE); + } else { + qdf_mem_copy(pmk_cache->ssid, pmksa->ssid, + SIR_MAC_MAX_SSID_LENGTH); + qdf_mem_copy(pmk_cache->cache_id, pmksa->cache_id, CACHE_ID_LEN); + pmk_cache->ssid_len = pmksa->ssid_len; + hdd_debug("set PMKSA for ssid %*.*s cache_id %x %x", + pmk_cache->ssid_len, pmk_cache->ssid_len, + pmksa->ssid, pmksa->cache_id[0], pmksa->cache_id[1]); + } + + if (is_delete) + return; + + qdf_mem_copy(pmk_cache->PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE); + if (pmksa->pmk_len && (pmksa->pmk_len <= CSR_RSN_MAX_PMK_LEN)) { + qdf_mem_copy(pmk_cache->pmk, pmksa->pmk, pmksa->pmk_len); + pmk_cache->pmk_len = pmksa->pmk_len; + } else + hdd_info("pmk len is %zu", pmksa->pmk_len); +} +#else +/* + * wlan_hdd_is_pmksa_valid: API to validate pmksa + * @pmksa: pointer to cfg80211_pmksa structure + * + * Return: True if valid else false + */ +static inline bool wlan_hdd_is_pmksa_valid(struct cfg80211_pmksa *pmksa) +{ + if (!pmksa->bssid) { + hdd_err("both bssid is NULL %p", pmksa->bssid); + return false; + } + return true; +} + +/* + * hdd_update_pmksa_info: API to update tPmkidCacheInfo from cfg80211_pmksa + * @pmk_cache: pmksa from supplicant + * @pmk_cache: pmk needs to be updated + * + * Return: None + */ +static void hdd_update_pmksa_info(tPmkidCacheInfo *pmk_cache, + struct cfg80211_pmksa *pmksa, bool is_delete) +{ + hdd_debug("set PMKSA for " MAC_ADDRESS_STR, + MAC_ADDR_ARRAY(pmksa->bssid)); + qdf_mem_copy(pmk_cache->BSSID.bytes, + pmksa->bssid, QDF_MAC_ADDR_SIZE); + + if (is_delete) + return; + + qdf_mem_copy(pmk_cache->PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE); +} +#endif + /** * __wlan_hdd_cfg80211_set_pmksa() - set pmksa * @wiphy: Pointer to wiphy @@ -15594,7 +15687,7 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, tHalHandle halHandle; QDF_STATUS result = QDF_STATUS_SUCCESS; int status; - tPmkidCacheInfo pmk_id; + tPmkidCacheInfo pmk_cache; ENTER(); @@ -15613,14 +15706,14 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, return -EINVAL; } - if (!pmksa->bssid || !pmksa->pmkid) { - hdd_err("pmksa->bssid(%p) or pmksa->pmkid(%p) is NULL", - pmksa->bssid, pmksa->pmkid); + if (!pmksa->pmkid) { + hdd_err("pmksa->pmkid(%p) is NULL", + pmksa->pmkid); return -EINVAL; } - hdd_debug("set PMKSA for " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(pmksa->bssid)); + if (!wlan_hdd_is_pmksa_valid(pmksa)) + return -EINVAL; status = wlan_hdd_validate_context(pHddCtx); @@ -15629,12 +15722,19 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter); - qdf_mem_copy(pmk_id.BSSID.bytes, pmksa->bssid, QDF_MAC_ADDR_SIZE); - qdf_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE); + qdf_mem_zero(&pmk_cache, sizeof(pmk_cache)); + + hdd_update_pmksa_info(&pmk_cache, pmksa, false); - /* Add to the PMKSA ID Cache in CSR */ + /* + * Add to the PMKSA Cache in CSR + * PMKSA cache will be having following + * 1. pmkid id + * 2. pmk + * 3. bssid or cache identifier + */ result = sme_roam_set_pmkid_cache(halHandle, pAdapter->sessionId, - &pmk_id, 1, false); + &pmk_cache, 1, false); MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_CFG80211_SET_PMKSA, @@ -15681,6 +15781,7 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); tHalHandle halHandle; int status = 0; + tPmkidCacheInfo pmk_cache; ENTER(); @@ -15699,13 +15800,8 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, return -EINVAL; } - if (!pmksa->bssid) { - hdd_err("pmksa->bssid is NULL"); + if (!wlan_hdd_is_pmksa_valid(pmksa)) return -EINVAL; - } - - hdd_debug("Deleting PMKSA for " MAC_ADDRESS_STR, - MAC_ADDR_ARRAY(pmksa->bssid)); status = wlan_hdd_validate_context(pHddCtx); @@ -15717,10 +15813,15 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_CFG80211_DEL_PMKSA, pAdapter->sessionId, 0)); + + qdf_mem_zero(&pmk_cache, sizeof(pmk_cache)); + + hdd_update_pmksa_info(&pmk_cache, pmksa, true); + /* Delete the PMKID CSR cache */ if (QDF_STATUS_SUCCESS != sme_roam_del_pmkid_from_cache(halHandle, - pAdapter->sessionId, pmksa->bssid, + pAdapter->sessionId, &pmk_cache, false)) { hdd_err("Failed to delete PMKSA for " MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pmksa->bssid)); diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 691019657487..179a671a56c8 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -215,6 +215,7 @@ typedef enum { } eIniChanBondState; #define CSR_RSN_PMKID_SIZE 16 +#define CSR_RSN_MAX_PMK_LEN 48 #define CSR_MAX_PMKID_ALLOWED 32 #define CSR_WEP40_KEY_LEN 5 #define CSR_WEP104_KEY_LEN 13 @@ -861,6 +862,11 @@ typedef struct tagPmkidCandidateInfo { typedef struct tagPmkidCacheInfo { struct qdf_mac_addr BSSID; uint8_t PMKID[CSR_RSN_PMKID_SIZE]; + uint8_t pmk[CSR_RSN_MAX_PMK_LEN]; + uint8_t pmk_len; + uint8_t ssid_len; + uint8_t ssid[SIR_MAC_MAX_SSID_LENGTH]; + uint8_t cache_id[CACHE_ID_LEN]; } tPmkidCacheInfo; #ifdef FEATURE_WLAN_WAPI diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 8c2263b08186..ecc897dcef1d 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -781,7 +781,7 @@ void sme_enable_disable_split_scan(tHalHandle hHal, uint8_t nNumStaChan, QDF_STATUS sme_send_rate_update_ind(tHalHandle hHal, tSirRateUpdateInd *rateUpdateParams); QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId, - const uint8_t *pBSSId, bool flush_cache); + tPmkidCacheInfo *pmksa, bool flush_cache); void sme_get_command_q_status(tHalHandle hHal); QDF_STATUS sme_enable_rmc(tHalHandle hHal, uint32_t sessionId); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index d79fdd7ee149..36afdca45800 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -4388,7 +4388,8 @@ QDF_STATUS sme_roam_set_pmkid_cache(tHalHandle hHal, uint8_t sessionId, } QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId, - const uint8_t *pBSSId, bool flush_cache) + tPmkidCacheInfo *pmksa, + bool flush_cache) { QDF_STATUS status = QDF_STATUS_E_FAILURE; tpAniSirGlobal pMac = PMAC_STRUCT(hHal); @@ -4400,7 +4401,7 @@ QDF_STATUS sme_roam_del_pmkid_from_cache(tHalHandle hHal, uint8_t sessionId, if (QDF_IS_STATUS_SUCCESS(status)) { if (CSR_IS_SESSION_VALID(pMac, sessionId)) { status = csr_roam_del_pmkid_from_cache(pMac, sessionId, - pBSSId, flush_cache); + pmksa, flush_cache); } else { status = QDF_STATUS_E_INVAL; } diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 75415e17535e..6cc23d07feff 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -13400,6 +13400,47 @@ csr_roam_diag_set_pmkid(tCsrRoamSession *pSession) } #endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */ +static void csr_update_pmk_cache(tCsrRoamSession *pSession, + tPmkidCacheInfo *pmksa) +{ + uint16_t cache_idx = pSession->curr_cache_idx; + + /* Add entry to the cache */ + if (!pmksa->ssid_len) { + qdf_copy_macaddr( + &pSession->PmkidCacheInfo[cache_idx].BSSID, + &pmksa->BSSID); + pSession->PmkidCacheInfo[cache_idx].ssid_len = 0; + } else { + qdf_mem_copy(pSession->PmkidCacheInfo[cache_idx].ssid, + pmksa->ssid, pmksa->ssid_len); + pSession->PmkidCacheInfo[cache_idx].ssid_len = + pmksa->ssid_len; + qdf_mem_copy(pSession->PmkidCacheInfo[cache_idx].cache_id, + pmksa->cache_id, CACHE_ID_LEN); + + } + qdf_mem_copy( + pSession->PmkidCacheInfo[cache_idx].PMKID, + pmksa->PMKID, CSR_RSN_PMKID_SIZE); + + if (pmksa->pmk_len) + qdf_mem_copy(pSession->PmkidCacheInfo[cache_idx].pmk, + pmksa->pmk, pmksa->pmk_len); + + pSession->PmkidCacheInfo[cache_idx].pmk_len = pmksa->pmk_len; + + /* Increment the CSR local cache index */ + if (cache_idx < (CSR_MAX_PMKID_ALLOWED - 1)) + pSession->curr_cache_idx++; + else + pSession->curr_cache_idx = 0; + + pSession->NumPmkidCache++; + if (pSession->NumPmkidCache > CSR_MAX_PMKID_ALLOWED) + pSession->NumPmkidCache = CSR_MAX_PMKID_ALLOWED; +} + QDF_STATUS csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, tPmkidCacheInfo *pPMKIDCache, uint32_t numItems, @@ -13438,38 +13479,24 @@ csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, /* Delete the entry if present */ csr_roam_del_pmkid_from_cache(pMac, sessionId, - pmksa->BSSID.bytes, false); - - /* Add entry to the cache */ - qdf_copy_macaddr( - &pSession->PmkidCacheInfo[pSession->curr_cache_idx].BSSID, - &pmksa->BSSID); - qdf_mem_copy( - pSession->PmkidCacheInfo[pSession->curr_cache_idx].PMKID, - pmksa->PMKID, CSR_RSN_PMKID_SIZE); - - /* Increment the CSR local cache index */ - if (pSession->curr_cache_idx < (CSR_MAX_PMKID_ALLOWED - 1)) - pSession->curr_cache_idx++; - else - pSession->curr_cache_idx = 0; + pmksa, false); + /* Update new entry */ + csr_update_pmk_cache(pSession, pmksa); - pSession->NumPmkidCache++; - if (pSession->NumPmkidCache > CSR_MAX_PMKID_ALLOWED) - pSession->NumPmkidCache = CSR_MAX_PMKID_ALLOWED; } return QDF_STATUS_SUCCESS; } QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, uint32_t sessionId, - const uint8_t *pBSSId, + tPmkidCacheInfo *pmksa, bool flush_cache) { tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); bool fMatchFound = false; uint32_t Index; uint32_t curr_idx; + tPmkidCacheInfo *cached_pmksa; uint32_t i; if (!pSession) { @@ -13494,20 +13521,27 @@ QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, /* !flush_cache - so look up in the cache */ for (Index = 0; Index < CSR_MAX_PMKID_ALLOWED; Index++) { - if (!qdf_mem_cmp(pSession->PmkidCacheInfo[Index].BSSID.bytes, - pBSSId, QDF_MAC_ADDR_SIZE)) { + cached_pmksa = &pSession->PmkidCacheInfo[Index]; + if ((!cached_pmksa->ssid_len) && + qdf_is_macaddr_equal(&cached_pmksa->BSSID, + &pmksa->BSSID)) fMatchFound = 1; + else if ((!qdf_mem_cmp(cached_pmksa->ssid, + pmksa->ssid, pmksa->ssid_len)) && + (!qdf_mem_cmp(cached_pmksa->cache_id, + pmksa->cache_id, CACHE_ID_LEN))) + fMatchFound = 1; + + if (fMatchFound) /* Clear this - the matched entry */ - qdf_mem_zero(&pSession->PmkidCacheInfo[Index], + qdf_mem_zero(cached_pmksa, sizeof(tPmkidCacheInfo)); break; - } } if (Index == CSR_MAX_PMKID_ALLOWED && !fMatchFound) { - sme_debug("No such PMKSA entry exists" - MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pBSSId)); + sme_debug("No such PMKSA entry exists"); return QDF_STATUS_SUCCESS; } diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index e2bcdb193ffa..69607c6d3c2f 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -1182,7 +1182,7 @@ QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac, QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac); QDF_STATUS csr_roam_del_pmkid_from_cache(tpAniSirGlobal pMac, uint32_t sessionId, - const uint8_t *pBSSId, + tPmkidCacheInfo *pmksa, bool flush_cache); bool csr_elected_country_info(tpAniSirGlobal pMac); diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index 5095aa8eb914..8fd4678f7dfb 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -3087,8 +3087,88 @@ static bool csr_is_rsn_match(tHalHandle hHal, tCsrAuthList *pAuthType, return fRSNMatch; } +/** + * csr_lookup_pmkid_using_ssid() - lookup pmkid using ssid and cache_id + * @mac: pointer to mac + * @session: sme session pointer + * @pmk_cache: pointer to pmk cache + * @index: index value needs to be seached + * + * Return: true if pmkid is found else false + */ +static bool csr_lookup_pmkid_using_ssid(tpAniSirGlobal mac, + tCsrRoamSession *session, + tPmkidCacheInfo *pmk_cache, + uint32_t *index) +{ + uint32_t i; + tPmkidCacheInfo *session_pmk; + + for (i = 0; i < session->NumPmkidCache; i++) { + session_pmk = &session->PmkidCacheInfo[i]; + sme_debug("match PMKID ssid %*.*s cache id %x %x ssid_len %d to ssid %s cache_id %x %x", + pmk_cache->ssid_len, pmk_cache->ssid_len, + pmk_cache->ssid, pmk_cache->cache_id[0], + pmk_cache->cache_id[1], pmk_cache->ssid_len, + session_pmk->ssid, + session_pmk->cache_id[0], session_pmk->cache_id[1]); + + if ((!qdf_mem_cmp(pmk_cache->ssid, session_pmk->ssid, + pmk_cache->ssid_len)) && + (!qdf_mem_cmp(session_pmk->cache_id, + pmk_cache->cache_id, CACHE_ID_LEN))) { + /* match found */ + *index = i; + return true; + } + } + + return false; +} + +/** + * csr_lookup_pmkid_using_bssid() - lookup pmkid using bssid + * @mac: pointer to mac + * @session: sme session pointer + * @pmk_cache: pointer to pmk cache + * @index: index value needs to be seached + * + * Return: true if pmkid is found else false + */ +static bool csr_lookup_pmkid_using_bssid(tpAniSirGlobal mac, + tCsrRoamSession *session, + tPmkidCacheInfo *pmk_cache, + uint32_t *index) +{ + uint32_t i; + tPmkidCacheInfo *session_pmk; + + for (i = 0; i < session->NumPmkidCache; i++) { + session_pmk = &session->PmkidCacheInfo[i]; + sme_debug("match PMKID " MAC_ADDRESS_STR " to ", + MAC_ADDR_ARRAY(pmk_cache->BSSID.bytes)); + if (qdf_is_macaddr_equal(&pmk_cache->BSSID, + &session_pmk->BSSID)) { + /* match found */ + *index = i; + return true; + } + } + + return false; +} + +/** + * csr_lookup_pmkid_using_bssid() - lookup pmkid using bssid or ssid + cache_id + * @mac: pointer to mac + * @session: sme session pointer + * @pmk_cache: pointer to pmk cache + * @index: index value needs to be seached + * + * Return: true if pmkid is found else false + */ static bool csr_lookup_pmkid(tpAniSirGlobal pMac, uint32_t sessionId, - uint8_t *pBSSId, uint8_t *pPMKId) + tPmkidCacheInfo *pmk_cache) { bool fRC = false, fMatchFound = false; uint32_t Index; @@ -3099,28 +3179,33 @@ static bool csr_lookup_pmkid(tpAniSirGlobal pMac, uint32_t sessionId, return false; } - do { - for (Index = 0; Index < CSR_MAX_PMKID_ALLOWED; Index++) { - sme_debug("match PMKID " MAC_ADDRESS_STR " to ", - MAC_ADDR_ARRAY(pBSSId)); - if (!qdf_mem_cmp - (pBSSId, pSession->PmkidCacheInfo[Index].BSSID.bytes, - sizeof(struct qdf_mac_addr))) { - /* match found */ - fMatchFound = true; - break; - } - } + if (pmk_cache->ssid_len) { + /* Try to find based on cache_id and ssid first */ + fMatchFound = csr_lookup_pmkid_using_ssid(pMac, pSession, + pmk_cache, &Index); + } - if (!fMatchFound) - break; + /* If not able to find using cache id or ssid_len is not present */ + if (!fMatchFound) + fMatchFound = csr_lookup_pmkid_using_bssid(pMac, + pSession, pmk_cache, &Index); - qdf_mem_copy(pPMKId, pSession->PmkidCacheInfo[Index].PMKID, - CSR_RSN_PMKID_SIZE); + if (!fMatchFound) { + sme_debug("no pmkid match found"); + return false; + } - fRC = true; - } while (0); - sme_debug("match: %d pMac->roam.NumPmkidCache: %d", + qdf_mem_copy(pmk_cache->PMKID, + pSession->PmkidCacheInfo[Index].PMKID, + CSR_RSN_PMKID_SIZE); + + qdf_mem_copy(pmk_cache->pmk, + pSession->PmkidCacheInfo[Index].pmk, + pSession->PmkidCacheInfo[Index].pmk_len); + pmk_cache->pmk_len = pSession->PmkidCacheInfo[Index].pmk_len; + + fRC = true; + sme_debug("csr_lookup_pmkid called return match = %d pMac->roam.NumPmkidCache = %d", fRC, pSession->NumPmkidCache); return fRC; @@ -3140,7 +3225,7 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, tCsrRSNAuthIe *pAuthSuite; tCsrRSNCapabilities RSNCapabilities; tCsrRSNPMKIe *pPMK; - uint8_t PMKId[CSR_RSN_PMKID_SIZE]; + tPmkidCacheInfo pmkid_cache; #ifdef WLAN_FEATURE_11W uint8_t *pGroupMgmtCipherSuite; #endif @@ -3213,16 +3298,21 @@ uint8_t csr_construct_rsn_ie(tHalHandle hHal, uint32_t sessionId, pPMK = (tCsrRSNPMKIe *) (((uint8_t *) (&pAuthSuite->AuthOui[1])) + sizeof(uint16_t)); + qdf_mem_copy(pmkid_cache.BSSID.bytes, + pSirBssDesc->bssId, QDF_MAC_ADDR_SIZE); /* Don't include the PMK SA IDs for CCKM associations. */ if ( #ifdef FEATURE_WLAN_ESE (eCSR_AUTH_TYPE_CCKM_RSN != negAuthType) && #endif - csr_lookup_pmkid(pMac, sessionId, pSirBssDesc->bssId, - &(PMKId[0]))) { + csr_lookup_pmkid(pMac, sessionId, &pmkid_cache)) { pPMK->cPMKIDs = 1; - qdf_mem_copy(pPMK->PMKIDList[0].PMKID, PMKId, + qdf_trace_hex_dump(QDF_MODULE_ID_PE, + QDF_TRACE_LEVEL_INFO, + pmkid_cache.pmk, pmkid_cache.pmk_len); + qdf_mem_copy(pPMK->PMKIDList[0].PMKID, + pmkid_cache.PMKID, CSR_RSN_PMKID_SIZE); } else pPMK->cPMKIDs = 0; |
