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.
Showing the changes to include/linux (1 of 6 files). Show all
Unified · Split
| @@ -3333,6 +3333,8 @@ static inline int ieee80211_get_tdls_action(struct sk_buff *skb, u32 hdr_size) · 3332 unmodified lines | |||
| 3333 | /* convert frequencies */ | 3333 | /* convert frequencies */ |
| 3334 | #define MHZ_TO_KHZ(freq) ((freq) * 1000) | 3334 | #define MHZ_TO_KHZ(freq) ((freq) * 1000) |
| 3335 | #define KHZ_TO_MHZ(freq) ((freq) / 1000) | 3335 | #define KHZ_TO_MHZ(freq) ((freq) / 1000) |
| 3336 | #define PR_KHZ(f) KHZ_TO_MHZ(f), f % 1000 | ||
| 3337 | #define KHZ_F "%d.%03d" | ||
| 3336 | 3338 | ||
| 3337 | /* convert powers */ | 3339 | /* convert powers */ |
| 3338 | #define DBI_TO_MBI(gain) ((gain) * 100) | 3340 | #define DBI_TO_MBI(gain) ((gain) * 100) |