Skip to content

Commit 56aecad

Browse files
Quanzhoucengregkh
authored andcommitted
wifi: mt76: mt7925: fix AMPDU state handling in mt7925_tx_check_aggr
commit bb8e38f upstream. Previously, the AMPDU state bit for a given TID was set before attempting to start a BA session, which could result in the AMPDU state being marked active even if ieee80211_start_tx_ba_session() failed. This patch changes the logic to only set the AMPDU state bit after successfully starting a BA session, ensuring proper synchronization between AMPDU state and BA session status. This fixes potential issues with aggregation state tracking and improves compatibility with mac80211 BA session management. Fixes: 44eb173 ("wifi: mt76: mt7925: add link handling in mt7925_txwi_free") Cc: stable@vger.kernel.org Signed-off-by: Quan Zhou <quan.zhou@mediatek.com> Reviewed-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/d5960fbced0beaf33c30203f7f8fb91d0899c87b.1764228973.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9756b3d commit 56aecad

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • drivers/net/wireless/mediatek/mt76/mt7925

drivers/net/wireless/mediatek/mt76/mt7925/mac.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,10 @@ static void mt7925_tx_check_aggr(struct ieee80211_sta *sta, struct sk_buff *skb,
882882
else
883883
mlink = &msta->deflink;
884884

885-
if (!test_and_set_bit(tid, &mlink->wcid.ampdu_state))
886-
ieee80211_start_tx_ba_session(sta, tid, 0);
885+
if (!test_and_set_bit(tid, &mlink->wcid.ampdu_state)) {
886+
if (ieee80211_start_tx_ba_session(sta, tid, 0))
887+
clear_bit(tid, &mlink->wcid.ampdu_state);
888+
}
887889
}
888890

889891
static bool

0 commit comments

Comments
 (0)