]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Report background radar/CAC detection capability
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 20 Dec 2021 15:48:19 +0000 (16:48 +0100)
committerJouni Malinen <j@w1.fi>
Thu, 3 Mar 2022 23:17:02 +0000 (01:17 +0200)
Report background radar/CAC detection capability if supported
by the underlying driver/hardware.

Tested-by: Owen Peng <owen.peng@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
src/drivers/driver.h
src/drivers/driver_nl80211_capa.c

index ebc550fbe630a62b2f9732bfc34f77499c23de92..e3b4262b59ca3dccff9448c054d3ddc9ed99b815 100644 (file)
@@ -2029,6 +2029,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS2_AP_SME               0x0000000000000100ULL
 /** Driver handles SA Query procedures in AP mode */
 #define WPA_DRIVER_FLAGS2_SA_QUERY_OFFLOAD_AP  0x0000000000000200ULL
+/** Driver supports background radar/CAC detection */
+#define WPA_DRIVER_RADAR_BACKGROUND            0x0000000000000400ULL
        u64 flags2;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
index 200c545c2b700eea2ef7aa967f645c6e32cbeda9..47765fe4033feb93ef5279167166db92ad3878f8 100644 (file)
@@ -665,6 +665,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
        if (ext_feature_isset(ext_features, len,
                              NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION))
                capa->flags2 |= WPA_DRIVER_FLAGS2_OCV;
+
+       if (ext_feature_isset(ext_features, len,
+                             NL80211_EXT_FEATURE_RADAR_BACKGROUND))
+               capa->flags2 |= WPA_DRIVER_RADAR_BACKGROUND;
 }