linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] wireless: fix usage of freq_reg_info()
@ 2013-10-29 18:34 Luis R. Rodriguez
  2013-10-29 18:34 ` [PATCH 1/3] ath: " Luis R. Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Luis R. Rodriguez @ 2013-10-29 18:34 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez

Mihir reported freq_reg_info() was being used incorrectly on
ath/regd.c, I spotted this was true for years, and given that
a few vendors copied the same behaviour it meant other drivers
also had this broken. This fixes this issue accross 3 drivers.

These patches depend on the no-ir patches, and depending
on what tree that goes in this may be desirable to be merged
there.

The fix is represented with the Coccinelle SmPL grammar:

@@
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));

Luis R. Rodriguez (3):
  ath: fix usage of freq_reg_info()
  brcm80211: fix usage of freq_reg_info()
  rtlwifi: fix usage of freq_reg_info()

 drivers/net/wireless/ath/regd.c                   | 2 +-
 drivers/net/wireless/brcm80211/brcmsmac/channel.c | 3 ++-
 drivers/net/wireless/rtlwifi/regd.c               | 7 ++++---
 3 files changed, 7 insertions(+), 5 deletions(-)

-- 
1.8.4.rc3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-30  9:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).