diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2017-12-19 12:33:55 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-08 19:39:06 +0200 |
commit | 3d8f162cb8ecd8cb5f77d92ed27bdc7d8aeb2bae (patch) | |
tree | a7d4fd741c1fa7351dbd8156f45ae7f768031baa /drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | |
parent | b713bbf1471b56b572ce26bd02b81a85c2b007f4 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2x00queue.c')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c index 6598cefdbe71..a6884e73d2ab 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c @@ -715,6 +715,14 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, rt2x00queue_kick_tx_queue(queue, &txdesc); 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); return ret; } |