Search Linux Wireless

Re: [PATCH RFC] mac80211: Extend channel to frequency mapping for 802.11j

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

 



On Mon December 27 2010 19:57:39 Johannes Berg wrote:
> On Fri, 2010-12-24 at 16:44 +0900, Bruno Randolf wrote:
> >  static bool freq_is_chan_12_13_14(u16 freq)
> >  {
> > 
> > -	if (freq == ieee80211_channel_to_frequency(12) ||
> > -	    freq == ieee80211_channel_to_frequency(13) ||
> > -	    freq == ieee80211_channel_to_frequency(14))
> > +	if (freq == ieee80211_channel_to_frequency(12, IEEE80211_BAND_2GHZ) ||
> > +	    freq == ieee80211_channel_to_frequency(13, IEEE80211_BAND_2GHZ) ||
> > +	    freq == ieee80211_channel_to_frequency(14, IEEE80211_BAND_2GHZ))
> > 
> >  		return true;
> 
> This seems strange ... why not just hardcode the values??

True, but this is not my code, I just did the change for the new function 
parameter. It's in net/wireless/reg.c, so I'll CC: Luis.

> >  	if (freq->e == 0) {
> > 
> > +		int band = IEEE80211_BAND_2GHZ;
> 
> enum?

Ok, thanks.

Any other comments on the code or purpose of this patch?

bruno
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux