Search Linux Wireless

Re: [PATCH v2 6/9] brcm80211: smac: enable/disable radio on regulatory updates

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

 



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.

Gr. AvS

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