($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Ram Subramanian <ram.subramanian@getcruise.com>
To: iwd@lists.linux.dev
Cc: Ram Subramanian <ram.subramanian@getcruise.com>
Subject: [PATCH v2 1/3] station: add channel number to diagnostics message
Date: Fri, 23 Feb 2024 12:09:07 -0800	[thread overview]
Message-ID: <20240223200944.1343893-1-ram.subramanian@getcruise.com> (raw)

As a small convenience to the user.
---
 src/station.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/station.c b/src/station.c
index ea505ca2..33b1f5e8 100644
--- a/src/station.c
+++ b/src/station.c
@@ -4702,12 +4702,16 @@ static void station_get_diagnostic_cb(
 	struct l_dbus_message *reply;
 	struct l_dbus_message_builder *builder;
 	struct handshake_state *hs = netdev_get_handshake(station->netdev);
+	uint16_t channel_num;
 
 	if (!info) {
 		reply = dbus_error_aborted(station->get_station_pending);
 		goto done;
 	}
 
+	channel_num = band_freq_to_channel(station->connected_bss->frequency,
+						NULL);
+
 	reply = l_dbus_message_new_method_return(station->get_station_pending);
 
 	builder = l_dbus_message_builder_new(reply);
@@ -4718,6 +4722,10 @@ static void station_get_diagnostic_cb(
 					util_address_to_string(info->addr));
 	dbus_append_dict_basic(builder, "Frequency", 'u',
 				&station->connected_bss->frequency);
+
+	if (channel_num != 0)
+		dbus_append_dict_basic(builder, "Channel", 'q', &channel_num);
+
 	dbus_append_dict_basic(builder, "Security", 's',
 				diagnostic_akm_suite_to_security(hs->akm_suite,
 								hs->wpa_ie));
-- 
2.43.2


-- 


*Confidentiality Note:* We care about protecting our proprietary 
information, confidential material, and trade secrets. This message may 
contain some or all of those things. Cruise will suffer material harm if 
anyone other than the intended recipient disseminates or takes any action 
based on this message. If you have received this message (including any 
attachments) in error, please delete it immediately and notify the sender 
promptly.

             reply	other threads:[~2024-02-23 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 20:09 Ram Subramanian [this message]
2024-02-23 20:09 ` [PATCH v2 2/3] client: report channel if present in diag message Ram Subramanian
2024-02-23 20:09 ` [PATCH v2 3/3] doc: document channel field in station diagnostics Ram Subramanian
2024-02-26 15:45 ` [PATCH v2 1/3] station: add channel number to diagnostics message Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240223200944.1343893-1-ram.subramanian@getcruise.com \
    --to=ram.subramanian@getcruise.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).