Search Linux Wireless

Re: [PATCH 02/10] cfg80211: validate 6 GHz chandef

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

 



> > > +static enum nl80211_chan_width cfg80211_chan_to_bw_6ghz(u8 idx)
> > > +{
> > > +	/* channels: 1, 5, 9, 13... */
> > > +	if ((idx & 0x3) == 0x1)
> > > +		return NL80211_CHAN_WIDTH_20;
> > > +	/* channels 3, 11, 19... */
> > > +	if ((idx & 0x7) == 0x3)
> > > +		return NL80211_CHAN_WIDTH_40;
> > > +	/* channels 7, 23, 39.. */
> > > +	if ((idx & 0xf) == 0x7)
> > > +		return NL80211_CHAN_WIDTH_80;
> > > +	/* channels 15, 47, 79...*/
> > > +	if ((idx & 0x1f) == 0xf)
> > > +		return NL80211_CHAN_WIDTH_160;
> > > +
> > > +	return NL80211_CHAN_WIDTH_20;
> > > +}
> > 
> > We haven't really done that for anything else - is that really
> > necessary?
> > 
> Hmm.. to check whether give center_freq1 chan_idx is allowed to operate 
> in given bandwidth.
> Similar to center_idx_to_bw_6ghz of hostapd, this API is used to chandef 
> bw.

Yeah, but good enough if hostapd does that check? I don't really see the
kernel caring too much?

> Don't we have to check chandef bw? If not, I will drop the change.

I'm not really sure why we should, tbh.

johannes




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

  Powered by Linux