Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A01BC433EF for ; Mon, 3 Jan 2022 14:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235205AbiACOc5 (ORCPT ); Mon, 3 Jan 2022 09:32:57 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:60116 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234013AbiACOap (ORCPT ); Mon, 3 Jan 2022 09:30:45 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AC3A8B80EF6; Mon, 3 Jan 2022 14:30:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB0AEC36AED; Mon, 3 Jan 2022 14:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1641220243; bh=Goj2JFIB+X4sTeoEYCvsPRk0fpH2kSWZeV7RcRz7v5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BSQTu2TBgDPGUccSpvloRTw6z8+HtTD6OfO/UIV0hWBiy7DvoIpou8s4Q/LQgTNw8 Hp4XmyotK7k2gz/X6s90gRhQbB1KBwqaab8MP5WpQp6y+V4F5tiJkNHKk7Ua3x2egG OJvLJOOp8cWODDvRTigoL6O5j3Mf411ELvFnQBVY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aleksander Jan Bajkowski , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 21/48] net: lantiq_xrx200: fix statistics of received bytes Date: Mon, 3 Jan 2022 15:23:58 +0100 Message-Id: <20220103142054.188635921@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220103142053.466768714@linuxfoundation.org> References: <20220103142053.466768714@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aleksander Jan Bajkowski [ Upstream commit 5be60a945329d82f06fc755a43eeefbfc5f77d72 ] Received frames have FCS truncated. There is no need to subtract FCS length from the statistics. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/lantiq_xrx200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c index 072075bc60ee9..500511b72ac60 100644 --- a/drivers/net/ethernet/lantiq_xrx200.c +++ b/drivers/net/ethernet/lantiq_xrx200.c @@ -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; } -- 2.34.1