From patchwork Sun Feb 10 21:06:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Wetzel X-Patchwork-Id: 10805045 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-2.web.codeaurora.org (Postfix) with ESMTP id 6D73713A4 for ; Mon, 11 Feb 2019 01:53:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5360429AD7 for ; Mon, 11 Feb 2019 01:53:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4431629ADB; Mon, 11 Feb 2019 01:53:26 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 B4CC229AD7 for ; Mon, 11 Feb 2019 01:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726158AbfBKBxA (ORCPT ); Sun, 10 Feb 2019 20:53:00 -0500 Received: from 4.mo2.mail-out.ovh.net ([87.98.172.75]:46378 "EHLO 4.mo2.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbfBKBw7 (ORCPT ); Sun, 10 Feb 2019 20:52:59 -0500 X-Greylist: delayed 8398 seconds by postgrey-1.27 at vger.kernel.org; Sun, 10 Feb 2019 20:52:59 EST Received: from player755.ha.ovh.net (unknown [10.109.160.232]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id EF0EC1836D4 for ; Sun, 10 Feb 2019 22:06:47 +0100 (CET) Received: from awhome.eu (p579AAB97.dip0.t-ipconnect.de [87.154.171.151]) (Authenticated sender: postmaster@awhome.eu) by player755.ha.ovh.net (Postfix) with ESMTPSA id B0D8D2A708C2; Sun, 10 Feb 2019 21:06:46 +0000 (UTC) From: Alexander Wetzel DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wetzel-home.de; s=wetzel-home; t=1549832805; bh=KY6TJSyWNHTUFJpACrDg8lSGQh1b9Z4/kNsjsgZEJh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gu4mGamcptSvMvWcMIODsmnX9QPoibSyQyukEGBqzYfWlXVFs7gI68HfHkUB8U+bA kwuGTdliPs5iczc0lAVyF+IYBSYLp813saueOvNzX1wIMDXQus3CZRNaeMu2h46XxY eG6fhhNeWE892Khu2DkdlEctN/NX+I1EWV71qoNk= To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Alexander Wetzel Subject: [RFC PATCH v3 12/12] ath9k: EXT_KEY_ID A-MPDU API update Date: Sun, 10 Feb 2019 22:06:20 +0100 Message-Id: <20190210210620.31181-13-alexander@wetzel-home.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190210210620.31181-1-alexander@wetzel-home.de> References: <20190210210620.31181-1-alexander@wetzel-home.de> MIME-Version: 1.0 X-Ovh-Tracer-Id: 10549400653003824327 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrleeggdeiiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecu 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 When using Extended Key ID mac80211 drops @IEEE80211_TX_CTL_AMPDU for the last packet which can be added to a A-MPDU in preparation. Finalize A-MPDU immediately and start a new aggregation. Signed-off-by: Alexander Wetzel --- This is the (b)leading edge of my current attempt to figure out a solution to the "must not aggregate keyid 0 and 1 frames together" problem. I've not even tested that patch properly, yet.. So it only shows how I think ath9k driver can use the A-MPDU border signal to send out the A-MPDU frame currently under construction. May be useful to figure out if we want to implement A-MPDU border signal in mac80211, through. drivers/net/wireless/ath/ath9k/xmit.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index a24265018cb2..84bbce6f212f 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -990,10 +990,8 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq, * from a previous session or a failed attempt in the queue. * Send them out as normal data frames */ - if (!tid->active) + if (!tid->active) { tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU; - - if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) { bf->bf_state.bf_type = 0; return bf; } @@ -1017,12 +1015,18 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq, break; } - if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) { + if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno) || + !(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) { struct ath_tx_status ts = {}; struct list_head bf_head; INIT_LIST_HEAD(&bf_head); - list_add(&bf->list, &bf_head); + if (tx_info->flags & IEEE80211_TX_CTL_AMPDU && + tid->bar_index <= ATH_BA_INDEX(tid->seq_start, seqno)) + list_add(&bf->list, &bf_head); + else + ath_tx_addto_baw(sc, tid, bf); + ath_tx_update_baw(sc, tid, bf); ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0); continue;