From 9f31663e215269d180961b1b4ddb50df459a0fda Mon Sep 17 00:00:00 2001 From: Ram Subramanian Date: Fri, 23 Feb 2024 12:09:08 -0800 Subject: [PATCH] client: report channel if present in diag message --- 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))