linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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
* [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

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 14:49 [PATCH] mac80211: check if channels allow 80 MHz for VHT probe requests YanBo
2014-11-25 15:17 ` Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2014-11-25 10:23 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

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).