@@ -6060,6 +6060,9 @@ enum nl80211_feature_flags {
* frames. Userspace has to share FILS AAD details to the driver by using
* @NL80211_CMD_SET_FILS_AAD.
*
+ * @NL80211_EXT_FEATURE_RADAR_OFFCHAN: Device supports offchannel radar/CAC
+ * detection.
+ *
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
*/
@@ -6126,6 +6129,7 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
NL80211_EXT_FEATURE_BSS_COLOR,
NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
+ NL80211_EXT_FEATURE_RADAR_OFFCHAN,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
@@ -1040,6 +1040,10 @@ cfg80211_start_offchan_radar_detection(struct cfg80211_registered_device *rdev,
unsigned int cac_time_ms;
int err = -EBUSY;
+ if (!wiphy_ext_feature_isset(&rdev->wiphy,
+ NL80211_EXT_FEATURE_RADAR_OFFCHAN))
+ return -EOPNOTSUPP;
+
mutex_lock(&rdev->offchan_mutex);
if (rdev->offchan_radar_wdev)
goto out;
Introduce NL80211_EXT_FEATURE_RADAR_OFFCHAN feature flag in order to notify userland the underlay hw supports offchannel radar/CAC detection. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- include/uapi/linux/nl80211.h | 4 ++++ net/wireless/mlme.c | 4 ++++ 2 files changed, 8 insertions(+)