2021-10-29 07:30:18

by Johannes Berg

[permalink] [raw]
Subject: [PATCH] iw: survey: add support for radio stats

From: Johannes Berg <[email protected]>

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

Change-Id: I16e615434607d982e9cf690f03148738eca25cde
Signed-off-by: Johannes Berg <[email protected]>
---
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


2021-10-29 08:49:40

by Sven Eckelmann

[permalink] [raw]
Subject: Re: [PATCH] iw: survey: add support for radio stats

On Friday, 29 October 2021 09:29:39 CEST Johannes Berg wrote:
> From: Johannes Berg <[email protected]>
>
> Add a --radio argument to "survey dump" to support the global
> radio statistics.
>
> Change-Id: I16e615434607d982e9cf690f03148738eca25cde
> Signed-off-by: Johannes Berg <[email protected]>
> ---


Tested-by: Sven Eckelmann <[email protected]>

Thanks for checking the problem. I've tested it together with
https://patchwork.kernel.org/project/linux-wireless/patch/20211029092539.2851b4799386.If9736d4575ee79420cbec1bd930181e1d53c7317@changeid/
on an AX200 and firmware version 59.601f3a66.0 cc-a0-59.ucode.

Kind regards,
Sven


Attachments:
signature.asc (849.00 B)
This is a digitally signed message part.