diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-04-25 11:11:21 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-04-30 13:21:27 +0300 |
commit | c3d7c82a8bb017e43cafe8eaf7c8309f85ceb781 (patch) | |
tree | 08034ee5b1b7e346957224a0a66e169086bf09cc /drivers/net/wireless/mediatek/mt76/mt76x2_init.c | |
parent | 97389373d555cdc03ed346d7dc6f714a1586c705 (diff) |
mt76: fix concurrent rx calls on A-MPDU release
Add a spinlock in mt76_rx_complete. Without this, multiple stats updates
could happen in parallel, which can lead to deadlocks. There are
probably more corner cases fixed by this change.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2_init.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 359b105235b3..d21e4a7c1bb9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -645,6 +645,7 @@ struct mt76x2_dev *mt76x2_alloc_device(struct device *pdev) dev->mt76.drv = &drv_ops; mutex_init(&dev->mutex); spin_lock_init(&dev->irq_lock); + spin_lock_init(&dev->mt76.rx_lock); return dev; } |