diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-24 18:13:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-24 18:13:11 -0400 |
commit | 8b3f6af86378d0a10ca2f1ded1da124aef13b62c (patch) | |
tree | de6ca90295730343c495be8d98be8efa322140ef /drivers/net/usb | |
parent | 139d6065c83071d5f66cd013a274a43699f8e2c1 (diff) | |
parent | 94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/cpc-usb/TODO
drivers/staging/cpc-usb/cpc-usb_drv.c
drivers/staging/cpc-usb/cpc.h
drivers/staging/cpc-usb/cpc_int.h
drivers/staging/cpc-usb/cpcusb.h
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_eem.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 45cebfb302cf..23300656c266 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -300,20 +300,23 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
300 | return 0; | 300 | return 0; |
301 | } | 301 | } |
302 | 302 | ||
303 | crc = get_unaligned_le32(skb2->data | ||
304 | + len - ETH_FCS_LEN); | ||
305 | skb_trim(skb2, len - ETH_FCS_LEN); | ||
306 | |||
307 | /* | 303 | /* |
308 | * The bmCRC helps to denote when the CRC field in | 304 | * The bmCRC helps to denote when the CRC field in |
309 | * the Ethernet frame contains a calculated CRC: | 305 | * the Ethernet frame contains a calculated CRC: |
310 | * bmCRC = 1 : CRC is calculated | 306 | * bmCRC = 1 : CRC is calculated |
311 | * bmCRC = 0 : CRC = 0xDEADBEEF | 307 | * bmCRC = 0 : CRC = 0xDEADBEEF |
312 | */ | 308 | */ |
313 | if (header & BIT(14)) | 309 | if (header & BIT(14)) { |
314 | crc2 = ~crc32_le(~0, skb2->data, skb2->len); | 310 | crc = get_unaligned_le32(skb2->data |
315 | else | 311 | + len - ETH_FCS_LEN); |
312 | crc2 = ~crc32_le(~0, skb2->data, skb2->len | ||
313 | - ETH_FCS_LEN); | ||
314 | } else { | ||
315 | crc = get_unaligned_be32(skb2->data | ||
316 | + len - ETH_FCS_LEN); | ||
316 | crc2 = 0xdeadbeef; | 317 | crc2 = 0xdeadbeef; |
318 | } | ||
319 | skb_trim(skb2, len - ETH_FCS_LEN); | ||
317 | 320 | ||
318 | if (is_last) | 321 | if (is_last) |
319 | return crc == crc2; | 322 | return crc == crc2; |