Cumulative patch from commit 4aa9c156e583c64cf5d90751ec888c478e1155c2

4aa9c15 dbus: Close dbus dict just after appending data
b8d87ed nl80211: Disable Probe Request reporting for static AP during deinit
bf144cf nl80211: Do not change iftype for static AP interface
61157af wext: Add signal_poll callback
af65bc3 P2P: Use ssid instead of wpa_ssid to find GO iface
6c460ea Add RSN cipher/AKM suite attributes into RADIUS messages
cdffd72 Add WLAN-HESSID into RADIUS messages
69002fb Add Mobility-Domain-Id into RADIUS messages
4a0693a dbus: Declare and implement GroupFinished as for GroupStarted
2fa980f P2P: Cancel pending action TX radio work on p2p_cancel
8b627b7 Fix writing of the wowlan_triggers parameter

Bug: 16877362

Change-Id: Ifbb8902e2634470ba212a82cd1ca49880633d961
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c
index adb22c7..7aeb706 100644
--- a/src/common/wpa_common.c
+++ b/src/common/wpa_common.c
@@ -1002,6 +1002,30 @@
 }
 
 
+u32 wpa_akm_to_suite(int akm)
+{
+	if (akm & WPA_KEY_MGMT_FT_IEEE8021X)
+		return WLAN_AKM_SUITE_FT_8021X;
+	if (akm & WPA_KEY_MGMT_FT_PSK)
+		return WLAN_AKM_SUITE_FT_PSK;
+	if (akm & WPA_KEY_MGMT_IEEE8021X)
+		return WLAN_AKM_SUITE_8021X;
+	if (akm & WPA_KEY_MGMT_IEEE8021X_SHA256)
+		return WLAN_AKM_SUITE_8021X_SHA256;
+	if (akm & WPA_KEY_MGMT_IEEE8021X)
+		return WLAN_AKM_SUITE_8021X;
+	if (akm & WPA_KEY_MGMT_PSK_SHA256)
+		return WLAN_AKM_SUITE_PSK_SHA256;
+	if (akm & WPA_KEY_MGMT_PSK)
+		return WLAN_AKM_SUITE_PSK;
+	if (akm & WPA_KEY_MGMT_CCKM)
+		return WLAN_AKM_SUITE_CCKM;
+	if (akm & WPA_KEY_MGMT_OSEN)
+		return WLAN_AKM_SUITE_OSEN;
+	return 0;
+}
+
+
 int wpa_compare_rsn_ie(int ft_initial_assoc,
 		       const u8 *ie1, size_t ie1len,
 		       const u8 *ie2, size_t ie2len)