From 66a3f666e962c92ce07ee084159a594b3baec55d Mon Sep 17 00:00:00 2001 From: Zac Bowling Date: Thu, 1 Jan 2026 15:24:57 -0800 Subject: [PATCH] wifi: mt76: mt7925: add mutex protection in resume path Add mutex protection around mt7925_mcu_set_deep_sleep() and mt7925_mcu_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). --- mt7925/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mt7925/pci.c b/mt7925/pci.c index c4161754c..6fb0d16f7 100644 --- a/mt7925/pci.c +++ b/mt7925/pci.c @@ -582,10 +582,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_mcu_regd_update(dev, mdev->alpha2, dev->country_ie_env); + mt792x_mutex_release(dev); failed: pm->suspended = false;