From: Adam Baker Date: Sun, 9 Mar 2008 21:43:27 +0000 (+0100) Subject: rt2x00:correct rx packet length for USB devices X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd07e06380a1fe2b2c505d00563a63cfb63d7ceb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 ICV. Signed-off-by: Adam Baker Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index eec91111e765..5a331674dcb2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c @@ -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); } /*