wifi: cfg80211: optionally support monitor on disabled channels
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 Feb 2024 14:54:08 +0000 (16:54 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 12 Feb 2024 20:22:48 +0000 (21:22 +0100)
commita110a3b79177ddd7e7295671df97fb5386406835
treed5d74b7887917dcb1d19073485a0cd9f9fcad89b
parent7b5e25b8baebc02db728bfbdc3080be863144c7b
wifi: cfg80211: optionally support monitor on disabled channels

If the hardware supports a disabled channel, it may in
some cases be possible to use monitor mode (without any
transmit) on it when it's otherwise disabled. Add a new
channel flag IEEE80211_CHAN_CAN_MONITOR that makes it
possible for a driver to indicate such a thing.

Make it per channel so drivers could have a choice with
it, perhaps it's only possible on some channels, perhaps
some channels are not supported at all, but still there
and marked disabled.

In _nl80211_parse_chandef() simplify the code and check
only for an unknown channel, _cfg80211_chandef_usable()
will later check for IEEE80211_CHAN_DISABLED anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240206164849.87fad3a21a09.I9116b2fdc2e2c9fd59a9273a64db7fcb41fc0328@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
include/uapi/linux/nl80211.h
net/wireless/chan.c
net/wireless/core.h
net/wireless/nl80211.c