Thread (6 messages) 6 messages, 2 authors, 2022-08-11

Re: WARNING in ieee80211_ibss_csa_beacon

flat view

From: Siddh Raman Pant <hidden>
Date: 2022-08-10 11:36:25
Also in: linux-wireless, lkml

When we are not connected to a channel, sending channel "switch"
announcement doesn't make any sense.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -530,6 +530,10 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata)
 
 	sdata_assert_lock(sdata);
 
+	/* When not connected/joined, sending CSA doesn't make sense. */
+	if (sdata->u.ibss.state != IEEE80211_IBSS_MLME_JOINED)
+		return -ENOLINK;
+
 	/* update cfg80211 bss information with the new channel */
 	if (!is_zero_ether_addr(ifibss->bssid)) {
 		cbss = cfg80211_get_bss(sdata->local->hw.wiphy,
-- 
2.35.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help