Skip to content

wireless: fix usage of freq_reg_info()

Luis R. Rodriguez linux-wireless 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ath: fix usage of freq_reg_info()drivers/net/wireless/ath/regd.c+1 -10 replies
2/3brcm80211: fix usage of freq_reg_info()drivers/net/wireless/brcm80211/brcmsmac/channel.c+2 -11 reply
3/3rtlwifi: fix usage of freq_reg_info()drivers/net/wireless/rtlwifi/regd.c+4 -31 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchLarry FingerArend van Spriel
1/3
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] wireless: fix usage of freq_reg_info()

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(-)
Signature · 1 line
1.8.4.rc3