summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00mac.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-13 17:57:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-13 17:57:07 -0700
commitb8fa7d410a8f693db75548c843c3bb1db2d5ed1a (patch)
tree4e5fb5e8a98b837af3cfbf2f30aea8f6673438cb /drivers/net/wireless/rt2x00/rt2x00mac.c
parent69539ab1006f6c55cc5243fa82341bb6e59c07ed (diff)
parent750084b51bc9a7962e7f7c9a29cede0234aed824 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking changes from David Miller: "The most important bit here is the TCP syncookies issue, which seems to have been busted for some time. That fix has been verified in production by the reporter. 1) Persistent TUN devices erroneously hold on to the network namespace in such a way that it cannot be shutdown. Fix from Stanislav Kinsbursky with help from Eric Dumazet. 2) TCP SYN cookies have been broken for a while due to how the route lookup flow key is managed, connections can be delayed by as much as 20 seconds due to this bug. Fix from Eric Dumazet. 3) Missing jiffies.h include in lib/dynamic_queue_limits.c can break the build, from Tom Herbert. 4) Add USB device ID for Sitecom LN-031, from Joerg Neikes. 5) Fix OOPS in delayed workqueue in iwlegacy, from Stanislaw Gruszka. 6) rt2x00 TX queue can be disabled forever due to races, fix by synchronizing pause/unpause with a lock. Also from Stanislaw Gruszka. 7) Statistics and endian fix in bnx2x driver from Yuval Mintz, Eilon Greenstein, and Ariel Elior." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: tun: don't hold network namespace by tun sockets bnx2x: FCoE statistics id fixed bnx2x: dcb bit indices flags used as bits bnx2x: added cpu_to_le16 when preparing ramrod's data bnx2x: pfc statistics counts pfc events twice rt2x00: fix random stalls iwl3945: fix possible il->txq NULL pointer dereference in delayed works dql: Fix undefined jiffies tcp: fix syncookie regression usb: asix: Patch for Sitecom LN-031
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index ede3c58e6783..2df2eb6d3e06 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -152,13 +152,22 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false)))
goto exit_fail;
+ /*
+ * Pausing queue has to be serialized with rt2x00lib_txdone(). Note
+ * we should not use spin_lock_bh variant as bottom halve was already
+ * disabled before ieee80211_xmit() call.
+ */
+ spin_lock(&queue->tx_lock);
if (rt2x00queue_threshold(queue))
rt2x00queue_pause_queue(queue);
+ spin_unlock(&queue->tx_lock);
return;
exit_fail:
+ spin_lock(&queue->tx_lock);
rt2x00queue_pause_queue(queue);
+ spin_unlock(&queue->tx_lock);
exit_free_skb:
ieee80211_free_txskb(hw, skb);
}