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;