cfg80211: express channels with a KHz component
authorThomas Pedersen <thomas@adapt-ip.com>
Thu, 2 Apr 2020 01:18:03 +0000 (18:18 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 Apr 2020 10:33:43 +0000 (12:33 +0200)
commit934f4c7dd3a544bb8000f7436f1f0e12e04ebc37
tree3a852cedb96aa510836d1f1fe5810297fbeac29e
parentb572510100165ba037ba43dbbb0f05e8da12c741
cfg80211: express channels with a KHz component

Some bands (S1G) define channels centered on a non-integer
MHz. Give ieee80211_channel and cfg80211_chan_def a
freq_offset component where the final frequency can be
expressed as:

MHZ_TO_KHZ(chan->center_freq) + chan->freq_offset;

Also provide some helper functions to do the frequency
conversion and test for equality.

Retain the existing interface to frequency and channel
conversion helpers, and expose new ones which handle
frequencies in units of KHz.

Some internal functions (net/wireless/chan.c) pass around
a frequency value. Convert these to units of KHz.

mesh, ibss, wext, etc. are currently ignored.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20200402011810.22947-3-thomas@adapt-ip.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/chan.c
net/wireless/reg.c
net/wireless/scan.c
net/wireless/trace.h
net/wireless/util.c