[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210211121239.728-8-zajec5@gmail.com>
Date: Thu, 11 Feb 2021 13:12:38 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Randy Dunlap <rdunlap@...radead.org>,
Masahiro Yamada <masahiroy@...nel.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
Andrew Lunn <andrew@...n.ch>,
Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH net-next 5.12 7/8] net: broadcom: bcm4908_enet: fix received skb length
From: Rafał Miłecki <rafal@...ecki.pl>
Use ETH_FCS_LEN instead of magic value and drop incorrect + 2
Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index 47c1b7d827c5..2e825db3b2f1 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -567,7 +567,7 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight)
dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE);
- skb_put(slot.skb, len - 4 + 2);
+ skb_put(slot.skb, len - ETH_FCS_LEN);
slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev);
netif_receive_skb(slot.skb);
--
2.26.2
Powered by blists - more mailing lists