[PATCH 4/4] wifi: mt76: connac: synchronize token_count access in mt76_connac_skip_fw_pmctrl
Felix Fietkau
nbd at nbd.name
Thu Sep 4 05:54:31 PDT 2025
On 04.09.25 05:06, Mingyen Hsieh wrote:
> From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
>
> Read dev->token_count under token_lock to prevent race conditions with
> concurrent token updates, ensuring accurate power management decisions.
>
> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
I don't understand what kind of race you're trying to solve with this
patch. Are you trying to fix entering powersave while a badly timed tx
is started? Or are you trying to make it go to sleep more reliably
during concurrent cleanup of pending tx?
What context does this race against, and is taking the token lock really
enough to fully close the race?
Thanks,
- Felix
More information about the Linux-mediatek
mailing list