blob: 847009735a5817b3ea6ab4e27efcea29415a04b9 [file] [log] [blame]
From af06ac5ac954a801dceb279fd42a5e7af88b4222 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Thu, 27 Jul 2023 10:27:04 +0800
Subject: [PATCH 31/89] mtk: cfg80211: add background radar stop when
background channel is overlapped with operating channel
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
net/wireless/nl80211.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 41e9f8d..6b03037 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10201,6 +10201,10 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
wdev->links[link_id].cac_started = true;
wdev->links[link_id].cac_start_time = jiffies;
wdev->links[link_id].cac_time_ms = cac_time_ms;
+ if (rdev->background_cac_started &&
+ cfg80211_is_sub_chan(&chandef, rdev->background_radar_chandef.chan, false)) {
+ cfg80211_stop_background_radar_detection(rdev->background_radar_wdev);
+ }
}
unlock:
wiphy_unlock(wiphy);
--
2.18.0