aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2018-02-04 01:50:37 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-02 08:56:06 (GMT)
commite4802127650aafd187c7e4790360e6970135de3f (patch)
tree0cba1404d8fff46cc0e1a6463eca9ec1373991a7 /wpa_supplicant/wpa_supplicant.c
parent208263c014e4258faa0812027bdd2fb03bd610b5 (diff)
downloadhostap-e4802127650aafd187c7e4790360e6970135de3f.zip
hostap-e4802127650aafd187c7e4790360e6970135de3f.tar.gz
hostap-e4802127650aafd187c7e4790360e6970135de3f.tar.bz2
dbus: Add FILS to global capabilities
If any of the interfaces supports FILS (and similarly for FILS-SK-PFS), include the "fils" (and "fils_sk_pfs") capability in D-Bus information. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index fcb2677..68184df 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2344,6 +2344,27 @@ static size_t wpas_add_fils_hlp_req(struct wpa_supplicant *wpa_s, u8 *ie_buf,
return ie_len;
}
+
+
+int wpa_is_fils_supported(struct wpa_supplicant *wpa_s)
+{
+ return (((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_FILS)) ||
+ (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD)));
+}
+
+
+int wpa_is_fils_sk_pfs_supported(struct wpa_supplicant *wpa_s)
+{
+#ifdef CONFIG_FILS_SK_PFS
+ return (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) &&
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_FILS);
+#else /* CONFIG_FILS_SK_PFS */
+ return 0;
+#endif /* CONFIG_FILS_SK_PFS */
+}
+
#endif /* CONFIG_FILS */