blob: c8c5f69d5077c1b3e3f63f08efb0d30f7197f063 [file] [log] [blame]
From b4960511afc66cff070b19204da6e8cc54cf9630 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 22/61] 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 7085133..1f1856b 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10031,6 +10031,10 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
wdev->cac_started = true;
wdev->cac_start_time = jiffies;
wdev->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.39.2