Signed-off-by: Simon Wunderlich <siwu@xxxxxxxxxxxxxxxxxx> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@xxxxxxxxxxxxxxxxxxx> --- scan.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scan.c b/scan.c index 05bad0b..3e28722 100644 --- a/scan.c +++ b/scan.c @@ -70,7 +70,7 @@ static int handle_scan(struct nl80211_state *state, DONE, } parse = NONE; int freq; - bool passive = false, have_ssids = false, have_freqs = false; + bool passive = false, have_ssids = false, have_freqs = false, spec_scan = false; size_t tmp; unsigned char *ies; int flags = 0; @@ -115,6 +115,10 @@ static int handle_scan(struct nl80211_state *state, parse = DONE; passive = true; break; + } else if (strcmp(argv[i], "spec-scan") == 0) { + parse = NONE; + spec_scan = true; + break; } case DONE: return 1; @@ -151,6 +155,8 @@ static int handle_scan(struct nl80211_state *state, nla_put_nested(msg, NL80211_ATTR_SCAN_FREQUENCIES, freqs); if (flags) NLA_PUT_U32(msg, NL80211_ATTR_SCAN_FLAGS, flags); + if (spec_scan) + NLA_PUT_FLAG(msg, NL80211_ATTR_TX_SPEC_SCAN); err = 0; nla_put_failure: @@ -1450,7 +1456,7 @@ static int handle_scan_combined(struct nl80211_state *state, dump_argv[0] = argv[0]; return handle_cmd(state, id, dump_argc, dump_argv); } -TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]", 0, 0, +TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [lowpri,flush,ap-force,spec-scan] [ssid <ssid>*|passive]", 0, 0, CIB_NETDEV, handle_scan_combined, "Scan on the given frequencies and probe for the given SSIDs\n" "(or wildcard if not given) unless passive scanning is requested.\n" @@ -1460,7 +1466,7 @@ COMMAND(scan, dump, "[-u]", NL80211_CMD_GET_SCAN, NLM_F_DUMP, CIB_NETDEV, handle_scan_dump, "Dump the current scan results. If -u is specified, print unknown\n" "data in scan results."); -COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]", +COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [lowpri,flush,ap-force,spec-scan] [ssid <ssid>*|passive]", NL80211_CMD_TRIGGER_SCAN, 0, CIB_NETDEV, handle_scan, "Trigger a scan on the given frequencies with probing for the given\n" "SSIDs (or wildcard if not given) unless passive scanning is requested."); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html