History

cfg80211: add KHz variants of frame RX API

Drivers may wish to report the RX frequency in units of KHz. Provide cfg80211_rx_mgmt_khz() and wrap it with cfg80211_rx_mgmt() so exisiting drivers which can't report KHz anyway don't need to change. Add a similar wrapper for cfg80211_report_obss_beacon() so the frequency units stay somewhat consistent. This doesn't actually change the nl80211 API yet.

Thomas Pedersen committed 6 years ago

Commit e76fede1 parent c0336956 files · +71 −23Browse files

Showing the changes to include/linux (1 of 6 files). Show all

Unified · Split

include/linux/ieee80211.h+2−0
@@ -3333,6 +3333,8 @@ static inline int ieee80211_get_tdls_action(struct sk_buff *skb, u32 hdr_size) · 3332 unmodified lines
33333333 /* convert frequencies */
33343334 #define MHZ_TO_KHZ(freq) ((freq) * 1000)
33353335 #define KHZ_TO_MHZ(freq) ((freq) / 1000)
3336+#define PR_KHZ(f) KHZ_TO_MHZ(f), f % 1000
3337+#define KHZ_F "%d.%03d"
33363338
33373339 /* convert powers */
33383340 #define DBI_TO_MBI(gain) ((gain) * 100)