Эх сурвалжийг харах

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
Vignesh Viswanathan 7 жил өмнө
parent
commit
e8a26b2ade

+ 2 - 0
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;
 }

+ 6 - 0
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;