diff mbox series

[3/9] wifi: nl80211: allow CAC while other links are beaconing during MLO

Message ID 20240619040959.1457547-4-quic_adisi@quicinc.com
State Superseded
Headers show
Series wifi: cfg80211/mac80211: add DFS support for MLO | expand

Commit Message

Aditya Kumar Singh June 19, 2024, 4:09 a.m. UTC
Currently if any of the link is beaconing, CAC can not be started.

However, with MLO, it is possible that interface is beaconing already on a
link that did not require CAC, but now another link is being started that
does require CAC. Hence, same check does not apply to MLO.

Add changes to check the link under consideration is beaconing or not in
case of MLO.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
 net/wireless/nl80211.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b44332dc52be..7420a966997f 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10025,7 +10025,20 @@  static int nl80211_start_radar_detection(struct sk_buff *skb,
 		goto unlock;
 	}
 
-	if (cfg80211_beaconing_iface_active(wdev) || wdev->links[0].cac_started) {
+	if (cfg80211_beaconing_iface_active(wdev)) {
+		/* During MLO other link(s) can beacon, only the current link
+		 * can not already beacon
+		 */
+		if (wdev->valid_links &&
+		    !wdev->links[0].ap.beacon_interval) {
+			/* nothing */
+		} else {
+			err = -EBUSY;
+			goto unlock;
+		}
+	}
+
+	if (wdev->links[0].cac_started) {
 		err = -EBUSY;
 		goto unlock;
 	}