public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/3] netdev: check connected in channel switch event
@ 2025-08-15 15:26 James Prestwood
  2025-08-15 15:26 ` [PATCH 2/3] station: transition to ft-roaming on NETDEV_EVENT_ASSOCIATING James Prestwood
  2025-08-15 15:26 ` [PATCH 3/3] netdev: handle local CMD_ASSOCIATE failures (for FT) James Prestwood
  0 siblings, 2 replies; 3+ messages in thread
From: James Prestwood @ 2025-08-15 15:26 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

In an ideal world userspace should never be getting a channel switch
event unless connected to an AP, but alas this has been seen at least
with ath10k hardware. This causes IWD to crash since the logic
assumes netdev->handshake is set.
---
 src/netdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/netdev.c b/src/netdev.c
index 53a97cbd..ca8bfea0 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -5402,6 +5402,9 @@ static void netdev_channel_switch_event(struct l_genl_msg *msg,
 	if (netdev->type != NL80211_IFTYPE_STATION)
 		return;
 
+	if (L_WARN_ON(!netdev->connected))
+		return;
+
 	chandef = l_new(struct band_chandef, 1);
 
 	if (nl80211_parse_chandef(msg, chandef) < 0) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-15 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 15:26 [PATCH 1/3] netdev: check connected in channel switch event James Prestwood
2025-08-15 15:26 ` [PATCH 2/3] station: transition to ft-roaming on NETDEV_EVENT_ASSOCIATING James Prestwood
2025-08-15 15:26 ` [PATCH 3/3] netdev: handle local CMD_ASSOCIATE failures (for FT) James Prestwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox