Commit fd07e063 authored by Adam Baker's avatar Adam Baker Committed by John W. Linville
Browse files

rt2x00:correct rx packet length for USB devices

When fixing up the packet alignment, if we had to add 2 bytes to the front of
the skb we need to remember to take them off the end afterwards. This fixes
reception of encrypted packets which were otherwise failing with an invalid
Signed-off-by: default avatarAdam Baker <>
Signed-off-by: default avatarIvo van Doorn <>
Signed-off-by: default avatarJohn W. Linville <>
parent 8af244cc
...@@ -299,6 +299,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb) ...@@ -299,6 +299,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
memmove(entry->skb->data, entry->skb->data + 2, memmove(entry->skb->data, entry->skb->data + 2,
entry->skb->len - 2); entry->skb->len - 2);
skbdesc->data = entry->skb->data; skbdesc->data = entry->skb->data;
skb_trim(entry->skb,entry->skb->len - 2);
} }
/* /*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment