From: Marcel Holtmann Date: Sat, 2 May 2009 20:07:24 +0000 (-0700) Subject: add option to dump unknown IEs with scan command X-Git-Tag: v0.9.14~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92649eab6b3ccb0be600b8501fa7b83e9467819c;p=thirdparty%2Fiw.git add option to dump unknown IEs with scan command --- diff --git a/scan.c b/scan.c index 48f803a..91e94ed 100644 --- a/scan.c +++ b/scan.c @@ -340,12 +340,13 @@ static int handle_scan_combined(struct nl80211_state *state, NULL, "scan", "dump", + NULL, }; static const __u32 cmds[] = { NL80211_CMD_NEW_SCAN_RESULTS, NL80211_CMD_SCAN_ABORTED, }; - int err; + int dump_argc, err; trig_argv[0] = argv[0]; err = handle_cmd(state, II_NETDEV, ARRAY_SIZE(trig_argv), trig_argv); @@ -382,7 +383,13 @@ static int handle_scan_combined(struct nl80211_state *state, return 0; } + if (argc == 3 && !strcmp(argv[2], "-u")) { + dump_argc = 4; + dump_argv[3] = "-u"; + } else + dump_argc = 3; + dump_argv[0] = argv[0]; - return handle_cmd(state, II_NETDEV, ARRAY_SIZE(dump_argv), dump_argv); + return handle_cmd(state, II_NETDEV, dump_argc, dump_argv); } -TOPLEVEL(scan, NULL, 0, 0, CIB_NETDEV, handle_scan_combined); +TOPLEVEL(scan, "[-u]", 0, 0, CIB_NETDEV, handle_scan_combined);