]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mt76: mt7921: run mt7921_mcu_fw_log_2_host holding mt76 mutex
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 15 Apr 2021 22:21:54 +0000 (00:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:53:00 +0000 (10:53 +0200)
[ Upstream commit 987c8fb4de437344f19a23d074c06faf67520a11 ]

Wake the chip before configuring the mcu log level

Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c

index 6aa11ca6fc81a3557ace4ee27ac7f9515ebda925..87a7ea12f3b3c7ff42909feded159d00ab7afbb4 100644 (file)
@@ -9,10 +9,13 @@ mt7921_fw_debug_set(void *data, u64 val)
 {
        struct mt7921_dev *dev = data;
 
-       dev->fw_debug = (u8)val;
+       mt7921_mutex_acquire(dev);
 
+       dev->fw_debug = (u8)val;
        mt7921_mcu_fw_log_2_host(dev, dev->fw_debug);
 
+       mt7921_mutex_release(dev);
+
        return 0;
 }