diff mbox

[2/2] smsc95xx: strip ethernet fcs (crc) on receive path

Message ID 1242245441-15027-1-git-send-email-jacmet@sunsite.dk
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Peter Korsgaard May 13, 2009, 8:10 p.m. UTC
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>
---
 drivers/net/usb/smsc95xx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Steve Glendinning May 17, 2009, 6:58 p.m. UTC | #1
Peter Korsgaard <jacmet@gmail.com> wrote on 13/05/2009 21:10:41:

> 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>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller May 18, 2009, 4:06 a.m. UTC | #2
From: Peter Korsgaard <jacmet@sunsite.dk>
Date: Wed, 13 May 2009 22:10:41 +0200

> 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>

Applied to net-next-2.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 5a72833..89a91f8 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);