mac80211: handle channel frequency offset
authorThomas Pedersen <thomas@adapt-ip.com>
Thu, 2 Apr 2020 01:18:04 +0000 (18:18 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 Apr 2020 10:33:43 +0000 (12:33 +0200)
commitb6011960f392d1de619f10aa5d088c27f1e7526c
tree1fdb6bd352b9e6c1ece3528ee1fe1ca07f5c500c
parent934f4c7dd3a544bb8000f7436f1f0e12e04ebc37
mac80211: handle channel frequency offset

cfg80211_chan_def and ieee80211_channel recently gained a
frequency offset component. Handle this where it makes
sense (potentially required by S1G channels).

For IBSS, TDLS, CSA, and ROC we return -EOPNOTSUPP if a
channel with frequency offset is passed, since they may or
may not work. Once someone tests and verifies these
commands work on thos types of channels, we can remove
that error.

join_ocb and join_mesh look harmless because they use a
simple ieee80211_vif_use_channel(), which is using an
already verified channel, so we let those through.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20200402011810.22947-4-thomas@adapt-ip.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/chan.c
net/mac80211/ibss.c
net/mac80211/main.c
net/mac80211/mlme.c
net/mac80211/offchannel.c
net/mac80211/scan.c
net/mac80211/tdls.c
net/mac80211/trace.h