linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: linux-wireless@vger.kernel.org, Dan Williams <dcbw@redhat.com>
Subject: Re: [RFC 1/3] cfg80211: provide channel to join_mesh function
Date: Fri, 11 May 2012 21:15:38 +0200	[thread overview]
Message-ID: <1336763738.8739.5.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAG6hwVPgTOc_VtE2NaNcOTh6xTn_zBso7UOoN=_Tn4M7asG3dA@mail.gmail.com> (sfid-20120511_211142_933904_6314CEC0)

On Fri, 2012-05-11 at 12:10 -0700, Thomas Pedersen wrote:

> > +       if (!setup->channel) {
> > +               /* if we don't have that either, use the first usable channel */
> > +               enum ieee80211_band band;
> > +
> > +               for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
> > +                       struct ieee80211_supported_band *sband;
> > +                       struct ieee80211_channel *chan;
> > +                       int i;
> > +
> > +                       sband = rdev->wiphy.bands[band];
> > +                       if (!sband)
> > +                               continue;
> > +
> > +                       for (i = 0; i < sband->n_channels; i++) {
> > +                               chan = &sband->channels[i];
> > +                               if (chan->flags & (IEEE80211_CHAN_NO_IBSS |
> > +                                                  IEEE80211_CHAN_PASSIVE_SCAN |
> > +                                                  IEEE80211_CHAN_DISABLED |
> > +                                                  IEEE80211_CHAN_RADAR))
> > +                                       continue;
> > +                               setup->channel = chan;
> > +                               break;
> > +                       }
> > +
> > +                       if (setup->channel)
> > +                               break;
> > +               }
> > +
> > +               /* no usable channel ... */
> > +               if (!setup->channel)
> > +                       return -EINVAL;
> > +
> > +               setup->channel_type = NL80211_CHAN_NO_HT;
> 
> Can we make the default channel type HT20 if the band supports it? The
> HT mixed-mode protection implementation in mesh currently only
> considers mesh peers, so maybe this isn't acceptable, but it would be
> nice.

I can't say I care. I even considered just removing this code, but I
suspect that somebody might try to join a mesh without ever setting any
channel, and mac80211 would assign one (essentially at random.)

johannes


  reply	other threads:[~2012-05-11 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 18:08 [RFC 0/3] mesh/wds channel changes & clarifications Johannes Berg
2012-05-11 18:08 ` [RFC 1/3] cfg80211: provide channel to join_mesh function Johannes Berg
2012-05-11 19:10   ` Thomas Pedersen
2012-05-11 19:15     ` Johannes Berg [this message]
2012-05-11 18:08 ` [RFC 2/3] cfg80211: disallow setting channel on WDS interfaces Johannes Berg
2012-05-11 18:08 ` [RFC 3/3] cfg80211: clarify set_channel APIs Johannes Berg

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=1336763738.8739.5.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=dcbw@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=thomas@cozybit.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 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).