Thread (17 messages) flat view 17 messages, 4 authors, 2020-03-30

Re: [PATCH 12/12] cfg80211: Do not warn on same channel at the end of CSA

From: Sergey Matyukevich <hidden>
Date: 2020-03-30 07:03:59

quoted hunk ↗ jump to hunk
From: Ilan Peer <redacted>

When cfg80211_update_assoc_bss_entry() is called, there is a
verification that the BSS channel actually changed. As some APs use
CSA also for bandwidth changes, this would result with a kernel
warning.

Fix this by removing the WARN_ON().

Change-Id: I6710376b1b4257e5f4712fc7ab16e2b638d512aa
Signed-off-by: Ilan Peer <redacted>
Signed-off-by: Luca Coelho <redacted>
---
 net/wireless/scan.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index dd41e41f9d26..4000382aef48 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -2019,7 +2019,11 @@ void cfg80211_update_assoc_bss_entry(struct wireless_dev *wdev,
 
 	spin_lock_bh(&rdev->bss_lock);
 
-	if (WARN_ON(cbss->pub.channel == chan))
+	/*
+	 * Some APs use CSA also for bandwidth changes, i.e., without actually
+	 * changing the control channel, so no need to update in such a case.
+	 */
+	if (cbss->pub.channel == chan)
 		goto done;
 
 	/* use transmitting bss */
Indeed, that WARN_ON was too harsh here. One more triggering use-case
here was repeater. Thanks for fixing !

Reviewed-by: Sergey Matyukevich <redacted>

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