ar71xx: ethernet: skip calls to netdev_completed_queue and netif_wake_queue if no...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 12 Aug 2013 11:44:35 +0000 (11:44 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 12 Aug 2013 11:44:35 +0000 (11:44 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37758

target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index bdef8ba4ec91014411fdfe78db7f31c670ade660..8c62a4d2c95783500c613adb17986df3e74f9c97 100644 (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);