aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2013-07-20 14:28:42 (GMT)
committerJouni Malinen <j@w1.fi>2013-07-20 14:28:42 (GMT)
commitc8ebeda4060121f09461705d87d2f9c1399668d5 (patch)
treee7f69402642f36ed1c5f0970fce3412f21e5faca /wpa_supplicant/events.c
parent3f9a8137f5f5e8ffe4102c7a8230d53dc0c3c7d4 (diff)
downloadhostap-c8ebeda4060121f09461705d87d2f9c1399668d5.zip
hostap-c8ebeda4060121f09461705d87d2f9c1399668d5.tar.gz
hostap-c8ebeda4060121f09461705d87d2f9c1399668d5.tar.bz2
wpa_supplicant: Add support for VHT BSS membership selector
This allows wpa_supplicant to associate to an AP that has VHT BSS membership selector set to indicate VHT support is required for the BSS. Without the patch it was impossible to connect to, e.g., hostapd-based AP that has require_vht=1. wpa_supplicant was complaining with: hardware does not support required rate 63.0 Mbps Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f757c72..fcd0f79 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -548,6 +548,24 @@ static int ht_supported(const struct hostapd_hw_modes *mode)
}
+static int vht_supported(const struct hostapd_hw_modes *mode)
+{
+ if (!(mode->flags & HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN)) {
+ /*
+ * The driver did not indicate whether it supports VHT. Assume
+ * it does to avoid connection issues.
+ */
+ return 1;
+ }
+
+ /*
+ * A VHT non-AP STA shall support MCS 0-7 for one spatial stream.
+ * TODO: Verify if this complies with the standard
+ */
+ return (mode->vht_mcs_set[0] & 0x3) != 3;
+}
+
+
static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
{
const struct hostapd_hw_modes *mode = NULL, *modes;
@@ -613,6 +631,18 @@ static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
continue;
}
+ /* There's also a VHT selector for 802.11ac */
+ if (flagged && ((rate_ie[j] & 0x7f) ==
+ BSS_MEMBERSHIP_SELECTOR_VHT_PHY)) {
+ if (!vht_supported(mode)) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ " hardware does not support "
+ "VHT PHY");
+ return 0;
+ }
+ continue;
+ }
+
if (!flagged)
continue;