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.
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -4273,6 +4273,9 @@ enum nl80211_wmm_rule { · 4272 unmodified lines | ||
| 4273 | 4273 | * not allowed using this channel |
| 4274 | 4274 | * @NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT: Client connection to AFC AP |
| 4275 | 4275 | * not allowed using this channel |
| 4276 | + * @NL80211_FREQUENCY_ATTR_CAN_MONITOR: This channel can be used in monitor | |
| 4277 | + * mode despite other (regulatory) restrictions, even if the channel is | |
| 4278 | + * otherwise completely disabled. | |
| 4276 | 4279 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
| 4277 | 4280 | * currently defined |
| 4278 | 4281 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
| @@ -4315,6 +4318,7 @@ enum nl80211_frequency_attr { · 36 unmodified lines | ||
| 4315 | 4318 | NL80211_FREQUENCY_ATTR_DFS_CONCURRENT, |
| 4316 | 4319 | NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT, |
| 4317 | 4320 | NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT, |
| 4321 | + NL80211_FREQUENCY_ATTR_CAN_MONITOR, | |
| 4318 | 4322 | |
| 4319 | 4323 | /* keep last */ |
| 4320 | 4324 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, |