developer | c1498a3 | 2022-06-07 16:14:30 +0800 | [diff] [blame] | 1 | From 5fb4920aa49934d3a602556fbe35ab6ed11374d1 Mon Sep 17 00:00:00 2001 |
| 2 | From: dzou <dzou@company.com> |
| 3 | Date: Sun, 5 Jun 2022 23:17:28 +0800 |
| 4 | Subject: [PATCH 902/911] nl80211: Report background radar/CAC detection |
| 5 | capability |
| 6 | |
| 7 | Report background radar/CAC detection capability if supported |
| 8 | by the underlying driver/hardware. |
| 9 | |
| 10 | Tested-by: Owen Peng <owen.peng@mediatek.com> |
| 11 | Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> |
| 12 | --- |
| 13 | src/drivers/driver.h | 2 ++ |
| 14 | src/drivers/driver_nl80211_capa.c | 4 ++++ |
| 15 | 2 files changed, 6 insertions(+) |
| 16 | |
| 17 | diff --git a/src/drivers/driver.h b/src/drivers/driver.h |
| 18 | index 44304d487..68964c9d5 100644 |
| 19 | --- a/src/drivers/driver.h |
| 20 | +++ b/src/drivers/driver.h |
| 21 | @@ -2032,6 +2032,8 @@ struct wpa_driver_capa { |
| 22 | #define WPA_DRIVER_FLAGS2_OCV 0x0000000000000080ULL |
| 23 | /** Driver expects user space implementation of SME in AP mode */ |
| 24 | #define WPA_DRIVER_FLAGS2_AP_SME 0x0000000000000100ULL |
| 25 | +/** Driver supports background radar/CAC detection */ |
| 26 | +#define WPA_DRIVER_RADAR_BACKGROUND 0x0000000000000400ULL |
| 27 | u64 flags2; |
| 28 | |
| 29 | #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \ |
| 30 | diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c |
| 31 | index 83868b78e..05703ec64 100644 |
| 32 | --- a/src/drivers/driver_nl80211_capa.c |
| 33 | +++ b/src/drivers/driver_nl80211_capa.c |
| 34 | @@ -665,6 +665,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info, |
| 35 | if (ext_feature_isset(ext_features, len, |
| 36 | NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION)) |
| 37 | capa->flags2 |= WPA_DRIVER_FLAGS2_OCV; |
| 38 | + |
| 39 | + if (ext_feature_isset(ext_features, len, |
| 40 | + NL80211_EXT_FEATURE_RADAR_BACKGROUND)) |
| 41 | + capa->flags2 |= WPA_DRIVER_RADAR_BACKGROUND; |
| 42 | } |
| 43 | |
| 44 | |
| 45 | -- |
| 46 | 2.29.2 |
| 47 | |