diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 016b697d2..30a90c0b9 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -866,6 +866,8 @@ struct wpa_driver_capa { #define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000 /* Driver supports IBSS (Ad-hoc) mode */ #define WPA_DRIVER_FLAGS_IBSS 0x08000000 +/* Driver supports radar detection */ +#define WPA_DRIVER_FLAGS_RADAR 0x10000000 unsigned int flags; int max_scan_ssids; diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 0a1cac6e7..a28086c99 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2680,6 +2680,7 @@ static int wiphy_info_iface_comb_process(struct wiphy_info_data *info, [NL80211_IFACE_COMB_MAXNUM] = { .type = NLA_U32 }, [NL80211_IFACE_COMB_STA_AP_BI_MATCH] = { .type = NLA_FLAG }, [NL80211_IFACE_COMB_NUM_CHANNELS] = { .type = NLA_U32 }, + [NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS] = { .type = NLA_U32 }, }, iface_limit_policy[NUM_NL80211_IFACE_LIMIT] = { [NL80211_IFACE_LIMIT_TYPES] = { .type = NLA_NESTED }, @@ -2693,6 +2694,9 @@ static int wiphy_info_iface_comb_process(struct wiphy_info_data *info, !tb_comb[NL80211_IFACE_COMB_NUM_CHANNELS]) return 0; /* broken combination */ + if (tb_comb[NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS]) + info->capa->flags |= WPA_DRIVER_FLAGS_RADAR; + nla_for_each_nested(nl_limit, tb_comb[NL80211_IFACE_COMB_LIMITS], rem_limit) { err = nla_parse_nested(tb_limit, MAX_NL80211_IFACE_LIMIT,