Patchwork wpa_supplicant: add support for VHT selector

login
register
mail settings
Submitter Michal Kazior
Date July 3, 2013, 8:14 a.m.
Message ID <1372839240-28636-1-git-send-email-michal.kazior@tieto.com>
Download mbox | patch
Permalink /patch/256550/
State Superseded
Headers show

Comments

Michal Kazior - July 3, 2013, 8:14 a.m.
This allows wpa_supplicant to associate to an AP
that has VHT selector set.

Without the patch it is impossible to connect to,
e.g. hostapd-based AP that has require_vht=1.
wpa_supplicant ignores given network block with
reason:

  hardware does not support required rate 63.0 Mbps

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
---
 wpa_supplicant/events.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)
Johannes Berg - July 3, 2013, 8:29 a.m.
On Wed, 2013-07-03 at 10:14 +0200, Michal Kazior wrote:

> +			/* There's also a VHT selector for 802.11ac */
> +			if (flagged && ((rate_ie[j] & 0x7f) ==
> +					BSS_MEMBERSHIP_SELECTOR_VHT_PHY)) {
> +				if (!ht_supported(mode)) {

ht_supported()?

johannes
Michal Kazior - July 3, 2013, 9:05 a.m.
On 3 July 2013 10:29, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Wed, 2013-07-03 at 10:14 +0200, Michal Kazior wrote:
>
>> +                     /* There's also a VHT selector for 802.11ac */
>> +                     if (flagged && ((rate_ie[j] & 0x7f) ==
>> +                                     BSS_MEMBERSHIP_SELECTOR_VHT_PHY)) {
>> +                             if (!ht_supported(mode)) {
>
> ht_supported()?

Thanks. I missed that.

But there doesn't seem to be a vht_supported() from what I can tell.
ht_supported() seems to be based on 802.11n spec, but I don't have
access to 802.11ac spec.

Do you know what should be checked to verify vht support in this case?
Is it similar to 11n that a single spatial stream with mcs 0-7 (the
minimal rate subset I suppose) is required for non-AP STA in 11ac or
that the first stream mcs bitmask is set to either 0,1,2 (3 meaning
not supported)?


Pozdrawiam / Best regards,
Michał Kazior.
Johannes Berg - July 3, 2013, 9:25 a.m.
On Wed, 2013-07-03 at 11:05 +0200, Michal Kazior wrote:

> But there doesn't seem to be a vht_supported() from what I can tell.

Yeah, that's missing.

> Do you know what should be checked to verify vht support in this case?
> Is it similar to 11n that a single spatial stream with mcs 0-7 (the
> minimal rate subset I suppose) is required for non-AP STA in 11ac or
> that the first stream mcs bitmask is set to either 0,1,2 (3 meaning
> not supported)?

Not MCS bitmap, "vht_mcs_set" is relevant for VHT.

It seems to me that we'd need a new flag
HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN that driver_nl80211 sets
unconditionally (see phy_info_band()/phy_info_vht_capa() there).

It seems I forgot to add a flag saying "VHT is supported", and never
even set vht_mcs_set to ff:ff:ff:ff:ff:ff:ff:ff, so maybe this is all
completely wrong now?

johannes
Michal Kazior - July 3, 2013, 10 a.m.
On 3 July 2013 11:25, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Wed, 2013-07-03 at 11:05 +0200, Michal Kazior wrote:
>
>> But there doesn't seem to be a vht_supported() from what I can tell.
>
> Yeah, that's missing.
>
>> Do you know what should be checked to verify vht support in this case?
>> Is it similar to 11n that a single spatial stream with mcs 0-7 (the
>> minimal rate subset I suppose) is required for non-AP STA in 11ac or
>> that the first stream mcs bitmask is set to either 0,1,2 (3 meaning
>> not supported)?
>
> Not MCS bitmap, "vht_mcs_set" is relevant for VHT.

Yes. I meant vht mcs of course.


> It seems to me that we'd need a new flag
> HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN that driver_nl80211 sets
> unconditionally (see phy_info_band()/phy_info_vht_capa() there).
>
> It seems I forgot to add a flag saying "VHT is supported", and never
> even set vht_mcs_set to ff:ff:ff:ff:ff:ff:ff:ff, so maybe this is all
> completely wrong now?

Yes. It seems phy_info_vht_capa() should set "ff:ff.." if there's no
vht mcs in nlattr, but it doesn't. I'll do some tests and send up
patches later. Thanks!


Pozdrawiam / Best regards,
Michał Kazior.

Patch

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f757c72..0059b98 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -613,6 +613,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 (!ht_supported(mode)) {
+					wpa_dbg(wpa_s, MSG_DEBUG,
+						"   hardware does not support "
+						"VHT PHY");
+					return 0;
+				}
+				continue;
+			}
+
 			if (!flagged)
 				continue;