]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Expose Multi-BSS STA capability through wpa_supplicant control interface
authorJouni Malinen <jouni@codeaurora.org>
Thu, 20 Dec 2018 19:24:48 +0000 (21:24 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 20 Dec 2018 19:30:43 +0000 (21:30 +0200)
Indicate whether the driver advertises support for Multi-BSS STA
functionality with "GET_CAPABILITY multibss" (returns "MULTIBSS-STA" if
supported).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index a742949dba0ef6501d4aa99ed8072601ca4e8a2b..951989a102fad55d8d8deaf71016558b5a7e600a 100644 (file)
@@ -4388,6 +4388,13 @@ static int wpa_supplicant_ctrl_iface_get_capability(
        }
 #endif /* CONFIG_FILS */
 
+       if (os_strcmp(field, "multibss") == 0 && wpa_s->multi_bss_support) {
+               res = os_snprintf(buf, buflen, "MULTIBSS-STA");
+               if (os_snprintf_error(buflen, res))
+                       return -1;
+               return res;
+       }
+
        wpa_printf(MSG_DEBUG, "CTRL_IFACE: Unknown GET_CAPABILITY field '%s'",
                   field);
 
index 1ade6253f73bec4a46b025ce107b6963a8315c37..9beb4e575747b8fb42d3f8881af4baa7a14aca58 100644 (file)
@@ -5582,6 +5582,12 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s,
                    capa.mac_addr_rand_sched_scan_supported)
                        wpa_s->mac_addr_rand_supported |=
                                (MAC_ADDR_RAND_SCHED_SCAN | MAC_ADDR_RAND_PNO);
+
+               wpa_drv_get_ext_capa(wpa_s, WPA_IF_STATION);
+               if (wpa_s->extended_capa &&
+                   wpa_s->extended_capa_len >= 3 &&
+                   wpa_s->extended_capa[2] & 0x40)
+                       wpa_s->multi_bss_support = 1;
        }
        if (wpa_s->max_remain_on_chan == 0)
                wpa_s->max_remain_on_chan = 1000;
index b3a7db674e8b8bb9c1e117503bf2eef73c5d9b5e..615f658ca88649a2399431d072b2635de645271e 100644 (file)
@@ -1235,6 +1235,7 @@ struct wpa_supplicant {
 #endif /* CONFIG_FILS */
        unsigned int ieee80211ac:1;
        unsigned int enabled_4addr_mode:1;
+       unsigned int multi_bss_support:1;
 };