* [PATCH v4 3/6] mac80211: check if HT40+/- is allowed before sending assoc
@ 2009-03-19 6:41 Luis R. Rodriguez
2009-03-20 10:48 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-03-19 6:41 UTC (permalink / raw)
To: linville, johannes, johannes, linville; +Cc: linux-wireless, Luis R. Rodriguez
We weren't checking this at all.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
Another mistake on my part, caught by sujith -- we were disabling HT
completley if NOHT40 was set, we now stick to HT20 when HT40 is not
set.
net/mac80211/ht.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 4e3c72f..9c4faa4 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -119,13 +119,18 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
if (!(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
(sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
- (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
+ (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) &&
+ !(local->hw.conf.channel->flags & IEEE80211_CHAN_NO_HT40)) {
switch(hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
- channel_type = NL80211_CHAN_HT40PLUS;
+ if (!(local->hw.conf.channel->flags &
+ IEEE80211_CHAN_NO_HT40PLUS))
+ channel_type = NL80211_CHAN_HT40PLUS;
break;
case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
- channel_type = NL80211_CHAN_HT40MINUS;
+ if (!(local->hw.conf.channel->flags &
+ IEEE80211_CHAN_NO_HT40MINUS))
+ channel_type = NL80211_CHAN_HT40MINUS;
break;
}
}
--
1.5.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4 3/6] mac80211: check if HT40+/- is allowed before sending assoc
2009-03-19 6:41 [PATCH v4 3/6] mac80211: check if HT40+/- is allowed before sending assoc Luis R. Rodriguez
@ 2009-03-20 10:48 ` Johannes Berg
2009-03-20 14:29 ` Luis R. Rodriguez
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-03-20 10:48 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
On Thu, 2009-03-19 at 02:41 -0400, Luis R. Rodriguez wrote:
> We weren't checking this at all.
The question is whether we really want that. In other places, we trust
the AP, why not here as well?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4 3/6] mac80211: check if HT40+/- is allowed before sending assoc
2009-03-20 10:48 ` Johannes Berg
@ 2009-03-20 14:29 ` Luis R. Rodriguez
2009-03-21 8:02 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-03-20 14:29 UTC (permalink / raw)
To: Johannes Berg
Cc: Luis Rodriguez, linville@tuxdriver.com,
linux-wireless@vger.kernel.org
On Fri, Mar 20, 2009 at 03:48:56AM -0700, Johannes Berg wrote:
> On Thu, 2009-03-19 at 02:41 -0400, Luis R. Rodriguez wrote:
> > We weren't checking this at all.
>
> The question is whether we really want that. In other places, we trust
> the AP, why not here as well?
Its not about trust its also about if it will logistically make sense, for
example you simply cannot use HT40- on channel 11 if yuo don't have
a channel 7. The NO_HT40- would indicate this to us so we don't bother.
The example I give is lousy as its not something that would occur usually
but with 5 GHz and regulatory rules changing things could be a bit
different.
>
> johannes
Luis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4 3/6] mac80211: check if HT40+/- is allowed before sending assoc
2009-03-20 14:29 ` Luis R. Rodriguez
@ 2009-03-21 8:02 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-03-21 8:02 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: Luis Rodriguez, linville@tuxdriver.com,
linux-wireless@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
On Fri, 2009-03-20 at 07:29 -0700, Luis R. Rodriguez wrote:
> On Fri, Mar 20, 2009 at 03:48:56AM -0700, Johannes Berg wrote:
> > On Thu, 2009-03-19 at 02:41 -0400, Luis R. Rodriguez wrote:
> > > We weren't checking this at all.
> >
> > The question is whether we really want that. In other places, we trust
> > the AP, why not here as well?
>
> Its not about trust its also about if it will logistically make sense, for
> example you simply cannot use HT40- on channel 11 if yuo don't have
> a channel 7. The NO_HT40- would indicate this to us so we don't bother.
> The example I give is lousy as its not something that would occur usually
> but with 5 GHz and regulatory rules changing things could be a bit
> different.
Yeah, good point. That's why we need to disassoc from the AP if we
definitely cannot support it -- we cannot change the APs opinion of our
HT40 capabilities. Of course, when we start out not supporting it we can
tell it we don't do HT40.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-21 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19 6:41 [PATCH v4 3/6] mac80211: check if HT40+/- is allowed before sending assoc Luis R. Rodriguez
2009-03-20 10:48 ` Johannes Berg
2009-03-20 14:29 ` Luis R. Rodriguez
2009-03-21 8:02 ` 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).