Chad MonroeandFelix Fietkau 59676919ea wifi: mt76: mt7996: fix non-MLD station num_sta leak
The MLO link-reconfiguration rework moved the per-phy num_sta
decrement inside a link_valid guard. link_valid is only set for
MLO links, but num_sta is incremented for every station link,
including the non-MLO deflink. Non-MLO stations bump num_sta
on association and never drop it on removal.

A non-zero num_sta forces connected-mode off-channel scanning which
prevents the directed probe exchange needed to find hidden APs.

Decrement phy->num_sta on the actual link teardown, pairing it with
the unconditional increment on link creation.

Fixes: 018f60316d ("wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()")
Signed-off-by: Chad Monroe <chad@monroe.io>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-01 10:46:39 +02:00
2021-04-14 09:12:11 +02:00
2025-10-13 11:11:19 +02:00
2026-05-04 08:37:03 +00:00
S
Description
mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
BSD-3-Clause
127 MiB
Languages
C 99.7%
Perl 0.2%
Makefile 0.1%