From: Ivaylo Dimitrov Date: Sat, 1 Mar 2014 12:52:06 +0000 (+0200) Subject: wl1251: use skb_trim to make skb shorter X-Git-Tag: accepted/tizen/common/20141203.182822~316^2~18^2^2~166 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7661e97542d57d54317407ff4790e2d6d94a0852;p=platform%2Fkernel%2Flinux-arm64.git wl1251: use skb_trim to make skb shorter the current code is directly setting skb->len, which is not correct and brings problems with HAVE_EFFICIENT_UNALIGNED_ACCESS enabled in config Signed-off-by: Ivaylo Dimitrov Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ti/wl1251/rx.c b/drivers/net/wireless/ti/wl1251/rx.c index 123c4bb..cde0eaf 100644 --- a/drivers/net/wireless/ti/wl1251/rx.c +++ b/drivers/net/wireless/ti/wl1251/rx.c @@ -180,7 +180,7 @@ static void wl1251_rx_body(struct wl1251 *wl, wl1251_mem_read(wl, rx_packet_ring_addr, rx_buffer, length); /* The actual length doesn't include the target's alignment */ - skb->len = desc->length - PLCP_HEADER_LENGTH; + skb_trim(skb, desc->length - PLCP_HEADER_LENGTH); fc = (u16 *)skb->data;