blob: c75f18d01980cf27b7425f3b96b84e65d3a6aeae [file] [log] [blame]
developer8a0e8c82024-03-07 14:13:18 +08001From 43185c6fd277538d378db3fb9e2d0520d9c5dfb2 Mon Sep 17 00:00:00 2001
2From: Bo Jiao <Bo.Jiao@mediatek.com>
3Date: Thu, 7 Mar 2024 10:57:09 +0800
4Subject: [PATCH] wifi: mt76: fix issue that when one phy is scanning and
5 another phy occur packet loss
6
7Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com>
8---
9 dma.c | 5 ++++-
10 mt7915/mac.c | 2 +-
11 2 files changed, 5 insertions(+), 2 deletions(-)
12
13diff --git a/dma.c b/dma.c
14index 72a7bd5..b4701d5 100644
15--- a/dma.c
16+++ b/dma.c
17@@ -543,13 +543,16 @@ mt76_dma_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
18 .skb = skb,
19 };
20 struct ieee80211_hw *hw;
21+ struct mt76_phy *phy;
22 int len, n = 0, ret = -ENOMEM;
23 struct mt76_txwi_cache *t;
24 struct sk_buff *iter;
25 dma_addr_t addr;
26 u8 *txwi;
27
28- if (test_bit(MT76_RESET, &dev->phy.state))
29+ hw = mt76_phy_hw(dev, wcid->phy_idx);
30+ phy = hw->priv;
31+ if (test_bit(MT76_RESET, &phy->state))
32 goto free_skb;
33
34 t = mt76_get_txwi(dev);
35diff --git a/mt7915/mac.c b/mt7915/mac.c
36index faa5ed3..4addbd3 100644
37--- a/mt7915/mac.c
38+++ b/mt7915/mac.c
39@@ -1421,7 +1421,7 @@ out:
40 /* reset done */
41 clear_bit(MT76_RESET, &dev->mphy.state);
42 if (phy2)
43- clear_bit(MT76_RESET, &phy2->mt76->state);
44+ clear_bit(MT76_RESET, &ext_phy->state);
45
46 local_bh_disable();
47 napi_enable(&dev->mt76.tx_napi);
48--
492.18.0
50