From patchwork Fri Nov 4 09:27:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 9412123 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 0865B60723 for ; Fri, 4 Nov 2016 09:28:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 084E72A336 for ; Fri, 4 Nov 2016 09:28:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F13B12ADBD; Fri, 4 Nov 2016 09:28:03 +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 A69BF2A516 for ; Fri, 4 Nov 2016 09:28:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754371AbcKDJ2D (ORCPT ); Fri, 4 Nov 2016 05:28:03 -0400 Received: from nbd.name ([46.4.11.11]:53279 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbcKDJ2A (ORCPT ); Fri, 4 Nov 2016 05:28:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Message-Id:Date:Subject:Cc:To:From; bh=HzMvrTwNo3MvtCFW+mI/gnIzfiC/ip/IdW9wUovsPTM=; b=O66BfNXAD8WV3dxPzWtZI69Hsi39kKS1S6rp1wM7DsmzfRceiLWUlqi8m8od8kHQZeR4t+28FjGJ4qVKG5Y9r+QcE+3ZY1RmIPkcT3d2OBznY3+4nGPIoTkj90GoYoUnUoDfJ7L2YTbDjUpMHMcOV2pANhzUZCQ7Wi1Olhswurc=; Received: by nf-4.local (Postfix, from userid 501) id AEBF816A2AB34; 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 1/3] mac80211: update A-MPDU flag on tx dequeue Date: Fri, 4 Nov 2016 10:27:52 +0100 Message-Id: <20161104092754.91649-1-nbd@nbd.name> X-Mailer: git-send-email 2.10.1 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 The sequence number counter is used to derive the starting sequence number. Since that counter is updated on tx dequeue, the A-MPDU flag needs to be up to date at the tme of dequeue as well. This patch prevents sending more A-MPDU frames after the session has been terminated and also ensures that aggregation starts right after the session has been established 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 62ccaf6..c380e85 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3451,6 +3451,11 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, goto begin; } + if (test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags)) + info->flags |= IEEE80211_TX_CTL_AMPDU; + else + info->flags &= ~IEEE80211_TX_CTL_AMPDU; + if (info->control.flags & IEEE80211_TX_CTRL_FAST_XMIT) { struct sta_info *sta = container_of(txq->sta, struct sta_info, sta);