linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iw: survey: add support for radio stats
@ 2021-10-29  7:29 Johannes Berg
  2021-10-29  8:46 ` Sven Eckelmann
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2021-10-29  7:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Jan Fuchs, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

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

Change-Id: I16e615434607d982e9cf690f03148738eca25cde
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 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


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

* Re: [PATCH] iw: survey: add support for radio stats
  2021-10-29  7:29 [PATCH] iw: survey: add support for radio stats Johannes Berg
@ 2021-10-29  8:46 ` Sven Eckelmann
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2021-10-29  8:46 UTC (permalink / raw)
  To: linux-wireless, Johannes Berg; +Cc: Jan Fuchs, Johannes Berg

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

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


Tested-by: Sven Eckelmann <sven@narfation.org>

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-10-29  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29  7:29 [PATCH] iw: survey: add support for radio stats Johannes Berg
2021-10-29  8:46 ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).