[PATCH 1/4] wifi: mt76: mt792x: protect state->cc_* counters with cc_lock

Felix Fietkau nbd at nbd.name
Mon Sep 8 22:15:16 PDT 2025


On 04.09.25 05:06, Mingyen Hsieh wrote:
> From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
> 
> The updates to state->cc_* (cc_busy, cc_tx, etc.) lack synchronization,
> risking race conditions and inconsistent statistics.
> 
> Add cc_lock protection to ensure atomic updates.
> 
> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>

I don't see any race conditions here. Those counters are only updated 
and accessed with dev->mutex held.

- Felix



More information about the Linux-mediatek mailing list