Skip to content

Commit 195e2d9

Browse files
Rafał Miłeckidavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e394881 commit 195e2d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bcm4908_enet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight)
567567

568568
dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE);
569569

570-
skb_put(slot.skb, len - 4 + 2);
570+
skb_put(slot.skb, len - ETH_FCS_LEN);
571571
slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev);
572572
netif_receive_skb(slot.skb);
573573

0 commit comments

Comments
 (0)