Search Linux Wireless

Re: [RFC PATCH 5/8] brcm80211: smac: enable/disable radio on regulatory updates

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

 



On Sat, May 26, 2012 at 12:33:31AM +0200, Arend van Spriel wrote:
> > @@ -1240,12 +1199,37 @@ static int brcms_reg_notifier(struct wiphy *wiphy,
> >  	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
> >  	struct brcms_info *wl = hw->priv;
> >  	struct brcms_c_info *wlc = wl->wlc;
> > +	struct ieee80211_supported_band *sband;
> > +	struct ieee80211_channel *ch;
> > +	int band, i, n_channels = 0;
> >  
> >  	brcms_reg_apply_radar_flags(wiphy);
> >  
> >  	if (request && request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)
> >  		brcms_reg_apply_beaconing_flags(wiphy, request->initiator);
> >  
> > +	/* Disable radio if all channels disallowed by regulatory */
> 
> I think we need to validate the channels against our phy as well. See
> brcms_c_channels_init().

I disable channels not supported by the phy in brcms_c_regd_init(), so
it's not necessary to check it again here.

> > +	for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
> > +		sband = wiphy->bands[band];
> > +		if (!sband)
> > +			continue;
> > +
> > +		for (i = 0; i < sband->n_channels; i++) {
> > +			ch = &sband->channels[i];
> > +
> > +			if (!(ch->flags & IEEE80211_CHAN_DISABLED))
> > +				n_channels++;
> 
> could break here when a valid channel is found.

Ack, I'll do that.

--
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