Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cd63ca0 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: usbnet: Update net_device stats on tx and rx success"

parents 2bb7f7f2 69ea2c2b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -329,7 +329,9 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)

	flags = u64_stats_update_begin_irqsave(&stats64->syncp);
	stats64->rx_packets++;
	dev->net->stats.rx_packets++;
	stats64->rx_bytes += skb->len;
	dev->net->stats.rx_bytes += skb->len;
	u64_stats_update_end_irqrestore(&stats64->syncp, flags);

	netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n",
@@ -1255,7 +1257,9 @@ static void tx_complete (struct urb *urb)

		flags = u64_stats_update_begin_irqsave(&stats64->syncp);
		stats64->tx_packets += entry->packets;
		dev->net->stats.tx_packets += entry->packets;
		stats64->tx_bytes += entry->length;
		dev->net->stats.tx_bytes += entry->length;
		u64_stats_update_end_irqrestore(&stats64->syncp, flags);
	} else {
		dev->net->stats.tx_errors++;