* [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
* [PATCH v2 2/3] client: report channel if present in diag message
2024-02-23 20:09 [PATCH v2 1/3] station: add channel number to diagnostics message Ram Subramanian
@ 2024-02-23 20:09 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: Ram Subramanian @ 2024-02-23 20:09 UTC (permalink / raw)
To: iwd; +Cc: Ram Subramanian
---
client/diagnostic.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/client/diagnostic.c b/client/diagnostic.c
index 6360b7e2..e1bd9784 100644
--- a/client/diagnostic.c
+++ b/client/diagnostic.c
@@ -93,6 +93,7 @@ static const struct diagnostic_dict_mapping diagnostic_mapping[] = {
{ "RxMCS", 'y' },
{ "TxMCS", 'y' },
{ "Frequency", 'u' },
+ { "Channel", 'q' },
{ "Security", 's' },
{ NULL }
};
@@ -109,6 +110,7 @@ void diagnostic_display(struct l_dbus_message_iter *dict,
while (l_dbus_message_iter_next_entry(dict, &key, &variant)) {
const char *s_value;
uint32_t u_value;
+ uint16_t q_value;
int16_t n_value;
uint8_t y_value;
int bytes;
@@ -145,6 +147,14 @@ void diagnostic_display(struct l_dbus_message_iter *dict,
bytes = sprintf(display_text, "%u", u_value);
break;
+ case 'q':
+ if (!l_dbus_message_iter_get_variant(&variant, "q",
+ &q_value))
+ goto parse_error;
+
+ bytes = sprintf(display_text, "%u", q_value);
+ break;
+
case 'n':
if (!l_dbus_message_iter_get_variant(&variant, "n",
&n_value))
--
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
* [PATCH v2 3/3] doc: document channel field in station diagnostics
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 ` Ram Subramanian
2024-02-26 15:45 ` [PATCH v2 1/3] station: add channel number to diagnostics message Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: Ram Subramanian @ 2024-02-23 20:09 UTC (permalink / raw)
To: iwd; +Cc: Ram Subramanian
---
doc/station-diagnostic-api.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/doc/station-diagnostic-api.txt b/doc/station-diagnostic-api.txt
index f6e099b5..77651366 100644
--- a/doc/station-diagnostic-api.txt
+++ b/doc/station-diagnostic-api.txt
@@ -23,6 +23,8 @@ Methods dict GetDiagnostics()
Frequency - Frequency of currently connected BSS.
+ Channel - The WLAN channel number of currently connected BSS.
+
Security - The chosen security for the connection.
RSSI [optional] - The RSSI of the currently connected BSS.
--
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
* Re: [PATCH v2 1/3] station: add channel number to diagnostics message
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 ` Denis Kenzior
2 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2024-02-26 15:45 UTC (permalink / raw)
To: Ram Subramanian, iwd
Hi Ram,
On 2/23/24 14:09, Ram Subramanian wrote:
> As a small convenience to the user.
> ---
> src/station.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
All three applied, thanks.
Regards,
-Denis
^ permalink raw reply [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