summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/drivers
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-08-12 11:44:35 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-08-12 11:44:35 +0000
commitb4d835c39478955df0e03bdf943269f56b6d6fc7 (patch)
treefa43f8a35fbd4e4fc6c32958ebc3d0b0c585802a /target/linux/ar71xx/files/drivers
parentc1e54392de85d3da4a7feeb1c1e8a9bba8c9acb0 (diff)
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37758 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index bdef8ba4ec..8c62a4d2c9 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -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);