summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt7601u/tx.c
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2015-07-31 15:04:49 +0200
committerKalle Valo <kvalo@codeaurora.org>2015-08-10 21:19:35 +0200
commit78623bfb6f4cbdba3183621e8e0e781611217022 (patch)
treeb1af2c6f9716d665a3be0e26a2ab06a85dae3103 /drivers/net/wireless/mediatek/mt7601u/tx.c
parentmt7601u: fix tx status reporting contexts (diff)
downloadlinux-78623bfb6f4cbdba3183621e8e0e781611217022.tar.xz
linux-78623bfb6f4cbdba3183621e8e0e781611217022.zip
mt7601u: lock out rx path and tx status reporting
mac80211 requires that rx path does not run concurrently with tx status reporting. Add a spinlock which will ensure that. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt7601u/tx.c')
-rw-r--r--drivers/net/wireless/mediatek/mt7601u/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt7601u/tx.c b/drivers/net/wireless/mediatek/mt7601u/tx.c
index 0be2080ceab3..a0a33dc8f6bc 100644
--- a/drivers/net/wireless/mediatek/mt7601u/tx.c
+++ b/drivers/net/wireless/mediatek/mt7601u/tx.c
@@ -116,7 +116,10 @@ void mt7601u_tx_status(struct mt7601u_dev *dev, struct sk_buff *skb)
ieee80211_tx_info_clear_status(info);
info->status.rates[0].idx = -1;
info->flags |= IEEE80211_TX_STAT_ACK;
+
+ spin_lock(&dev->mac_lock);
ieee80211_tx_status(dev->hw, skb);
+ spin_unlock(&dev->mac_lock);
}
static int mt7601u_skb_rooms(struct mt7601u_dev *dev, struct sk_buff *skb)