rt2x00: pause almost full queue early
Do not drop &queue->tx_lock and acquire it again to pause queue when available entries are below the threshold. Patch should mitigate problem of frequently printed errors: "Error - Dropping frame due to full tx queue" Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Tested-by: Enrico Mioso@gmail.com Tested-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
b713bbf147
commit
3d8f162cb8
|
@ -152,16 +152,6 @@ void rt2x00mac_tx(struct ieee80211_hw *hw,
|
||||||
if (unlikely(rt2x00queue_write_tx_frame(queue, skb, control->sta, false)))
|
if (unlikely(rt2x00queue_write_tx_frame(queue, skb, control->sta, false)))
|
||||||
goto exit_fail;
|
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;
|
return;
|
||||||
|
|
||||||
exit_fail:
|
exit_fail:
|
||||||
|
|
|
@ -715,6 +715,14 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
|
||||||
rt2x00queue_kick_tx_queue(queue, &txdesc);
|
rt2x00queue_kick_tx_queue(queue, &txdesc);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
/*
|
||||||
|
* Pausing queue has to be serialized with rt2x00lib_txdone(), so we
|
||||||
|
* do this under queue->tx_lock. Bottom halve was already disabled
|
||||||
|
* before ieee80211_xmit() call.
|
||||||
|
*/
|
||||||
|
if (rt2x00queue_threshold(queue))
|
||||||
|
rt2x00queue_pause_queue(queue);
|
||||||
|
|
||||||
spin_unlock(&queue->tx_lock);
|
spin_unlock(&queue->tx_lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue