blob: fd8a2fb57a684ed5edd7647d40d8660046e0c36f [file] [log] [blame]
developer8eb72a32023-03-30 08:32:07 +08001From b45cb95c51dbe6118d9133255eceafe765765be8 Mon Sep 17 00:00:00 2001
developer1bc2ce22023-03-25 00:47:41 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Tue, 7 Mar 2023 17:05:01 +0800
4Subject: [PATCH 21/29] wifi: mt76: mt7996: Fix using the wrong phy for
5 background radar event
6
7Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
8---
9 mt7996/mcu.c | 7 ++++++-
10 1 file changed, 6 insertions(+), 1 deletion(-)
11
12diff --git a/mt7996/mcu.c b/mt7996/mcu.c
developer8eb72a32023-03-30 08:32:07 +080013index ed1abe1..cc6c6a4 100644
developer1bc2ce22023-03-25 00:47:41 +080014--- a/mt7996/mcu.c
15+++ b/mt7996/mcu.c
16@@ -339,10 +339,15 @@ mt7996_mcu_rx_radar_detected(struct mt7996_dev *dev, struct sk_buff *skb)
17 if (r->band_idx >= ARRAY_SIZE(dev->mt76.phys))
18 return;
19
20- mphy = dev->mt76.phys[r->band_idx];
21+ if (dev->rdd2_phy && r->band_idx == MT_RX_SEL2)
22+ mphy = dev->rdd2_phy->mt76;
23+ else
24+ mphy = dev->mt76.phys[r->band_idx];
25+
26 if (!mphy)
27 return;
28
29+ /* TODO: check fw background chain's rdd idx */
30 if (r->band_idx == MT_RX_SEL2)
31 cfg80211_background_radar_event(mphy->hw->wiphy,
32 &dev->rdd2_chandef,
33--
developer8eb72a32023-03-30 08:32:07 +0800342.18.0
developer1bc2ce22023-03-25 00:47:41 +080035