brcm80211: fix usage of freq_reg_info()
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 29 Oct 2013 18:34:25 +0000 (19:34 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Dec 2013 19:54:49 +0000 (14:54 -0500)
commit685cc47174f730e68867d83b7db5e36283255e6d
treed5442c63fdfd27e2ce037c61ba674ab1700a7b2c
parentcf1ad8f94766a22b55f6515ac28b8edb0504e1d6
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 <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Arend van Spriel <arend@broadcom.com>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/channel.c