Skip to content

Commit

Permalink
rt2x00:correct rx packet length for USB devices
Browse files Browse the repository at this point in the history
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
ICV.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Adam Baker authored and John W. Linville committed Mar 13, 2008
1 parent 8af244c commit fd07e06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/rt2x00/rt2x00usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
memmove(entry->skb->data, entry->skb->data + 2,
entry->skb->len - 2);
skbdesc->data = entry->skb->data;
skb_trim(entry->skb,entry->skb->len - 2);
}

/*
Expand Down

0 comments on commit fd07e06

Please sign in to comment.