public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add option to dump unknown IEs with scan command
@ 2009-05-02 20:07 Marcel Holtmann
  2009-05-02 21:08 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2009-05-02 20:07 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Marcel Holtmann

---
 scan.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

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);
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-02 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-02 20:07 [PATCH] add option to dump unknown IEs with scan command Marcel Holtmann
2009-05-02 21:08 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox