From: Michael Johnson <mjohnson459@gmail.com>
To: iwd@lists.linux.dev
Cc: Michael Johnson <mjohnson459@gmail.com>
Subject: [PATCH 1/2] netdev: Add logging for CQM messages
Date: Mon, 1 Aug 2022 11:06:30 +0100 [thread overview]
Message-ID: <20220801100631.41605-1-mjohnson459@gmail.com> (raw)
Add extra logging around CQM events to help track wifi status.
The signal strength logging matches wpa_supplicant's which looks like
this:
CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-60 noise=-96 txrate=6000
---
src/netdev.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/netdev.c b/src/netdev.c
index 5a6a7b70..f9acd639 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -1092,12 +1092,26 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev)
rssi_event = (uint32_t *) data;
break;
+ case NL80211_ATTR_CQM_PKT_LOSS_EVENT:
+ if (len != 4)
+ continue;
+
+ l_warn("Packets lost event: %d",
+ *(uint32_t *) data);
+ break;
+
+ case NL80211_ATTR_CQM_BEACON_LOSS_EVENT:
+ l_warn("Beacon lost event");
+ break;
+
case NL80211_ATTR_CQM_RSSI_LEVEL:
if (len != 4)
continue;
rssi_val = (int32_t *) data;
break;
+ default:
+ l_debug("Unknown CQM event: %d", type);
}
}
@@ -1106,10 +1120,14 @@ static void netdev_cqm_event(struct l_genl_msg *msg, struct netdev *netdev)
}
if (rssi_event) {
- if (rssi_val)
+ if (rssi_val) {
+ l_info("Signal change event (above=%d signal=%d)",
+ *rssi_event, *rssi_val);
netdev_cqm_event_rssi_value(netdev, *rssi_val);
- else
+ } else {
+ l_info("Signal change event (above=%d)", *rssi_event);
netdev_cqm_event_rssi_threshold(netdev, *rssi_event);
+ }
}
}
--
2.25.1
next reply other threads:[~2022-08-01 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 10:06 Michael Johnson [this message]
2022-08-01 10:06 ` [PATCH 2/2] station: Log scan results during a roam Michael Johnson
2022-08-01 15:17 ` [PATCH 1/2] netdev: Add logging for CQM messages Denis Kenzior
2022-08-01 16:18 ` Michael Johnson
2022-08-01 17:14 ` Denis Kenzior
2022-08-01 18:09 ` Michael Johnson
2022-08-01 18:30 ` 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=20220801100631.41605-1-mjohnson459@gmail.com \
--to=mjohnson459@gmail.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