projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d152de
)
USB: gadget eth: Fix calculate CRC32 in EEM
author
Jiri Pinkava
<jiri.pinkava@vscht.cz>
Sun, 20 Jun 2010 18:05:52 +0000
(20:05 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 30 Jun 2010 15:16:06 +0000
(08:16 -0700)
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>
drivers/usb/gadget/f_eem.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_eem.c
b/drivers/usb/gadget/f_eem.c
index
38226e9
..
95dd466
100644
(file)
--- 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);