diff options
| author | Felix Fietkau <nbd@nbd.name> | 2023-08-29 10:39:53 +0200 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2023-09-30 20:03:03 +0200 |
| commit | 0335c034e7265d36d956e806f33202c94a8a9860 (patch) | |
| tree | 135dabd2b968ab97d046a84aa39df63151fa20b1 /drivers/net/wireless/mediatek/mt76/mt76x02_util.c | |
| parent | debd133ab2e2e06989c24e1a72be2b7997f30456 (diff) | |
| download | linux-0335c034e7265d36d956e806f33202c94a8a9860.tar.gz linux-0335c034e7265d36d956e806f33202c94a8a9860.tar.bz2 linux-0335c034e7265d36d956e806f33202c94a8a9860.zip | |
wifi: mt76: fix race condition related to checking tx queue fill status
When drv_tx calls race against local tx scheduling, the queue fill status checks
can potentially race, leading to dma queue entries being overwritten.
Fix this by deferring packets from drv_tx calls to the tx worker, in order to
ensure that all regular queue tx comes from the same context.
Reported-by: Ryder Lee <Ryder.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_util.c')
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index dcbb5c605dfe..8a0e8124b894 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c @@ -288,7 +288,7 @@ mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif, mvif->idx = idx; mvif->group_wcid.idx = MT_VIF_WCID(idx); mvif->group_wcid.hw_key_idx = -1; - mt76_packet_id_init(&mvif->group_wcid); + mt76_wcid_init(&mvif->group_wcid); mtxq = (struct mt76_txq *)vif->txq->drv_priv; rcu_assign_pointer(dev->mt76.wcid[MT_VIF_WCID(idx)], &mvif->group_wcid); @@ -346,7 +346,7 @@ void mt76x02_remove_interface(struct ieee80211_hw *hw, dev->mt76.vif_mask &= ~BIT_ULL(mvif->idx); rcu_assign_pointer(dev->mt76.wcid[mvif->group_wcid.idx], NULL); - mt76_packet_id_flush(&dev->mt76, &mvif->group_wcid); + mt76_wcid_cleanup(&dev->mt76, &mvif->group_wcid); } EXPORT_SYMBOL_GPL(mt76x02_remove_interface); |
