public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 1/3] station: add channel number to diagnostics message
@ 2024-02-23 20:09 Ram Subramanian
  2024-02-23 20:09 ` [PATCH v2 2/3] client: report channel if present in diag message Ram Subramanian
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ram Subramanian @ 2024-02-23 20:09 UTC (permalink / raw)
  To: iwd; +Cc: Ram Subramanian

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.

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

end of thread, other threads:[~2024-02-26 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-23 20:09 [PATCH v2 1/3] station: add channel number to diagnostics message Ram Subramanian
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox