linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFCv2 1/6] mac80211: ibss, fix chandef setup for HT40
Date: Fri, 16 Jan 2015 12:47:43 +0100	[thread overview]
Message-ID: <1421408863.9214.7.camel@sipsolutions.net> (raw)
In-Reply-To: <CALhHN=payu27bPU+G5txsFkm6N=w_FL+LA8dVZAO96bwXXqiAg@mail.gmail.com> (sfid-20150116_122423_433250_51B24379)

On Fri, 2015-01-16 at 12:24 +0100, Janusz Dziedzic wrote:
> On 16 January 2015 at 11:49, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Fri, 2015-01-16 at 11:38 +0100, Janusz Dziedzic wrote:
> >> In some cases when used HT40+/HT40-, center_freq1
> >> was configured incorrectly. Next this couse
> >
> > couse?
> >
> >> @@ -407,10 +407,15 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
> >>       switch (sdata->u.ibss.chandef.width) {
> >>       case NL80211_CHAN_WIDTH_20_NOHT:
> >>       case NL80211_CHAN_WIDTH_20:
> >> -     case NL80211_CHAN_WIDTH_40:
> >>               chan_type = cfg80211_get_chandef_type(&sdata->u.ibss.chandef);
> >>               cfg80211_chandef_create(&chandef, cbss->channel, chan_type);
> >>               break;
> >
> > Sorry, I don't see the bug. "Sometimes"?
> >
> > cfg80211_get_chandef_type() will return HT40+/- correctly according to
> > the chandef, and then you'll use it again to create the chandef - should be OK.
> >
> >> +       case NL80211_CHAN_WIDTH_40:
> >> +               cfg80211_chandef_create(&chandef, cbss->channel,
> >> +                                       NL80211_CHAN_WIDTH_20_NOHT);
> >> +               chandef.width = sdata->u.ibss.chandef.width;
> >> +               chandef.center_freq1 =
> >> sdata->u.ibss.chandef.center_freq1;
> >> +               break;
> >
> > Please don't mix chantype stuff and chandef stuff ... just create the
> > chandef manually if you must. I really think the code above should have
> > worked though, unless it's using the wrong inputs somehow.
> >
> This is scenario:
> 
> 1) first ibss HT20 run on 5180
> 2) second ibss configured HT40+ using 36 channel
> 3) supplicant detect OBSS and decide to switch 40 and HT40-
> 4) this code confgure chandef->center_freq1 = 5170
> 5) reg_can_beacon() then fail and we fall back to NOHT_20

Sounds more like we store and use invalid data?

johannes


  reply	other threads:[~2015-01-16 11:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 10:38 [RFCv2 1/6] mac80211: ibss, fix chandef setup for HT40 Janusz Dziedzic
2015-01-16 10:38 ` [RFCv2 2/6] cfg80211: add VHT support for IBSS Janusz Dziedzic
2015-01-16 10:38 ` [RFCv2 3/6] mac80211: " Janusz Dziedzic
2015-01-16 10:52   ` Johannes Berg
2015-01-16 10:38 ` [RFCv2 4/6] mac80211: IBSS fix scan request Janusz Dziedzic
2015-01-16 10:38 ` [RFCv2 5/6] mac80211: ibss/mesh move bw checking Janusz Dziedzic
2015-01-16 10:38 ` [RFCv2 6/6] mac80211: IBSS setup correctly BW for VHT Janusz Dziedzic
2015-01-16 10:55   ` Johannes Berg
2015-01-16 12:08     ` Janusz Dziedzic
2015-01-16 12:18       ` Johannes Berg
2015-01-16 12:48         ` Janusz Dziedzic
2015-01-16 10:49 ` [RFCv2 1/6] mac80211: ibss, fix chandef setup for HT40 Johannes Berg
2015-01-16 11:24   ` Janusz Dziedzic
2015-01-16 11:47     ` Johannes Berg [this message]
2015-01-16 12:18       ` Janusz Dziedzic

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=1421408863.9214.7.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=janusz.dziedzic@tieto.com \
    --cc=linux-wireless@vger.kernel.org \
    /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 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).