blob: fd8a2fb57a684ed5edd7647d40d8660046e0c36f [file] [log] [blame]
From b45cb95c51dbe6118d9133255eceafe765765be8 Mon Sep 17 00:00:00 2001
From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Date: Tue, 7 Mar 2023 17:05:01 +0800
Subject: [PATCH 21/29] wifi: mt76: mt7996: Fix using the wrong phy for
background radar event
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
---
mt7996/mcu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mt7996/mcu.c b/mt7996/mcu.c
index ed1abe1..cc6c6a4 100644
--- a/mt7996/mcu.c
+++ b/mt7996/mcu.c
@@ -339,10 +339,15 @@ mt7996_mcu_rx_radar_detected(struct mt7996_dev *dev, struct sk_buff *skb)
if (r->band_idx >= ARRAY_SIZE(dev->mt76.phys))
return;
- mphy = dev->mt76.phys[r->band_idx];
+ if (dev->rdd2_phy && r->band_idx == MT_RX_SEL2)
+ mphy = dev->rdd2_phy->mt76;
+ else
+ mphy = dev->mt76.phys[r->band_idx];
+
if (!mphy)
return;
+ /* TODO: check fw background chain's rdd idx */
if (r->band_idx == MT_RX_SEL2)
cfg80211_background_radar_event(mphy->hw->wiphy,
&dev->rdd2_chandef,
--
2.18.0