Skip to content

Commit 151a6cf

Browse files
committed
wifi: mt76: mt7996: don't leak MLD group index on remap alloc failure
mt7996_change_vif_links() sets the mld_idx_mask group bit before allocating the remap index. If the remap allocation fails it jumped to the exit without clearing that bit, permanently consuming one of the 16 MLD group slots. Release the group bit on the error path. Fixes: 4fb3b4e ("wifi: mt76: mt7996: fix MLD group index assignment") Link: https://patch.msgid.link/20260724124813.3961474-9-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent 50c66ba commit 151a6cf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/net/wireless/mediatek/mt76/mt7996

drivers/net/wireless/mediatek/mt76/mt7996/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,7 @@ mt7996_change_vif_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
24582458

24592459
idx = get_free_idx(dev->mld_remap_idx_mask, 0, 15) - 1;
24602460
if (idx < 0) {
2461+
dev->mld_idx_mask &= ~BIT_ULL(mvif->mld_group_idx);
24612462
ret = -ENOSPC;
24622463
goto out;
24632464
}

0 commit comments

Comments
 (0)