mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
e394881172
commit
195e2d9feb
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue