wifi: implement onStateChangedWithAkm

The actual used keymgnt is passed in the association frame
and will update to the current key management.

Bug: 230766005
Test: atest vts
Change-Id: I7e0719c8426bc5ccafff60ea38d49caf93036741
diff --git a/wpa_supplicant/aidl/aidl_manager.cpp b/wpa_supplicant/aidl/aidl_manager.cpp
index ffd94b9..684eab0 100644
--- a/wpa_supplicant/aidl/aidl_manager.cpp
+++ b/wpa_supplicant/aidl/aidl_manager.cpp
@@ -39,6 +39,7 @@
 const std::vector<uint8_t> kZeroBssid = {0, 0, 0, 0, 0, 0};
 
 using aidl::android::hardware::wifi::supplicant::GsmRand;
+using aidl::android::hardware::wifi::supplicant::KeyMgmtMask;
 
 /**
  * Check if the provided |wpa_supplicant| structure represents a P2P iface or
@@ -662,6 +663,8 @@
 		aidl_ssid.assign(
 			wpa_s->current_ssid->ssid,
 			wpa_s->current_ssid->ssid + wpa_s->current_ssid->ssid_len);
+		wpa_printf(MSG_INFO, "assoc key_mgmt 0x%x network key_mgmt 0x%x",
+			wpa_s->key_mgmt, wpa_s->current_ssid->key_mgmt);
 	}
 	std::vector<uint8_t> bssid;
 	// wpa_supplicant sets the |pending_bssid| field when it starts a
@@ -681,12 +684,12 @@
 	std::function<
 		ndk::ScopedAStatus(std::shared_ptr<ISupplicantStaIfaceCallback>)>
 		func = std::bind(
-			&ISupplicantStaIfaceCallback::onStateChanged,
+			&ISupplicantStaIfaceCallback::onStateChangedWithAkm,
 			std::placeholders::_1,
 			static_cast<StaIfaceCallbackState>(
 				wpa_s->wpa_state),
 				bssid, aidl_network_id, aidl_ssid,
-				fils_hlp_sent);
+				fils_hlp_sent, (KeyMgmtMask) wpa_s->key_mgmt);
 	callWithEachStaIfaceCallback(
 		misc_utils::charBufToString(wpa_s->ifname), func);
 	return 0;