Add BSSID of the AP in PMKSA cache added event
Deprecated onPmkCacheAdded() callback function and
added a new onPmkSaCacheAdded() callback function to
include the connected AP BSSID. This will help framework
to include BSSID information as a key to store PMKSA.
Bug: 260042356
Test: atest vts
Test: Manual - Tested WPA3 STA - AP connection multiple times and
confirmed that PMKSA cache is added and supplicant is using
the PMKSA cache entries for open authentication.
Change-Id: I1992791d46156ff7e9ca25025338b40530934978
diff --git a/wpa_supplicant/aidl/aidl_manager.cpp b/wpa_supplicant/aidl/aidl_manager.cpp
index bc70532..f644a39 100644
--- a/wpa_supplicant/aidl/aidl_manager.cpp
+++ b/wpa_supplicant/aidl/aidl_manager.cpp
@@ -1790,18 +1790,22 @@
{
std::string aidl_ifname = misc_utils::charBufToString(wpa_s->ifname);
+ PmkSaCacheData aidl_pmksa_data = {};
+ aidl_pmksa_data.bssid = macAddrToVec(pmksa_entry->aa);
// Serialize PmkCacheEntry into blob.
std::stringstream ss(
std::stringstream::in | std::stringstream::out | std::stringstream::binary);
misc_utils::serializePmkCacheEntry(ss, pmksa_entry);
std::vector<uint8_t> serializedEntry(
std::istreambuf_iterator<char>(ss), {});
+ aidl_pmksa_data.serializedEntry = serializedEntry;
+ aidl_pmksa_data.expirationTimeInSec = pmksa_entry->expiration;
const std::function<
ndk::ScopedAStatus(std::shared_ptr<ISupplicantStaIfaceCallback>)>
func = std::bind(
- &ISupplicantStaIfaceCallback::onPmkCacheAdded,
- std::placeholders::_1, pmksa_entry->expiration, serializedEntry);
+ &ISupplicantStaIfaceCallback::onPmkSaCacheAdded,
+ std::placeholders::_1, aidl_pmksa_data);
callWithEachStaIfaceCallback(aidl_ifname, func);
}