From patchwork Sat Mar 1 12:52:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Dimitrov X-Patchwork-Id: 3746891 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B97739F381 for ; Sat, 1 Mar 2014 12:53:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E44A42035D for ; Sat, 1 Mar 2014 12:53:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 290F62016C for ; Sat, 1 Mar 2014 12:53:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752810AbaCAMwo (ORCPT ); Sat, 1 Mar 2014 07:52:44 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:40196 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771AbaCAMwn (ORCPT ); Sat, 1 Mar 2014 07:52:43 -0500 Received: by mail-ea0-f173.google.com with SMTP id r15so1934329ead.18 for ; Sat, 01 Mar 2014 04:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Tgm8Wvf978YTsvxyrbY8KwgbyFQgnUHpttt3DhcJ/qQ=; b=iERUxxFHQbe3zFAyZ46lln7rJCUc9DTxAahJ0uoZFZubZh6JLJk33lxcKzWHJ39j3X 9FUGM/oNW8FFVG/Dd2pxyqsaJf9RSagrIoUsMu74DrZzHuD8odwhajk66X2RmwyU+zg4 zY1guQKbJTiTJHdZDVNIon+F/TBpFM1o7z8iFF2y/lB+kJPNO1jwrZvnJQ6MacCY5BaH XT6CuCD4wuPkoTzKhXZIgmKwsXb9ZBn9yK/2aOzXKwVOpzW/TRzX3FRqOrJXPsJbMwCq Au1QR88jLvE6wI+GOu9dubWU4zWUL9NHi4dlqBrJurCJF+zWx47S++cNY/0Yfv0woowe ytgg== X-Received: by 10.15.23.194 with SMTP id h42mr27628427eeu.32.1393678362416; Sat, 01 Mar 2014 04:52:42 -0800 (PST) Received: from localhost.localdomain ([46.249.74.23]) by mx.google.com with ESMTPSA id j42sm23203522eep.21.2014.03.01.04.52.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 01 Mar 2014 04:52:41 -0800 (PST) From: Ivaylo Dimitrov To: Cc: will.deacon@arm.com, pali.rohar@gmail.com, pavel@ucw.cz, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Ivaylo Dimitrov Subject: [PATCH] wl1251: use skb_trim to make skb shorter Date: Sat, 1 Mar 2014 14:52:06 +0200 Message-Id: <1393678326-23535-1-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <20140225105756.GB22279@mudshark.cambridge.arm.com> References: <20140225105756.GB22279@mudshark.cambridge.arm.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/net/wireless/ti/wl1251/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;