mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
smsc95xx: strip ethernet fcs (crc) on receive path
The smsc95xx driver was forwarding the trailing fcs on received frames up the stack leading to confusion in tcpdump. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Tested-by: Steve Glendinning <steve.glendinning@smsc.com> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
61189c78bd
commit
df18acca8e
@ -1134,7 +1134,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
if (skb->len == size) {
|
||||
if (pdata->use_rx_csum)
|
||||
smsc95xx_rx_csum_offload(skb);
|
||||
|
||||
skb_trim(skb, skb->len - 4); /* remove fcs */
|
||||
skb->truesize = size + sizeof(struct sk_buff);
|
||||
|
||||
return 1;
|
||||
@ -1152,7 +1152,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
|
||||
if (pdata->use_rx_csum)
|
||||
smsc95xx_rx_csum_offload(ax_skb);
|
||||
|
||||
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
|
||||
ax_skb->truesize = size + sizeof(struct sk_buff);
|
||||
|
||||
usbnet_skb_return(dev, ax_skb);
|
||||
|
Loading…
Reference in New Issue
Block a user