2014-11-25 10:23:33

by Johannes Berg

[permalink] [raw]
Subject: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

From: Johannes Berg <[email protected]>

If there are no channels allowing 80 MHz to be used, then the
station isn't really VHT capable even if the driver and device
support it in general. In this case, exclude the VHT capability
IE from probe request frames.

Signed-off-by: Johannes Berg <[email protected]>
---
net/mac80211/util.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index bb9664cb8831..974ebe70f5b0 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1339,6 +1339,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
int ext_rates_len;
int shift;
u32 rate_flags;
+ bool have_80mhz = false;

*offset = 0;

@@ -1467,7 +1468,15 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
*offset = noffset;
}

- if (sband->vht_cap.vht_supported) {
+ /* Check if any channel in this sband supports at least 80 MHz */
+ for (i = 0; i < sband->n_channels; i++) {
+ if (!(sband->channels[i].flags & IEEE80211_CHAN_NO_80MHZ)) {
+ have_80mhz = true;
+ break;
+ }
+ }
+
+ if (sband->vht_cap.vht_supported && have_80mhz) {
if (end - pos < 2 + sizeof(struct ieee80211_vht_cap))
goto out_err;
pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
--
2.1.1



2014-11-25 14:14:00

by YanBo

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, Nov 25, 2014 at 8:07 PM, Johannes Berg
<[email protected]> wrote:
> On Tue, 2014-11-25 at 19:10 +0800, YanBo wrote:
>
>> We already start the working to support the VHT modulations MCS8 and
>> MCS9 support in 2.4G for ath10k devices,
>> and it used the band->vht_cap = vht_cap to notification the mac80211,
>> if we band it with 80MHz, it is do need another
>> new advertisement for this as your said.
>
> But is all of that really the right way? I'm not completely convinced.

Except set the flag, the HW itself should support this feature, or
else it also doesn't work, I'd
send the patch in soon for public review.

>
> I guess we can make this check conditional for 5GHz when the VHT support
> lands and is discussed.
>
That is sounds good if it only check for 5GHz for what I know CMIIW.

Thanks
BR /Yanbo

2014-11-25 15:09:29

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On 11/25/14 15:18, Johannes Berg wrote:
> On Tue, 2014-11-25 at 22:13 +0800, YanBo wrote:
>
>>> But is all of that really the right way? I'm not completely convinced.
>>
>> Except set the flag, the HW itself should support this feature, or
>> else it also doesn't work, I'd
>> send the patch in soon for public review.
>
> Yeah, but is it really the right way to advertise VHT? In the spec, VHT
> means you also have 80 MHz support - do you really think you can/will do
> 80 MHz on 2.4 GHz? Seems like all of this will cause more corner cases.

For brcmfmac, the 80 MHz requirement in the spec was exactly the reason
to *not* advertise VHT in 2.4G.

>>>
>>> I guess we can make this check conditional for 5GHz when the VHT support
>>> lands and is discussed.
>>>
>> That is sounds good if it only check for 5GHz for what I know CMIIW.
>
> Even on 2.4 GHz it technically isn't enough though - there's enough
> spectrum in 2.4 GHz for a single 80 MHz channel; how long until somebody
> wants to do *that* for some reason? But the rest of us really doesn't
> think that's applicable ...

To get "friendly" with your neighbors :-p

Regards,
Arend

> Anyway, it probably needs mac80211 patches anyway since mlme.c already
> disables VHT if you can't do 80 MHz, so I think you should post those as
> part of a bigger discussion about how we want to support it and what it
> really means etc.
>
> johannes
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html


2014-11-25 12:08:03

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, 2014-11-25 at 19:10 +0800, YanBo wrote:

> We already start the working to support the VHT modulations MCS8 and
> MCS9 support in 2.4G for ath10k devices,
> and it used the band->vht_cap = vht_cap to notification the mac80211,
> if we band it with 80MHz, it is do need another
> new advertisement for this as your said.

But is all of that really the right way? I'm not completely convinced.

I guess we can make this check conditional for 5GHz when the VHT support
lands and is discussed.

johannes


2014-11-25 11:00:53

by YanBo

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, Nov 25, 2014 at 6:23 PM, Johannes Berg
<[email protected]> wrote:
> From: Johannes Berg <[email protected]>
>
> If there are no channels allowing 80 MHz to be used, then the
> station isn't really VHT capable even if the driver and device
> support it in general. In this case, exclude the VHT capability
> IE from probe request frames.
>

FYI, there are some new devices could support the VHT even at 20Mhz
band 2.4G mode.

BR /Yanbo

2014-11-25 15:17:46

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests


> Agree with you that it need a bigger discussion about whether
> advertise VHT is the suitable/best
> way to support the VHT at 2.4G feature.
>
> We are considered this ways as it is already be used by some vendor
> like BRCM or Qualcomm Atheros
> in there full mac product, and there will be IOT issue if there are
> kinds of different implementation.

There's no forum that defines it and tests IOP though...

johannes


2014-11-25 14:18:13

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, 2014-11-25 at 22:13 +0800, YanBo wrote:

> > But is all of that really the right way? I'm not completely convinced.
>
> Except set the flag, the HW itself should support this feature, or
> else it also doesn't work, I'd
> send the patch in soon for public review.

Yeah, but is it really the right way to advertise VHT? In the spec, VHT
means you also have 80 MHz support - do you really think you can/will do
80 MHz on 2.4 GHz? Seems like all of this will cause more corner cases.

> >
> > I guess we can make this check conditional for 5GHz when the VHT support
> > lands and is discussed.
> >
> That is sounds good if it only check for 5GHz for what I know CMIIW.

Even on 2.4 GHz it technically isn't enough though - there's enough
spectrum in 2.4 GHz for a single 80 MHz channel; how long until somebody
wants to do *that* for some reason? But the rest of us really doesn't
think that's applicable ...

Anyway, it probably needs mac80211 patches anyway since mlme.c already
disables VHT if you can't do 80 MHz, so I think you should post those as
part of a bigger discussion about how we want to support it and what it
really means etc.

johannes


2014-11-25 11:04:16

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, 2014-11-25 at 19:00 +0800, YanBo wrote:
> On Tue, Nov 25, 2014 at 6:23 PM, Johannes Berg
> <[email protected]> wrote:
> > From: Johannes Berg <[email protected]>
> >
> > If there are no channels allowing 80 MHz to be used, then the
> > station isn't really VHT capable even if the driver and device
> > support it in general. In this case, exclude the VHT capability
> > IE from probe request frames.
> >
>
> FYI, there are some new devices could support the VHT even at 20Mhz
> band 2.4G mode.

So in 2.4 GHz we typically don't have VHT anyway - and realistically you
can't support real "VHT" there, you can only support the new
modulations. I think this will require some custom (vendor-specific)
advertisement though, since VHT advertisement implies 80 MHz support.

IOW, I think at this point this patch isn't a problem. If we really need
to support VHT modulations in 2.4 GHz (or even have devices that have
VHT modulation support, but no 80 MHz support in 5 GHz) then some new
advertisement will have to be done.

OTOH, you could argue for that advertisement that on 2.4 GHz you can
never do 80 MHz anyway - but can't you? In theory there's enough
spectrum for exactly one 80 MHz channel ...

johannes


2014-11-25 14:49:07

by YanBo

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, Nov 25, 2014 at 10:18 PM, Johannes Berg
<[email protected]> wrote:
> On Tue, 2014-11-25 at 22:13 +0800, YanBo wrote:
>
>> > But is all of that really the right way? I'm not completely convinced.
>>
>> Except set the flag, the HW itself should support this feature, or
>> else it also doesn't work, I'd
>> send the patch in soon for public review.
>
> Yeah, but is it really the right way to advertise VHT? In the spec, VHT
> means you also have 80 MHz support - do you really think you can/will do
> 80 MHz on 2.4 GHz? Seems like all of this will cause more corner cases.
>
>> >

Agree with you that it need a bigger discussion about whether
advertise VHT is the suitable/best
way to support the VHT at 2.4G feature.

We are considered this ways as it is already be used by some vendor
like BRCM or Qualcomm Atheros
in there full mac product, and there will be IOT issue if there are
kinds of different implementation.

Thanks
BR /Yanbo

2014-11-25 11:10:45

by YanBo

[permalink] [raw]
Subject: Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests

On Tue, Nov 25, 2014 at 7:04 PM, Johannes Berg
<[email protected]> wrote:
> On Tue, 2014-11-25 at 19:00 +0800, YanBo wrote:
>> On Tue, Nov 25, 2014 at 6:23 PM, Johannes Berg
>> <[email protected]> wrote:
>> > From: Johannes Berg <[email protected]>
>> >
>> > If there are no channels allowing 80 MHz to be used, then the
>> > station isn't really VHT capable even if the driver and device
>> > support it in general. In this case, exclude the VHT capability
>> > IE from probe request frames.
>> >
>>
>> FYI, there are some new devices could support the VHT even at 20Mhz
>> band 2.4G mode.
>
> So in 2.4 GHz we typically don't have VHT anyway - and realistically you
> can't support real "VHT" there, you can only support the new
> modulations. I think this will require some custom (vendor-specific)
> advertisement though, since VHT advertisement implies 80 MHz support.
>
> IOW, I think at this point this patch isn't a problem. If we really need
> to support VHT modulations in 2.4 GHz (or even have devices that have
> VHT modulation support, but no 80 MHz support in 5 GHz) then some new
> advertisement will have to be done.
>
We already start the working to support the VHT modulations MCS8 and
MCS9 support in 2.4G for ath10k devices,
and it used the band->vht_cap = vht_cap to notification the mac80211,
if we band it with 80MHz, it is do need another
new advertisement for this as your said.

Thanks
BR /Yanbo