blob: 66d4d106767772419671ca8a1057e30b9460a079 [file] [log] [blame]
developer3e11ee32023-09-27 12:24:47 +08001From 818c8f1d1a9ff9e5423ed0927b052692c282fdf4 Mon Sep 17 00:00:00 2001
developerf0fd7052023-08-14 20:23:42 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Thu, 27 Jul 2023 10:27:04 +0800
developer3e11ee32023-09-27 12:24:47 +08004Subject: [PATCH 19/19] cfg80211: mtk: add background radar stop when
developerf0fd7052023-08-14 20:23:42 +08005 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
developer3e11ee32023-09-27 12:24:47 +080013index 53f32c6..ab61f8f 100644
developerf0fd7052023-08-14 20:23:42 +080014--- a/net/wireless/nl80211.c
15+++ b/net/wireless/nl80211.c
developer3e11ee32023-09-27 12:24:47 +080016@@ -9852,6 +9852,10 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
developerf0fd7052023-08-14 20:23:42 +080017 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, false)) {
22+ cfg80211_stop_background_radar_detection(rdev->background_radar_wdev);
23+ }
24 }
25 unlock:
26 wiphy_unlock(wiphy);
27--
developer3e11ee32023-09-27 12:24:47 +0800282.18.0
developerf0fd7052023-08-14 20:23:42 +080029