linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
@ 2014-11-25 10:23 Johannes Berg
  2014-11-25 11:00 ` YanBo
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-11-25 10:23 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

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 <johannes.berg@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 10:23 [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests Johannes Berg
@ 2014-11-25 11:00 ` YanBo
  2014-11-25 11:04   ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: YanBo @ 2014-11-25 11:00 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Johannes Berg

On Tue, Nov 25, 2014 at 6:23 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 11:00 ` YanBo
@ 2014-11-25 11:04   ` Johannes Berg
  2014-11-25 11:10     ` YanBo
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-11-25 11:04 UTC (permalink / raw)
  To: YanBo; +Cc: linux-wireless

On Tue, 2014-11-25 at 19:00 +0800, YanBo wrote:
> On Tue, Nov 25, 2014 at 6:23 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 11:04   ` Johannes Berg
@ 2014-11-25 11:10     ` YanBo
  2014-11-25 12:07       ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: YanBo @ 2014-11-25 11:10 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, Nov 25, 2014 at 7:04 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Tue, 2014-11-25 at 19:00 +0800, YanBo wrote:
>> On Tue, Nov 25, 2014 at 6:23 PM, Johannes Berg
>> <johannes@sipsolutions.net> wrote:
>> > From: Johannes Berg <johannes.berg@intel.com>
>> >
>> > 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 11:10     ` YanBo
@ 2014-11-25 12:07       ` Johannes Berg
  2014-11-25 14:13         ` YanBo
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-11-25 12:07 UTC (permalink / raw)
  To: YanBo; +Cc: linux-wireless

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 12:07       ` Johannes Berg
@ 2014-11-25 14:13         ` YanBo
  2014-11-25 14:18           ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: YanBo @ 2014-11-25 14:13 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, Nov 25, 2014 at 8:07 PM, Johannes Berg
<johannes@sipsolutions.net> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 14:13         ` YanBo
@ 2014-11-25 14:18           ` Johannes Berg
  2014-11-25 15:09             ` Arend van Spriel
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-11-25 14:18 UTC (permalink / raw)
  To: YanBo; +Cc: linux-wireless

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 14:18           ` Johannes Berg
@ 2014-11-25 15:09             ` Arend van Spriel
  0 siblings, 0 replies; 10+ messages in thread
From: Arend van Spriel @ 2014-11-25 15:09 UTC (permalink / raw)
  To: Johannes Berg; +Cc: YanBo, linux-wireless

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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
  2014-11-25 14:49 YanBo
@ 2014-11-25 15:17 ` Johannes Berg
  0 siblings, 0 replies; 10+ messages in thread
From: Johannes Berg @ 2014-11-25 15:17 UTC (permalink / raw)
  To: YanBo; +Cc: linux-wireless, j, Kalle Valo


> 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests
@ 2014-11-25 14:49 YanBo
  2014-11-25 15:17 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: YanBo @ 2014-11-25 14:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, j, Kalle Valo

On Tue, Nov 25, 2014 at 10:18 PM, Johannes Berg
<johannes@sipsolutions.net> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-11-25 15:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-25 10:23 [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests Johannes Berg
2014-11-25 11:00 ` YanBo
2014-11-25 11:04   ` Johannes Berg
2014-11-25 11:10     ` YanBo
2014-11-25 12:07       ` Johannes Berg
2014-11-25 14:13         ` YanBo
2014-11-25 14:18           ` Johannes Berg
2014-11-25 15:09             ` Arend van Spriel
2014-11-25 14:49 YanBo
2014-11-25 15:17 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).