]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FILS: Claim FILS capability only if driver supports it
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 25 Oct 2016 20:44:00 +0000 (23:44 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 25 Oct 2016 21:41:04 +0000 (00:41 +0300)
"GET_CAPABILITY fils" used to return "FILS" based on wpa_supplicant
configuration. This can be made more useful by checking both for
wpa_supplicant and driver support for FILS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/drivers/driver.h
wpa_supplicant/ctrl_iface.c

index 2a4ac875821064e61d7741dfe1f6ed4336d92036..159a6b0c351a7e7fe2c7031d1fb0ce72464e3892 100644 (file)
@@ -1311,6 +1311,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE  0x0000010000000000ULL
 /** Driver supports P2P Listen offload */
 #define WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD     0x0000020000000000ULL
+/** Driver supports FILS */
+#define WPA_DRIVER_FLAGS_SUPPORT_FILS          0x0000040000000000ULL
        u64 flags;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
index 9d9aaeaff89e6061d6ee563fd1e4737c565d6e78..a929a7d06c126a2f1cb043af055dd6af12facd3e 100644 (file)
@@ -4048,7 +4048,8 @@ static int wpa_supplicant_ctrl_iface_get_capability(
 #endif /* CONFIG_ACS */
 
 #ifdef CONFIG_FILS
-       if (os_strcmp(field, "fils") == 0) {
+       if (os_strcmp(field, "fils") == 0 &&
+           (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SUPPORT_FILS)) {
                res = os_snprintf(buf, buflen, "FILS");
                if (os_snprintf_error(buflen, res))
                        return -1;