]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add driver capability flag for radar detection
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Thu, 9 May 2013 16:58:55 +0000 (19:58 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 9 May 2013 16:59:47 +0000 (19:59 +0300)
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>

src/drivers/driver.h
src/drivers/driver_nl80211.c

index 016b697d23b2c783d45d8a716b0021f291b8c2de..30a90c0b9ba16e7d18f50f81c68ebc5bb8dfa111 100644 (file)
@@ -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;
index 0a1cac6e723ba535e6adac59cf1110f4509696bd..a28086c995f0d53a7bacddc5ebdb0c2c5a31d98d 100644 (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_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,