From: Lorenzo Bianconi Date: Mon, 20 Dec 2021 15:48:19 +0000 (+0100) Subject: nl80211: Report background radar/CAC detection capability X-Git-Tag: hostap_2_11~2194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=203a027b2876faf1ea1fbdfeff5aada49a02658f;p=thirdparty%2Fhostap.git nl80211: Report background radar/CAC detection capability Report background radar/CAC detection capability if supported by the underlying driver/hardware. Tested-by: Owen Peng Signed-off-by: Lorenzo Bianconi --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index ebc550fbe..e3b4262b5 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -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) \ diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 200c545c2..47765fe40 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -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; }