All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 3/5] mac80211: check if HT40+/- is allowed before sending assoc
Date: Tue, 7 Apr 2009 09:23:45 -0700	[thread overview]
Message-ID: <20090407162345.GC5758@tesla> (raw)
In-Reply-To: <1239099071.22453.12.camel@johannes.local>

On Tue, Apr 07, 2009 at 03:11:11AM -0700, Johannes Berg wrote:
> On Mon, 2009-04-06 at 16:15 -0400, Luis R. Rodriguez wrote:
> > We weren't checking this at all.
> > 
> > Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> > ---
> >  net/mac80211/ht.c |    8 ++++++--
> >  1 files changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
> > index 4e3c72f..967367c 100644
> > --- a/net/mac80211/ht.c
> > +++ b/net/mac80211/ht.c
> > @@ -122,10 +122,14 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
> >  		    (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
> >  			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;
> 
> This patch is not sufficient -- you also need to modify
> ieee80211_send_assoc. Otherwise we end up telling the AP that we support
> HT40, but tuning the hardware to HT20.

Like this?

                switch (ht_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
                case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                        if (flags & IEEE80211_CHAN_NO_HT40PLUS) {
                                cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
                                cap &= ~IEEE80211_HT_CAP_SGI_40;
                        }
                        break;
                case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
                        if (flags & IEEE80211_CHAN_NO_HT40MINUS) {
                                cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
                                cap &= ~IEEE80211_HT_CAP_SGI_40;
                        }
                    
  Luis 

  reply	other threads:[~2009-04-07 16:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 20:15 [PATCH v2 0/5] wireless: listen to reg bw preferences Luis R. Rodriguez
2009-04-06 20:15 ` [PATCH v2 1/5] cfg80211: Process regulatory max bandwidth checks for HT40 Luis R. Rodriguez
2009-04-07 10:08   ` Johannes Berg
2009-04-07 16:10     ` Luis R. Rodriguez
2009-04-06 20:15 ` [PATCH v2 2/5] wireless: rename IEEE80211_CHAN_NO_FAT_* to HT40-/+ Luis R. Rodriguez
2009-04-06 20:15 ` [PATCH v2 3/5] mac80211: check if HT40+/- is allowed before sending assoc Luis R. Rodriguez
2009-04-07 10:11   ` Johannes Berg
2009-04-07 16:23     ` Luis R. Rodriguez [this message]
2009-04-07 19:09       ` Johannes Berg
2009-04-07 20:38         ` Luis R. Rodriguez
2009-04-07 20:41           ` Johannes Berg
2009-04-07 20:44             ` Luis R. Rodriguez
2009-04-07 20:53               ` Johannes Berg
2009-04-07 20:59                 ` Luis R. Rodriguez
2009-04-06 20:15 ` [PATCH v2 4/5] cfg80211: check allowed channel type upon userspace requests Luis R. Rodriguez
2009-04-06 20:19   ` Luis R. Rodriguez
2009-04-06 20:15 ` [PATCH v2 5/5] mac80211: expose HT channel flags through debugfs Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090407162345.GC5758@tesla \
    --to=lrodriguez@atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.