Return-path: Received: from nbd.name ([46.4.11.11]:57807 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756303Ab3HFMSY (ORCPT ); Tue, 6 Aug 2013 08:18:24 -0400 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, sujith@msujith.org Subject: [PATCH v2 08/12] ath9k: fix clearing expired A-MPDU subframes in tx completion Date: Tue, 6 Aug 2013 14:18:09 +0200 Message-Id: <1375791493-83971-8-git-send-email-nbd@openwrt.org> (sfid-20130806_141837_930103_50CE8676) In-Reply-To: <1375791493-83971-1-git-send-email-nbd@openwrt.org> References: <1375791493-83971-1-git-send-email-nbd@openwrt.org> Sender: linux-wireless-owner@vger.kernel.org List-ID: When the tid aggregation state has been marked as inactive, free completed tx packets immediately. When a new aggregation session has not been initialized yet, the BAW checks do not recognize it as expired. Might fix potential stalls in setting up a new aggregation session. Signed-off-by: Felix Fietkau --- drivers/net/wireless/ath/ath9k/xmit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index e69f7fe..3ede3e9 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -520,7 +520,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, tx_info = IEEE80211_SKB_CB(skb); fi = get_frame_info(skb); - if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) { + if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno) || + !tid->active) { /* * Outside of the current BlockAck window, * maybe part of a previous session -- 1.8.0.2