From df18acca8eb13c8cf55fa45e9f9231dc51f64d98 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 13 May 2009 10:10:41 +0000 Subject: [PATCH] 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 Tested-by: Steve Glendinning Acked-by: Steve Glendinning Signed-off-by: David S. Miller --- drivers/net/usb/smsc95xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 5a7283372b53..89a91f8c22de 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -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); -- 2.30.2