wifi: mt76: mt7925: fix AMPDU state handling in mt7925_tx_check_aggr

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: 44eb173bdd4f ("wifi: mt76: mt7925: add link handling in mt7925_txwi_free")
Cc: [email protected]

Signed-off-by: Quan Zhou <[email protected]>
Reviewed-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/d5960fbced0beaf33c30203f7f8fb91d0899c87b.1764228973.git.quan.zhou@mediatek.com
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Quan Zhou
2026-01-27 10:04:45 +00:00
committed by Felix Fietkau
parent 9fa302a683
commit eeb6c8d052
+4 -2
View File
@@ -884,8 +884,10 @@ static void mt7925_tx_check_aggr(struct ieee80211_sta *sta, struct sk_buff *skb,
else
mlink = &msta->deflink;
if (!test_and_set_bit(tid, &mlink->wcid.ampdu_state))
ieee80211_start_tx_ba_session(sta, tid, 0);
if (!test_and_set_bit(tid, &mlink->wcid.ampdu_state)) {
if (ieee80211_start_tx_ba_session(sta, tid, 0))
clear_bit(tid, &mlink->wcid.ampdu_state);
}
}
static bool