summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-02-11 13:12:38 +0100
committerDavid S. Miller <davem@davemloft.net>2021-02-11 15:04:17 -0800
commit195e2d9febfbeef1d09701c387925e5c2f5cb038 (patch)
treef7da824229f19fe7973c42ebbc253e39e33ac8d5 /drivers/net/ethernet/broadcom
parente3948811720341f99cd5cb4a8a650473400ec4f8 (diff)
net: broadcom: bcm4908_enet: fix received skb length
Use ETH_FCS_LEN instead of magic value and drop incorrect + 2 Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bcm4908_enet.c2
1 files changed, 1 insertions, 1 deletions
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);