ath: fix usage of freq_reg_info()
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 29 Oct 2013 18:34:24 +0000 (19:34 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Dec 2013 20:44:59 +0000 (15:44 -0500)
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>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/regd.c

index b02b43e690d9624a7f8caf25c674431c99282084..3baafa5b8ce0330b54d82d3a91c5e7c895fd3f99 100644 (file)
@@ -183,7 +183,7 @@ static void ath_force_clear_no_ir_chan(struct wiphy *wiphy,
 {
        const struct ieee80211_reg_rule *reg_rule;
 
-       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))
                return;