Skip to contentSkip to conversation

netdev: initialize RSSI polling station info

PATCH New Alessandro Di Marco 1 participant 1 message Sep 12

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netdev: initialize RSSI polling station info

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(+)
src/netdev.c +2 -0
index e639a1f8..a4cb06d4 100644
@@ -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)
Signature · 1 line
2.55.0