wifi: ieee80211: introduce generic KHZ_TO_HZ helper

Useful for S1G drivers due to the increased required granularity,
but may be useful for others so include it as a generic helper.

Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20260626063014.1275235-3-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Lachlan Hodges 2026-06-26 16:28:58 +10:00 committed by Johannes Berg
parent 1c29c67bc7
commit cc61825060

View File

@ -2616,6 +2616,7 @@ static inline int ieee80211_get_tdls_action(struct sk_buff *skb)
/* convert frequencies */
#define MHZ_TO_KHZ(freq) ((freq) * 1000)
#define KHZ_TO_MHZ(freq) ((freq) / 1000)
#define KHZ_TO_HZ(x) ((x) * 1000)
#define PR_KHZ(f) KHZ_TO_MHZ(f), f % 1000
#define KHZ_F "%d.%03d"