diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2009-05-13 06:10:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-18 00:03:41 -0400 |
commit | df18acca8eb13c8cf55fa45e9f9231dc51f64d98 (patch) | |
tree | 43cc2aca9a0c8a76982be79474346a9b8a6f316d /drivers/net/usb/smsc95xx.c | |
parent | 61189c78bda846f4682c6003e893362f4305518b (diff) |
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>
Diffstat (limited to 'drivers/net/usb/smsc95xx.c')
-rw-r--r-- | 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 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) | |||
1134 | if (skb->len == size) { | 1134 | if (skb->len == size) { |
1135 | if (pdata->use_rx_csum) | 1135 | if (pdata->use_rx_csum) |
1136 | smsc95xx_rx_csum_offload(skb); | 1136 | smsc95xx_rx_csum_offload(skb); |
1137 | 1137 | skb_trim(skb, skb->len - 4); /* remove fcs */ | |
1138 | skb->truesize = size + sizeof(struct sk_buff); | 1138 | skb->truesize = size + sizeof(struct sk_buff); |
1139 | 1139 | ||
1140 | return 1; | 1140 | return 1; |
@@ -1152,7 +1152,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
1152 | 1152 | ||
1153 | if (pdata->use_rx_csum) | 1153 | if (pdata->use_rx_csum) |
1154 | smsc95xx_rx_csum_offload(ax_skb); | 1154 | smsc95xx_rx_csum_offload(ax_skb); |
1155 | 1155 | skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */ | |
1156 | ax_skb->truesize = size + sizeof(struct sk_buff); | 1156 | ax_skb->truesize = size + sizeof(struct sk_buff); |
1157 | 1157 | ||
1158 | usbnet_skb_return(dev, ax_skb); | 1158 | usbnet_skb_return(dev, ax_skb); |