mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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>
This commit is contained in:
parent
0d152de569
commit
03ab7461df
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user