From patchwork Tue Feb 2 13:39:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 8190701 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 69FF3BEEE5 for ; Tue, 2 Feb 2016 13:39:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BB7D202D1 for ; Tue, 2 Feb 2016 13:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9059820253 for ; Tue, 2 Feb 2016 13:39:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752236AbcBBNjS (ORCPT ); Tue, 2 Feb 2016 08:39:18 -0500 Received: from nbd.name ([46.4.11.11]:35710 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751410AbcBBNjR (ORCPT ); Tue, 2 Feb 2016 08:39:17 -0500 Received: by nf-2.local (Postfix, from userid 501) id 4886D130A9E4B; Tue, 2 Feb 2016 14:39:10 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH 1/3] mac80211: move A-MSDU skb_linearize call to ieee80211_amsdu_to_8023s Date: Tue, 2 Feb 2016 14:39:08 +0100 Message-Id: <1454420350-8313-1-git-send-email-nbd@openwrt.org> X-Mailer: git-send-email 2.2.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Prepararation for zero-copy A-MSDU support with page fragment SKBs Signed-off-by: Felix Fietkau --- net/mac80211/rx.c | 3 --- net/wireless/util.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 664e886..1e9308e 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2203,9 +2203,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx) skb->dev = dev; __skb_queue_head_init(&frame_list); - if (skb_linearize(skb)) - return RX_DROP_UNUSABLE; - ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr, rx->sdata->vif.type, rx->local->hw.extra_tx_headroom, true); diff --git a/net/wireless/util.c b/net/wireless/util.c index 9277042..6a40769 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -657,6 +657,9 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, int remaining, err; u8 dst[ETH_ALEN], src[ETH_ALEN]; + if (skb_linearize(skb)) + goto out; + if (has_80211_header) { err = ieee80211_data_to_8023(skb, addr, iftype); if (err)