]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: lantiq_xrx200: fix statistics of received bytes
authorAleksander Jan Bajkowski <olek2@wp.pl>
Mon, 27 Dec 2021 16:22:03 +0000 (17:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Dec 2021 12:18:18 +0000 (12:18 +0000)
Received frames have FCS truncated. There is no need
to subtract FCS length from the statistics.

Fixes: 462a72fd466e ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/lantiq_xrx200.c

index 96bd6f2b21ed9ba57b265ac2dc0d332074992c09..80bfaf2fec9298061c3293e42f206cec628f42d3 100644 (file)
@@ -224,7 +224,7 @@ static int xrx200_hw_receive(struct xrx200_chan *ch)
        skb->protocol = eth_type_trans(skb, net_dev);
        netif_receive_skb(skb);
        net_dev->stats.rx_packets++;
-       net_dev->stats.rx_bytes += len - ETH_FCS_LEN;
+       net_dev->stats.rx_bytes += len;
 
        return 0;
 }