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