All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	linville@tuxdriver.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Julia Lawall <julia.lawall@lip6.fr>,
	Peter Senna Tschudin <peter.senna@gmail.com>
Subject: Re: [PATCH 3/3] rtlwifi: fix usage of freq_reg_info()
Date: Tue, 29 Oct 2013 13:56:21 -0500	[thread overview]
Message-ID: <527004D5.8050009@lwfinger.net> (raw)
In-Reply-To: <1383071666-26817-4-git-send-email-mcgrof@do-not-panic.com>

On 10/29/2013 01:34 PM, Luis R. Rodriguez wrote:
> freq_reg_info() expects KHz and not MHz, fix this. In
> this case we'll now be getting the no-ir flags cleared
> on channels for any channel when the country IE trusts
> that channel.
>
> @@
> struct ieee80211_channel *ch;
> struct wiphy *wiphy;
> const struct ieee80211_reg_rule *rule;
> @@
>
> -rule = freq_reg_info(wiphy, ch->center_freq);
> +rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));
>
> Generated-by: Coccinelle SmPL
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Cc: Peter Senna Tschudin <peter.senna@gmail.com>
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
> ---

This patch got some fuzz on my system in hunks 2 & 3 and failed "git am". With 
patch, it yielded correct code despite the fuzz.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry

>   drivers/net/wireless/rtlwifi/regd.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/regd.c b/drivers/net/wireless/rtlwifi/regd.c
> index 2e1642c..29d2813 100644
> --- a/drivers/net/wireless/rtlwifi/regd.c
> +++ b/drivers/net/wireless/rtlwifi/regd.c
> @@ -169,7 +169,8 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy,
>   			    (ch->flags & IEEE80211_CHAN_RADAR))
>   				continue;
>   			if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
> -				reg_rule = freq_reg_info(wiphy, ch->center_freq);
> +				reg_rule = freq_reg_info(wiphy,
> +							 MHZ_TO_KHZ(ch->center_freq));
>   				if (IS_ERR(reg_rule))
>   					continue;
>
> @@ -228,7 +229,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
>   	 */
>
>   	ch = &sband->channels[11];	/* CH 12 */
> -	reg_rule = freq_reg_info(wiphy, ch->center_freq);
> +	reg_rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));
>   	if (!IS_ERR(reg_rule)) {
>   		if (!(reg_rule->flags & NL80211_RRF_NO_IR))
>   			if (ch->flags & IEEE80211_CHAN_NO_IR)
> @@ -236,7 +237,7 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
>   	}
>
>   	ch = &sband->channels[12];	/* CH 13 */
> -	reg_rule = freq_reg_info(wiphy, ch->center_freq);
> +	reg_rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));
>   	if (!IS_ERR(reg_rule)) {
>   		if (!(reg_rule->flags & NL80211_RRF_NO_IR))
>   			if (ch->flags & IEEE80211_CHAN_NO_IR)
>


      reply	other threads:[~2013-10-29 18:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 18:34 [PATCH 0/3] wireless: fix usage of freq_reg_info() Luis R. Rodriguez
2013-10-29 18:34 ` [PATCH 1/3] ath: " Luis R. Rodriguez
2013-10-29 18:34 ` [PATCH 2/3] brcm80211: " Luis R. Rodriguez
2013-10-30  9:10   ` Arend van Spriel
2013-10-29 18:34 ` [PATCH 3/3] rtlwifi: " Luis R. Rodriguez
2013-10-29 18:56   ` Larry Finger [this message]

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=527004D5.8050009@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=johannes@sipsolutions.net \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@do-not-panic.com \
    --cc=peter.senna@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.