From c3d7c82a8bb017e43cafe8eaf7c8309f85ceb781 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 25 Apr 2018 11:11:21 +0200 Subject: 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 Signed-off-by: Kalle Valo --- drivers/net/wireless/mediatek/mt76/mt76.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/wireless/mediatek/mt76/mt76.h') diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index 065ff78059c3..a74e6eef51e9 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -241,6 +241,7 @@ struct mt76_dev { struct device *dev; struct net_device napi_dev; + spinlock_t rx_lock; struct napi_struct napi[__MT_RXQ_MAX]; struct sk_buff_head rx_skb[__MT_RXQ_MAX]; -- cgit v1.2.3