All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Di Marco <dmr@ethzero.com>
To: iwd@lists.linux.dev
Cc: Alessandro Di Marco <dmr@ethzero.com>
Subject: [PATCH] netdev: initialize RSSI polling station info
Date: Sat, 12 Sep 2026 16:57:31 +0200	[thread overview]
Message-ID: <20260912145731.234249-1-dmr@ethzero.com> (raw)

netdev_rssi_poll_cb() uses netdev_parse_sta_info() and then checks
have_cur_rssi. If NL80211_STA_INFO_SIGNAL is not present in the
response, the parser leaves this field untouched.

Initialize the diagnostic station info before parsing, matching
netdev_get_station_cb().

Fixes: 08de8186c6f2 ("netdev: update RSSI polling to use station info parser")
---
 src/netdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/netdev.c b/src/netdev.c
index e639a1f8..a4cb06d4 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -735,6 +735,8 @@ static void netdev_rssi_poll_cb(struct l_genl_msg *msg, void *user_data)
 	if (!l_genl_attr_init(&attr, msg))
 		goto done;
 
+	memset(&info, 0, sizeof(info));
+
 	found = false;
 	while (l_genl_attr_next(&attr, &type, &len, &data)) {
 		if (type != NL80211_ATTR_STA_INFO)
-- 
2.55.0


                 reply	other threads:[~2026-09-12 14:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260912145731.234249-1-dmr@ethzero.com \
    --to=dmr@ethzero.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.