mirror of https://github.com/hak5/openwrt-owl.git
ar71xx: only access device stats in tx handler if packets were processed
Signed-off-by: Felix Fietkau <nbd@nbd.name>owl
parent
890e7458b0
commit
31e6016d2e
|
@ -999,12 +999,12 @@ static int ag71xx_tx_packets(struct ag71xx *ag, bool flush)
|
||||||
|
|
||||||
DBG("%s: %d packets sent out\n", ag->dev->name, sent);
|
DBG("%s: %d packets sent out\n", ag->dev->name, sent);
|
||||||
|
|
||||||
ag->dev->stats.tx_bytes += bytes_compl;
|
|
||||||
ag->dev->stats.tx_packets += sent;
|
|
||||||
|
|
||||||
if (!sent)
|
if (!sent)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
ag->dev->stats.tx_bytes += bytes_compl;
|
||||||
|
ag->dev->stats.tx_packets += sent;
|
||||||
|
|
||||||
netdev_completed_queue(ag->dev, sent, bytes_compl);
|
netdev_completed_queue(ag->dev, sent, bytes_compl);
|
||||||
if ((ring->curr - ring->dirty) < (ring_size * 3) / 4)
|
if ((ring->curr - ring->dirty) < (ring_size * 3) / 4)
|
||||||
netif_wake_queue(ag->dev);
|
netif_wake_queue(ag->dev);
|
||||||
|
|
Loading…
Reference in New Issue