From 03658834c33748b9ad86f3d4cdf0c7be9c6887d1 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Wed, 13 Aug 2014 11:03:49 -0700 Subject: 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 --- src/common/wpa_common.c | 24 ++++++++++++++++++++++++ src/common/wpa_common.h | 1 + 2 files changed, 25 insertions(+) (limited to 'src/common') diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index adb22c76..7aeb706c 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -1002,6 +1002,30 @@ const char * wpa_key_mgmt_txt(int key_mgmt, int proto) } +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) diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h index c0b2caae..0ef5a9d1 100644 --- a/src/common/wpa_common.h +++ b/src/common/wpa_common.h @@ -377,6 +377,7 @@ void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa, const char * wpa_cipher_txt(int cipher); const char * wpa_key_mgmt_txt(int key_mgmt, int proto); +u32 wpa_akm_to_suite(int akm); int wpa_compare_rsn_ie(int ft_initial_assoc, const u8 *ie1, size_t ie1len, const u8 *ie2, size_t ie2len); -- cgit v1.2.3