ar71xx: ethernet: skip calls to netdev_completed_queue and netif_wake_queue if no tx cleanup was done

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37758
lede-17.01
Felix Fietkau 2013-08-12 11:44:35 +00:00
parent 81cfb9e5ed
commit f18fd5512e
1 changed files with 3 additions and 0 deletions

View File

@ -847,6 +847,9 @@ static int ag71xx_tx_packets(struct ag71xx *ag)
DBG("%s: %d packets sent out\n", ag->dev->name, sent);
if (!sent)
return;
netdev_completed_queue(ag->dev, sent, bytes_compl);
if ((ring->curr - ring->dirty) < (ring->size * 3) / 4)
netif_wake_queue(ag->dev);