mt76: mt7921: do not always disable fw runtime-pm
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 31 Dec 2021 11:36:02 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:34:58 +0000 (16:34 +0200)
commit8b5ce83872b4ceb2ff77076ccefbf5b5523c1626
treed4e0028e1148e294d47b8800dffab3303368dd1a
parent9d721a17505b578cec77ada07a6e36d7ac5fc03c
mt76: mt7921: do not always disable fw runtime-pm

[ Upstream commit b44eeb8cbdf2b88f2844f11e4f263b0abed5b5b0 ]

After commit 'd430dffbe9dd ("mt76: mt7921: fix a possible race
enabling/disabling runtime-pm")', runtime-pm is always disabled in the
fw even if the user requests to enable it toggling debugfs node since
mt7921_pm_interface_iter routine will use pm->enable to configure the fw.
Fix the issue moving enable variable configuration before running
mt7921_pm_interface_iter routine.

Fixes: d430dffbe9dd ("mt76: mt7921: fix a possible race enabling/disabling runtime-pm")
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