nl80211: Add driver capability flag for radar detection

This patch is based on the original work by Boris Presman and
Victor Goldenshtein. Channel Switch Announcement support has been
removed and event handling as well as channel set handling was
changed, among various other changes.

Cc: Boris Presman <boris.presman@ti.com>
Cc: Victor Goldenshtein <victorg@ti.com>
Signed-hostap: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
This commit is contained in:
Simon Wunderlich 2013-05-09 19:58:55 +03:00 committed by Jouni Malinen
parent 04be54fa09
commit f295d0c86a
2 changed files with 6 additions and 0 deletions

View file

@ -866,6 +866,8 @@ struct wpa_driver_capa {
#define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000 #define WPA_DRIVER_FLAGS_OBSS_SCAN 0x04000000
/* Driver supports IBSS (Ad-hoc) mode */ /* Driver supports IBSS (Ad-hoc) mode */
#define WPA_DRIVER_FLAGS_IBSS 0x08000000 #define WPA_DRIVER_FLAGS_IBSS 0x08000000
/* Driver supports radar detection */
#define WPA_DRIVER_FLAGS_RADAR 0x10000000
unsigned int flags; unsigned int flags;
int max_scan_ssids; int max_scan_ssids;

View file

@ -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_MAXNUM] = { .type = NLA_U32 },
[NL80211_IFACE_COMB_STA_AP_BI_MATCH] = { .type = NLA_FLAG }, [NL80211_IFACE_COMB_STA_AP_BI_MATCH] = { .type = NLA_FLAG },
[NL80211_IFACE_COMB_NUM_CHANNELS] = { .type = NLA_U32 }, [NL80211_IFACE_COMB_NUM_CHANNELS] = { .type = NLA_U32 },
[NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS] = { .type = NLA_U32 },
}, },
iface_limit_policy[NUM_NL80211_IFACE_LIMIT] = { iface_limit_policy[NUM_NL80211_IFACE_LIMIT] = {
[NL80211_IFACE_LIMIT_TYPES] = { .type = NLA_NESTED }, [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]) !tb_comb[NL80211_IFACE_COMB_NUM_CHANNELS])
return 0; /* broken combination */ 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], nla_for_each_nested(nl_limit, tb_comb[NL80211_IFACE_COMB_LIMITS],
rem_limit) { rem_limit) {
err = nla_parse_nested(tb_limit, MAX_NL80211_IFACE_LIMIT, err = nla_parse_nested(tb_limit, MAX_NL80211_IFACE_LIMIT,