Commit 195e2d9f authored by Rafał Miłecki's avatar Rafał Miłecki Committed by David S. Miller

net: broadcom: bcm4908_enet: fix received skb length

Use ETH_FCS_LEN instead of magic value and drop incorrect + 2
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e3948811
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment