Search Linux Wireless

Re: [RFC 1/3] cfg80211: provide channel to join_mesh function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux