From: Lorenzo Bianconi Date: Thu, 17 Mar 2022 17:08:35 +0000 (+0100) Subject: mt76: mt7921: honor pm user configuration in mt7921_sniffer_interface_iter X-Git-Tag: v6.1-rc5~1274^2~59^2~20^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47eea8ad62a1203ce20b365f7feba23fef62a487;p=platform%2Fkernel%2Flinux-starfive.git mt76: mt7921: honor pm user configuration in mt7921_sniffer_interface_iter Honor runtime-pm user configuration in mt7921_sniffer_interface_iter routine if we do not have a monitor interface. Fixes: 1f12fa34e5dc5 ("mt76: mt7921: don't enable beacon filter when IEEE80211_CONF_CHANGE_MONITOR is set") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c index 1783866..ae86705 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c @@ -489,8 +489,8 @@ mt7921_sniffer_interface_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) bool monitor = !!(hw->conf.flags & IEEE80211_CONF_MONITOR); mt7921_mcu_set_sniffer(dev, vif, monitor); - pm->enable = !monitor; - pm->ds_enable = !monitor; + pm->enable = pm->enable_user && !monitor; + pm->ds_enable = pm->ds_enable_user && !monitor; mt76_connac_mcu_set_deep_sleep(&dev->mt76, pm->ds_enable);