blob: 2d81600bf7a1304a75371f1da1e5caa92b1e497f [file] [log] [blame]
developerc8796032023-08-09 10:28:15 +08001From b0c5d10ad1a23be569f168b4cc9f50cdb922b568 Mon Sep 17 00:00:00 2001
2From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Thu, 27 Jul 2023 10:27:04 +0800
4Subject: [PATCH 21/21] cfg80211: mtk: add background radar stop when
5 background channel is overlapped with operating channel
6
7Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
8---
9 net/wireless/nl80211.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
13index 0917713..97c2833 100644
14--- a/net/wireless/nl80211.c
15+++ b/net/wireless/nl80211.c
16@@ -9389,6 +9389,10 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
17 wdev->cac_started = true;
18 wdev->cac_start_time = jiffies;
19 wdev->cac_time_ms = cac_time_ms;
20+ if (rdev->background_cac_started &&
21+ cfg80211_is_sub_chan(&chandef, rdev->background_radar_chandef.chan)) {
22+ cfg80211_stop_background_radar_detection(rdev->background_radar_wdev);
23+ }
24 }
25 unlock:
26 wiphy_unlock(wiphy);
27--
282.18.0
29