rk: revert 20f3d0b+v3.0.66 to v3.0
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rt2x00 / rt2x00mac.c
index bc159bed4f6daafddfab8559f1df9132b77030e6..93bec140e598612145c50b44adc86be70b42bca2 100644 (file)
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
         * due to possible race conditions in mac80211.
         */
        if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
-               goto exit_free_skb;
+               goto exit_fail;
 
        /*
         * Use the ATIM queue if appropriate and present.
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
                ERROR(rt2x00dev,
                      "Attempt to send packet over invalid queue %d.\n"
                      "Please file bug report to %s.\n", qid, DRV_PROJECT);
-               goto exit_free_skb;
+               goto exit_fail;
        }
 
        /*
@@ -152,23 +152,13 @@ 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:
        dev_kfree_skb_any(skb);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_tx);