[PATCH] wifi: mt76: mt7925: add mutex protection in resume path
Zac Bowling
zbowling at gmail.com
Fri Jan 2 12:03:14 PST 2026
From: Zac Bowling <zac at zacbowling.com>
Add mutex protection around mt7925_mcu_set_deep_sleep() and
mt7925_regd_update() calls in the resume path to prevent
potential race conditions during resume operations.
These MCU operations require serialization, and the resume
path was the only call site missing mutex protection.
Found by static analysis (sparse/coccinelle).
---
drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
index ca868619e1b7..b6c90c5f7e91 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
@@ -583,10 +583,12 @@ static int _mt7925_pci_resume(struct device *device, bool restore)
}
/* restore previous ds setting */
+ mt792x_mutex_acquire(dev);
if (!pm->ds_enable)
mt7925_mcu_set_deep_sleep(dev, false);
mt7925_regd_update(dev);
+ mt792x_mutex_release(dev);
failed:
pm->suspended = false;
--
2.51.0
More information about the Linux-mediatek
mailing list