developer | de9ecce | 2023-05-22 11:17:16 +0800 | [diff] [blame] | 1 | From b1296ffe7596adf514bc2b5397c946e276e30176 Mon Sep 17 00:00:00 2001 |
| 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Tue, 7 Mar 2023 17:05:01 +0800 |
| 4 | Subject: [PATCH 14/22] wifi: mt76: mt7996: Fix using the wrong phy for |
| 5 | background radar event |
| 6 | |
| 7 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 8 | --- |
| 9 | mt7996/mcu.c | 6 +++++- |
| 10 | 1 file changed, 5 insertions(+), 1 deletion(-) |
| 11 | |
| 12 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| 13 | index df1ae639..cd86209b 100644 |
| 14 | --- a/mt7996/mcu.c |
| 15 | +++ b/mt7996/mcu.c |
| 16 | @@ -339,7 +339,11 @@ 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 | -- |
| 30 | 2.39.2 |
| 31 | |