|
@@ -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);
|
|
|
}
|