diff mbox series

[3/3] mt76: mt7921s: run sleep mode by default

Message ID 9025e5bd5212cab4bd72fd76d35b205980499056.1642061035.git.objelf@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/3] mt76: sdio: remove those unnecessary buffers in sdio.xmit_buf | expand

Commit Message

Sean Wang Jan. 13, 2022, 8:23 a.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

Apply sleep mode by default to reduce power consumption as possible.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7921/init.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Lorenzo Bianconi Jan. 13, 2022, 9:03 a.m. UTC | #1
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Apply sleep mode by default to reduce power consumption as possible.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7921/init.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> index ad59ef9839dc..0166a5503aef 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> @@ -226,12 +226,8 @@ 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 = true;
> -		dev->pm.ds_enable = true;
> -	}
> +	dev->pm.enable = true;
> +	dev->pm.ds_enable = true;

cool :)
can you please rebase this patch ontop of the following one?
Regards,
Lorenzo

https://patchwork.kernel.org/project/linux-wireless/patch/f6ad709b1a64152b5955e71b7eef9f9c4c7f127e.1641893305.git.lorenzo@kernel.org/

>  
>  	if (mt76_is_sdio(&dev->mt76))
>  		hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index ad59ef9839dc..0166a5503aef 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -226,12 +226,8 @@  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 = true;
-		dev->pm.ds_enable = true;
-	}
+	dev->pm.enable = true;
+	dev->pm.ds_enable = true;
 
 	if (mt76_is_sdio(&dev->mt76))
 		hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;