* 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.
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;
}
/*
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);