From patchwork Fri Nov 4 09:27:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 9412119 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A945160722 for ; Fri, 4 Nov 2016 09:28:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8FA62A336 for ; Fri, 4 Nov 2016 09:28:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C5B02ADBD; Fri, 4 Nov 2016 09:28:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4DA72A336 for ; Fri, 4 Nov 2016 09:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbcKDJ2A (ORCPT ); Fri, 4 Nov 2016 05:28:00 -0400 Received: from nbd.name ([46.4.11.11]:53275 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbcKDJ17 (ORCPT ); Fri, 4 Nov 2016 05:27:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=UFYwE0TjDSsQlOH3YsAh0nXQ5i1hqn4GV9y/ZxNWOYs=; b=jMicsMPtvkuWflikAtTJc5WIFE8lEPum6Lem+Xc+znBhLprK3gvnj49B4RkssTOR6yg686+0W5jVqXf98XNyLB9PRU80u8E8DNidw/FUrtPtr7S2x3A7Yq6z7sT1CMSgh8KZl7yfxGYy0IRp5bzITTji2OXHXybV9/kZLAenYXE=; Received: by nf-4.local (Postfix, from userid 501) id B73D416A2AB37; Fri, 4 Nov 2016 10:27:54 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: toke@toke.dk, johannes@sipsolutions.net Subject: [PATCH 3/3] mac80211: fix A-MSDU aggregation with fast-xmit + txq Date: Fri, 4 Nov 2016 10:27:54 +0100 Message-Id: <20161104092754.91649-3-nbd@nbd.name> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161104092754.91649-1-nbd@nbd.name> References: <20161104092754.91649-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A-MSDU aggregation alters the QoS header after a frame has been enqueued, so it needs to be ready before enqueue and not overwritten again afterwards Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue") Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen --- net/mac80211/tx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 390b425..2c21b70 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3235,7 +3235,6 @@ static void ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata, if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; - *ieee80211_get_qos_ctl(hdr) = tid; hdr->seq_ctrl = ieee80211_tx_next_seq(sta, tid); } else { info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; @@ -3360,6 +3359,11 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, (tid_tx ? IEEE80211_TX_CTL_AMPDU : 0); info->control.flags = IEEE80211_TX_CTRL_FAST_XMIT; + if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { + tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; + *ieee80211_get_qos_ctl(hdr) = tid; + } + __skb_queue_head_init(&tx.skbs); tx.flags = IEEE80211_TX_UNICAST;