summaryrefslogtreecommitdiffstats
path: root/include/net/regulatory.h
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@adapt-ip.com>2020-04-02 03:18:02 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-04-24 12:33:43 +0200
commitb572510100165ba037ba43dbbb0f05e8da12c741 (patch)
tree417043581dccf5f926c048cb6c6df52b5ccfd3ce /include/net/regulatory.h
parentmac80211_hwsim: indicate in IBSS that we have transmitted beacons (diff)
downloadlinux-b572510100165ba037ba43dbbb0f05e8da12c741.tar.xz
linux-b572510100165ba037ba43dbbb0f05e8da12c741.zip
ieee80211: share 802.11 unit conversion helpers
MHZ_TO_KHZ, and KHZ_TO_MHZ are useful to drivers and elsewhere so export these in the common ieee80211 header. Move the power helpers also because we might as well. Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com> Link: https://lore.kernel.org/r/20200402011810.22947-2-thomas@adapt-ip.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/regulatory.h')
-rw-r--r--include/net/regulatory.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index 3469750df0f4..09a3099886e5 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -231,13 +231,6 @@ struct ieee80211_regdomain {
struct ieee80211_reg_rule reg_rules[];
};
-#define MHZ_TO_KHZ(freq) ((freq) * 1000)
-#define KHZ_TO_MHZ(freq) ((freq) / 1000)
-#define DBI_TO_MBI(gain) ((gain) * 100)
-#define MBI_TO_DBI(gain) ((gain) / 100)
-#define DBM_TO_MBM(gain) ((gain) * 100)
-#define MBM_TO_DBM(gain) ((gain) / 100)
-
#define REG_RULE_EXT(start, end, bw, gain, eirp, dfs_cac, reg_flags) \
{ \
.freq_range.start_freq_khz = MHZ_TO_KHZ(start), \