linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Seth Forshee" <seth.forshee@canonical.com>
Cc: linux-wireless@vger.kernel.org,
	"Brett Rudley" <brudley@broadcom.com>,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
	"Kan Yan" <kanyan@broadcom.com>,
	"Pieter-Paul Giesberts" <pieterpg@broadcom.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH v2 6/9] brcm80211: smac: enable/disable radio on regulatory updates
Date: Wed, 13 Jun 2012 11:28:39 +0200	[thread overview]
Message-ID: <4FD85D47.8070609@broadcom.com> (raw)
In-Reply-To: <1338906849-26135-7-git-send-email-seth.forshee@canonical.com>

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@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
>  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


  reply	other threads:[~2012-06-13  9:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05 14:34 [PATCH v2 0/9] brcm80211: smac: rework regulatory support Seth Forshee
2012-06-05 14:34 ` [PATCH v2 1/9] brcm80211: smac: don't set up tx power limits during initialization Seth Forshee
2012-06-05 14:34 ` [PATCH v2 2/9] brcm80211: smac: always set channel specified by mac80211 Seth Forshee
2012-06-05 14:34 ` [PATCH v2 3/9] brcm80211: smac: remove unused code for 40MHz channels Seth Forshee
2012-06-13 15:37   ` Seth Forshee
2012-06-13 15:49     ` Arend van Spriel
2012-06-05 14:34 ` [PATCH v2 4/9] brcm80211: smac: clean up channel.c Seth Forshee
2012-06-05 14:34 ` [PATCH v2 5/9] brcm80211: smac: inform mac80211 of the X2 regulatory domain Seth Forshee
2012-06-05 14:34 ` [PATCH v2 6/9] brcm80211: smac: enable/disable radio on regulatory updates Seth Forshee
2012-06-13  9:28   ` Arend van Spriel [this message]
2012-06-13 13:43     ` Seth Forshee
2012-06-13 14:26       ` Arend van Spriel
2012-06-05 14:34 ` [PATCH v2 7/9] brcm80211: smac: use mac80211 channel data for tx power limits Seth Forshee
2012-06-13  9:39   ` Arend van Spriel
2012-06-13 13:46     ` Seth Forshee
2012-06-13 14:27       ` Arend van Spriel
2012-06-05 14:34 ` [PATCH v2 8/9] brcm80211: smac: don't validate channels against internal regulatory data Seth Forshee
2012-06-05 14:34 ` [PATCH v2 9/9] brcm80211: smac: use current regulatory domain when checking whether OFDM is allowed Seth Forshee
2012-06-12 16:56 ` [PATCH v2 0/9] brcm80211: smac: rework regulatory support Seth Forshee
2012-06-13  9:43 ` Arend van Spriel
2012-06-13 13:50   ` Seth Forshee
2012-06-16 11:57     ` Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD85D47.8070609@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=kanyan@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=pieterpg@broadcom.com \
    --cc=rvossen@broadcom.com \
    --cc=seth.forshee@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).