From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E712D369999; Wed, 20 May 2026 17:19:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779297573; cv=none; b=WcElt8u3Yk6YPu5I2gm9qZ5oNO+BC5ABFLiQHNRQDb6IOJk9Gl5twl/1jYmgWp2AdiN4H1mDCu8EOYEGH15Auf4rwzUvy9F+93ccagmkgamQFZ/ussSkd/r8598QadUPzJqOAXqVBhvYXNC4V0WZlo5kTKx5Ja4qPNGYUhnjDr8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779297573; c=relaxed/simple; bh=SY7yXqxaUEYmdqBfpJzsllbUQx5BW7uYFTZ7uaW5AAU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HDdXeCfPKqc3tbpSKyzvTIbgc4KkzKB+4ZUz5dqw8pApwhOk0aMhvuxSiLNHzLfWRAtS0kufsnb6dMAwxHjxG85/d2BvTrIpprkmOg3fZZ1GiguCg+iAfxE8imG28CaORlYMs+2WbNNADvPJQq9qETJ2pmhbyTb0UVjLpVXT4M4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rHlY1SyK; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rHlY1SyK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 594A41F000E9; Wed, 20 May 2026 17:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779297571; bh=dS160kLfdihRPU0j9rnGCeLehwtdwkVTISRsiAOfVJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rHlY1SyKt2ooMzlm/ljdiQE5oCC5DnbvXwmaK1q82HHB10L/t+gC8RykT+84kgLUh lwSZdJTddeer+2ewvInaOD+jK07d+QuZgq1AX8+WTejN4SrEaTEprCohyTLHq0Wqic /lzdaXFhtS53gF8DtBB+fUANh08ttW7sUEJ7mOL0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sean Wang , Felix Fietkau , Sasha Levin Subject: [PATCH 6.18 080/957] wifi: mt76: mt7921: Reset ampdu_state state in case of failure in mt76_connac2_tx_check_aggr() Date: Wed, 20 May 2026 18:09:23 +0200 Message-ID: <20260520162136.296068291@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520162134.554764788@linuxfoundation.org> References: <20260520162134.554764788@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sean Wang [ Upstream commit 53ffffeb9624ffab6d9a3b1da8635a23f1172b5e ] Reset ampdu_state if ieee80211_start_tx_ba_session() fails in mt76_connac2_tx_check_aggr(), otherwise the driver may incorrectly assume aggregation is active and skip future BA setup attempts. Fixes: 163f4d22c118 ("mt76: mt7921: add MAC support") Signed-off-by: Sean Wang Link: https://patch.msgid.link/20251216005930.9412-1-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c index 837bd0f136fa1..b78cfa1324f3f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c @@ -1150,8 +1150,10 @@ void mt76_connac2_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi) return; wcid = (struct mt76_wcid *)sta->drv_priv; - if (!test_and_set_bit(tid, &wcid->ampdu_state)) - ieee80211_start_tx_ba_session(sta, tid, 0); + if (!test_and_set_bit(tid, &wcid->ampdu_state)) { + if (ieee80211_start_tx_ba_session(sta, tid, 0)) + clear_bit(tid, &wcid->ampdu_state); + } } EXPORT_SYMBOL_GPL(mt76_connac2_tx_check_aggr); -- 2.53.0