Skip to content

Commit

Permalink
net: lantiq_xrx200: fix statistics of received bytes
Browse files Browse the repository at this point in the history
[ Upstream commit 5be60a9 ]

Received frames have FCS truncated. There is no need
to subtract FCS length from the statistics.

Fixes: fe1a564 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
abajk authored and gregkh committed Jan 5, 2022
1 parent c903a96 commit c1babfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/lantiq_xrx200.c
Expand Up @@ -209,7 +209,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;
}
Expand Down

0 comments on commit c1babfe

Please sign in to comment.