Thread (2 messages) read the whole thread 2 messages, 2 authors, 2021-10-29
STALE1736d

[PATCH] iw: survey: add support for radio stats

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-10-29 07:29:45
Subsystem: the rest · Maintainer: Linus Torvalds

From: Johannes Berg <redacted>

Add a --radio argument to "survey dump" to support the global
radio statistics.

Change-Id: I16e615434607d982e9cf690f03148738eca25cde
Signed-off-by: Johannes Berg <redacted>
---
 survey.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/survey.c b/survey.c
index 9325353e4ba1..7f5385e30ba5 100644
--- a/survey.c
+++ b/survey.c
@@ -71,10 +71,20 @@ static int handle_survey_dump(struct nl80211_state *state,
 			      int argc, char **argv,
 			      enum id_input id)
 {
+	if (argc > 1)
+		return HANDLER_RET_USAGE;
+
+	if (argc) {
+		if (!strcmp(argv[0], "--radio"))
+			nla_put_flag(msg, NL80211_ATTR_SURVEY_RADIO_STATS);
+		else
+			return HANDLER_RET_USAGE;
+	}
+
 	register_handler(print_survey_handler, NULL);
 	return 0;
 }
-COMMAND(survey, dump, NULL,
+COMMAND(survey, dump, "[--radio]",
 	NL80211_CMD_GET_SURVEY, NLM_F_DUMP, CIB_NETDEV, handle_survey_dump,
 	"List all gathered channel survey data");
 
-- 
2.31.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help