Search Linux Wireless

Re: [PATCH v2 3/5] cfg80211: Add AP beacon regulatory hints

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

 



On Mon, 2009-02-23 at 18:29 -0800, Luis R. Rodriguez wrote:
> On Mon, Feb 23, 2009 at 05:58:50PM -0800, Johannes Berg wrote:
> > On Sat, 2009-02-21 at 00:20 -0500, Luis R. Rodriguez 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))
> > > +		return true;
> > > +	return false;
> > > +}
> > > +
> > > +int regulatory_hint_found_beacon(struct wiphy *wiphy,
> > > +				 struct ieee80211_channel *beacon_chan,
> > > +				 gfp_t gfp)
> > > +{
> > > +	struct reg_beacon *reg_beacon;
> > > +
> > > +	if (likely((beacon_chan->beacon_found ||
> > > +	    (beacon_chan->flags & IEEE80211_CHAN_RADAR) ||
> > > +	    (beacon_chan->band == IEEE80211_BAND_2GHZ &&
> > > +	     !freq_is_chan_12_13_14(beacon_chan->center_freq)))))
> > > +		return 0;
> > 
> > This doesn't seem right, shouldn't it use the world regulatory domain to
> > check against rather than hardcoding it?
> 
> I'm not sure I understand, can you elaborate on what you mean.

Well this looks like a check "is it outside the world regulatory domain
but in 2.4 ghz", right? So it should check the world regulatory domain,
rather than hardcoding?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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