diff options
author | Luis R. Rodriguez <[email protected]> | 2013-10-29 19:34:25 +0100 |
---|---|---|
committer | John W. Linville <[email protected]> | 2013-12-05 14:54:49 -0500 |
commit | 685cc47174f730e68867d83b7db5e36283255e6d (patch) | |
tree | d5442c63fdfd27e2ce037c61ba674ab1700a7b2c | |
parent | cf1ad8f94766a22b55f6515ac28b8edb0504e1d6 (diff) |
brcm80211: fix usage of freq_reg_info()
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 <[email protected]>
Cc: Peter Senna Tschudin <[email protected]>
Cc: Seth Forshee <[email protected]>
Cc: Arend van Spriel <[email protected]>
Reported-by: Mihir Shete <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
Acked-by: Arend van Spriel <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index ef05df04136b..635ae034c7e5 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c @@ -679,7 +679,8 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy, continue; if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) { - rule = freq_reg_info(wiphy, ch->center_freq); + rule = freq_reg_info(wiphy, + MHZ_TO_KHZ(ch->center_freq)); if (IS_ERR(rule)) continue; |