[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242245441-15027-1-git-send-email-jacmet@sunsite.dk>
Date: Wed, 13 May 2009 22:10:41 +0200
From: Peter Korsgaard <jacmet@...site.dk>
To: netdev@...r.kernel.org, steve.glendinning@...c.com,
davem@...emloft.net
Cc: Peter Korsgaard <jacmet@...site.dk>
Subject: [PATCH 2/2] 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@...site.dk>
---
drivers/net/usb/smsc95xx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
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);
--
1.6.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists