From e8a26b2ade39bced1ebd14eebfca7f0633b71296 Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Wed, 11 Oct 2017 20:38:47 +0530 Subject: [PATCH] qcacld-3.0: Add support for flush PMKSA in fw Currently, driver sends add/delete pmksa entry to fw whenever supplicant sends set/delete pmksa to driver. Add support to flush all PMKSA entries as well. Change-Id: I044a25b071cab5c156b41bcaab338328b5439d64 CRs-Fixed: 2094257 --- core/hdd/src/wlan_hdd_cfg80211.c | 2 ++ core/sme/src/common/sme_api.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 40139745b3d2..06280deb9e9c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -18770,6 +18770,8 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, hdd_err("Cannot flush PMKIDCache"); status = -EINVAL; } + + sme_set_del_pmkid_cache(halHandle, adapter->sessionId, NULL, false); EXIT(); return status; } diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 0a5be5fceaba..ce88d8caaa9f 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -15578,8 +15578,13 @@ QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id, return QDF_STATUS_E_NOMEM; } + qdf_mem_set(pmk_cache, sizeof(*pmk_cache), 0); + pmk_cache->session_id = session_id; + if (!pmk_cache_info) + goto send_flush_cmd; + if (!pmk_cache_info->ssid_len) { pmk_cache->cat_flag = WMI_PMK_CACHE_CAT_FLAG_BSSID; WMI_CHAR_ARRAY_TO_MAC_ADDR(pmk_cache_info->BSSID.bytes, @@ -15607,6 +15612,7 @@ QDF_STATUS sme_set_del_pmkid_cache(tHalHandle hal, uint8_t session_id, qdf_mem_copy(pmk_cache->pmk, pmk_cache_info->pmk, pmk_cache->pmk_len); +send_flush_cmd: msg.type = SIR_HAL_SET_DEL_PMKID_CACHE; msg.reserved = 0; msg.bodyptr = pmk_cache;