]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: Add 'coloc' and 'flush' options to sched_scan
authorIlan Peer <ilan.peer@intel.com>
Thu, 26 Mar 2020 07:17:21 +0000 (09:17 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 6 Nov 2020 08:51:16 +0000 (09:51 +0100)
Add new 'coloc' (from 6 GHz scanning) and 'flush' options
to the scan command.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw.h
scan.c

diff --git a/iw.h b/iw.h
index 1acf1891767df436149d778b3d47c608ec98d4a7..77ed097f229b649a65d3cd1fe08fa4c999803ea4 100644 (file)
--- a/iw.h
+++ b/iw.h
@@ -249,7 +249,7 @@ int parse_random_mac_addr(struct nl_msg *msg, char *addrs);
 
 #define SCHED_SCAN_OPTIONS "[interval <in_msecs> | scan_plans [<interval_secs:iterations>*] <interval_secs>] " \
        "[delay <in_secs>] [freqs <freq>+] [matches [ssid <ssid>]+]] [active [ssid <ssid>]+|passive] "  \
-       "[randomise[=<addr>/<mask>]]"
+       "[randomise[=<addr>/<mask>]] [coloc] [flush]"
 int parse_sched_scan(struct nl_msg *msg, int *argc, char ***argv);
 
 DECLARE_SECTION(switch);
diff --git a/scan.c b/scan.c
index a0683842cb4002710eb06d28c67ee5b6fd364419..02fa6e2c1831a34e6e681c78f1d2e85e56bb001f 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -202,6 +202,10 @@ int parse_sched_scan(struct nl_msg *msg, int *argc, char ***argv)
                                err = parse_random_mac_addr(msg, v[0] + 9);
                                if (err)
                                        goto nla_put_failure;
+                       } else if (!strncmp(v[0], "coloc", 5)) {
+                               flags |= NL80211_SCAN_FLAG_COLOCATED_6GHZ;
+                       } else if (!strncmp(v[0], "flush", 5)) {
+                               flags |= NL80211_SCAN_FLAG_FLUSH;
                        } else {
                                /* this element is not for us, so
                                 * return to continue parsing.