summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJiri Pinkava <jiri.pinkava@vscht.cz>2010-06-20 20:05:52 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-06-30 08:16:06 -0700
commit03ab7461df3c74c9418c3f5485ea1127ece1ff79 (patch)
treed0394ffeeb19872c467ef24e2866818afe0acfb8 /drivers/usb
parent0d152de56938361fa2b960db67657b20cdaa6d84 (diff)
USB: gadget eth: Fix calculate CRC32 in EEM
CRC should be calculated for Ethernet frame, not for whole recievede EEM data. This bug shows rarely, because in many times len == skb->len. Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_eem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c
index 38226e9a371..95dd4662d6a 100644
--- a/drivers/usb/gadget/f_eem.c
+++ b/drivers/usb/gadget/f_eem.c
@@ -469,8 +469,7 @@ static int eem_unwrap(struct gether *port,
crc = get_unaligned_le32(skb->data + len
- ETH_FCS_LEN);
crc2 = ~crc32_le(~0,
- skb->data,
- skb->len - ETH_FCS_LEN);
+ skb->data, len - ETH_FCS_LEN);
} else {
crc = get_unaligned_be32(skb->data + len
- ETH_FCS_LEN);