提交 df18acca 编写于 作者: P Peter Korsgaard 提交者: David S. Miller

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: NPeter Korsgaard <jacmet@sunsite.dk>
Tested-by: NSteve Glendinning <steve.glendinning@smsc.com>
Acked-by: NSteve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 61189c78
...@@ -1134,7 +1134,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -1134,7 +1134,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
if (skb->len == size) { if (skb->len == size) {
if (pdata->use_rx_csum) if (pdata->use_rx_csum)
smsc95xx_rx_csum_offload(skb); smsc95xx_rx_csum_offload(skb);
skb_trim(skb, skb->len - 4); /* remove fcs */
skb->truesize = size + sizeof(struct sk_buff); skb->truesize = size + sizeof(struct sk_buff);
return 1; return 1;
...@@ -1152,7 +1152,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -1152,7 +1152,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
if (pdata->use_rx_csum) if (pdata->use_rx_csum)
smsc95xx_rx_csum_offload(ax_skb); smsc95xx_rx_csum_offload(ax_skb);
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
ax_skb->truesize = size + sizeof(struct sk_buff); ax_skb->truesize = size + sizeof(struct sk_buff);
usbnet_skb_return(dev, ax_skb); usbnet_skb_return(dev, ax_skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册