On Wed, Jun 13, 2012 at 11:28:39AM +0200, Arend van Spriel wrote: > On 06/05/2012 04:34 PM, Seth Forshee wrote: > > Currently the radio disable state is only updated during initialization, > > and it's only checked against the internal world domain. This is > > unnecessary, as there are always valid channels against this domain. > > Instead, check whether any channels are enabled in the regulatory > > notifier and update the radio state accordingly. > > > > Reviewed-by: Arend Van Spriel <arend@xxxxxxxxxxxx> > > Reviewed-by: Pieter-Paul Giesberts <pieterpg@xxxxxxxxxxxx> > > Signed-off-by: Seth Forshee <seth.forshee@xxxxxxxxxxxxx> > > --- > > drivers/net/wireless/brcm80211/brcmsmac/channel.c | 67 ++++++++------------- > > 1 file changed, 26 insertions(+), 41 deletions(-) > > > > diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c > > index 65ef60b..7182b58 100644 > > --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c > > +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c > > @@ -1235,12 +1194,38 @@ static int brcms_reg_notifier(struct wiphy *wiphy, > > + > > + if (likely(ch_found)) { > > + mboolclr(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); > > + } else { > > + mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE); > > + wiphy_err(wlc->wiphy, "wl%d: %s: no valid channel for \"%s\"\n", > > + wlc->pub->unit, __func__, request->alpha2); > > + } > > + > > When we were having fun in staging GregKH indicated that use of likely() > should be justified with profiling data. Probably not really needed here. Okay, I'll remove it. This isn't performance critical code anyhow. -- 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