Skip to content

Commit 42cbe78

Browse files
moore-brosgregkh
authored andcommitted
wifi: mt76: mt7921: Reset ampdu_state state in case of failure in mt76_connac2_tx_check_aggr()
[ Upstream commit 53ffffe ] 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: 163f4d2 ("mt76: mt7921: add MAC support") Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20251216005930.9412-1-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 811fc63 commit 42cbe78

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,10 @@ void mt76_connac2_tx_check_aggr(struct ieee80211_sta *sta, __le32 *txwi)
11531153
return;
11541154

11551155
wcid = (struct mt76_wcid *)sta->drv_priv;
1156-
if (!test_and_set_bit(tid, &wcid->ampdu_state))
1157-
ieee80211_start_tx_ba_session(sta, tid, 0);
1156+
if (!test_and_set_bit(tid, &wcid->ampdu_state)) {
1157+
if (ieee80211_start_tx_ba_session(sta, tid, 0))
1158+
clear_bit(tid, &wcid->ampdu_state);
1159+
}
11581160
}
11591161
EXPORT_SYMBOL_GPL(mt76_connac2_tx_check_aggr);
11601162

0 commit comments

Comments
 (0)