summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-03-13 14:38:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-03-13 14:38:51 -0400
commit750084b51bc9a7962e7f7c9a29cede0234aed824 (patch)
tree0ee4bc3d0a4da50591d8fe9f55f28ca20224e856 /drivers/net/wireless/rt2x00/rt2x00dev.c
parent1ab5ecb90cb6a3df1476e052f76a6e8f6511cb3d (diff)
parent3780d038fdf4b5ef26ead10b0604ab1f46dd9510 (diff)
downloadlinux-750084b51bc9a7962e7f7c9a29cede0234aed824.tar.gz
linux-750084b51bc9a7962e7f7c9a29cede0234aed824.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index d2a1ea98d0f2..fd356b7c0476 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -426,10 +426,14 @@ void rt2x00lib_txdone(struct queue_entry *entry,
/*
* If the data queue was below the threshold before the txdone
* handler we must make sure the packet queue in the mac80211 stack
- * is reenabled when the txdone handler has finished.
+ * is reenabled when the txdone handler has finished. This has to be
+ * serialized with rt2x00mac_tx(), otherwise we can wake up queue
+ * before it was stopped.
*/
+ spin_lock_bh(&entry->queue->tx_lock);
if (!rt2x00queue_threshold(entry->queue))
rt2x00queue_unpause_queue(entry->queue);
+ spin_unlock_bh(&entry->queue->tx_lock);
}
EXPORT_SYMBOL_GPL(rt2x00lib_txdone);