aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-24 22:46:14 +0200
committerJouni Malinen <j@w1.fi>2011-11-24 22:47:46 +0200
commit0bf927a03ed080fe50400382e0c9538762f9b903 (patch)
tree9c275c98f5680aa4dbea80d441ee27161962dfff /src/common
parent8e8280bd5e6d2a7144b468a47f8c5b8bd4791400 (diff)
downloadexternal_wpa_supplicant_8_ti-0bf927a03ed080fe50400382e0c9538762f9b903.zip
external_wpa_supplicant_8_ti-0bf927a03ed080fe50400382e0c9538762f9b903.tar.gz
external_wpa_supplicant_8_ti-0bf927a03ed080fe50400382e0c9538762f9b903.tar.bz2
Use wpa_key_mgmt_*() helpers
This cleans up the source code and makes it less likely that new AKM addition misses some needed changes in the future. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/defs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/defs.h b/src/common/defs.h
index f00cf3a..6082053 100644
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -76,6 +76,11 @@ static inline int wpa_key_mgmt_wpa(int akm)
wpa_key_mgmt_wpa_psk(akm);
}
+static inline int wpa_key_mgmt_wpa_any(int akm)
+{
+ return wpa_key_mgmt_wpa(akm) || (akm & WPA_KEY_MGMT_WPA_NONE);
+}
+
#define WPA_PROTO_WPA BIT(0)
#define WPA_PROTO_RSN BIT(1)