blob: 6f528ef5774df7fd0ce0f4663676e210c7603ad4 [file] [log] [blame]
From 205e9952e06a64ef212ca0a01d5fc9319604bae4 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 ed1abe14..cc6c6a4a 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.39.2