From: Sean Wang <[email protected]>
Apply sleep mode by default to reduce power consumption as possible.
Signed-off-by: Sean Wang <[email protected]>
---
v1 -> v2: rebase on the top of
("mt76: mt7921: toggle runtime-pm adding a monitor vif")
---
drivers/net/wireless/mediatek/mt76/mt7921/init.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index 6059d8a0f227..fa6af85bba7b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -226,14 +226,10 @@ int mt7921_register_device(struct mt7921_dev *dev)
dev->pm.idle_timeout = MT7921_PM_TIMEOUT;
dev->pm.stats.last_wake_event = jiffies;
dev->pm.stats.last_doze_event = jiffies;
-
- /* TODO: mt7921s run sleep mode on default */
- if (mt76_is_mmio(&dev->mt76)) {
- dev->pm.enable_user = true;
- dev->pm.enable = true;
- dev->pm.ds_enable_user = true;
- dev->pm.ds_enable = true;
- }
+ dev->pm.enable_user = true;
+ dev->pm.enable = true;
+ dev->pm.ds_enable_user = true;
+ dev->pm.ds_enable = true;
if (mt76_is_sdio(&dev->mt76))
hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;
--
2.25.1
On Jan 15, Sean Wang wrote:
> From: Sean Wang <[email protected]>
>
> Apply sleep mode by default to reduce power consumption as possible.
Acked-by: Lorenzo Bianconi <[email protected]>
>
> Signed-off-by: Sean Wang <[email protected]>
> ---
> v1 -> v2: rebase on the top of
> ("mt76: mt7921: toggle runtime-pm adding a monitor vif")
> ---
> drivers/net/wireless/mediatek/mt76/mt7921/init.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> index 6059d8a0f227..fa6af85bba7b 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> @@ -226,14 +226,10 @@ int mt7921_register_device(struct mt7921_dev *dev)
> dev->pm.idle_timeout = MT7921_PM_TIMEOUT;
> dev->pm.stats.last_wake_event = jiffies;
> dev->pm.stats.last_doze_event = jiffies;
> -
> - /* TODO: mt7921s run sleep mode on default */
> - if (mt76_is_mmio(&dev->mt76)) {
> - dev->pm.enable_user = true;
> - dev->pm.enable = true;
> - dev->pm.ds_enable_user = true;
> - dev->pm.ds_enable = true;
> - }
> + dev->pm.enable_user = true;
> + dev->pm.enable = true;
> + dev->pm.ds_enable_user = true;
> + dev->pm.ds_enable = true;
>
> if (mt76_is_sdio(&dev->mt76))
> hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;
> --
> 2.25.1
>