2019-11-01 06:07:09

by Tony Chuang

[permalink] [raw]
Subject: [PATCH v2] rtw88: raise LPS threshold to 50, for less power consumption

From: Yan-Hsuan Chuang <[email protected]>

The LPS threshold was set to 2, means driver will leave LPS
mode if there is more than 2 frames TX/RX for every 2 seconds.
This makes driver enter/leave LPS frequently even if we just
"ping -i1" to the others.

Apparently we do not want to leave LPS mode if there is only
some background traffics or web surfing. By experiment, set
this to 50 is a more reasonable value to lower the over all
power consumption.

Signed-off-by: Yan-Hsuan Chuang <[email protected]>
---

v1 -> v2
* this was originally ("https://patchwork.kernel.org/patch/11211881/")
* but seems module parameter is not a good idea here, just change
the default value to 50 for a general solution

drivers/net/wireless/realtek/rtw88/ps.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw88/ps.h b/drivers/net/wireless/realtek/rtw88/ps.h
index 25925eedbad4..19afceca7d0e 100644
--- a/drivers/net/wireless/realtek/rtw88/ps.h
+++ b/drivers/net/wireless/realtek/rtw88/ps.h
@@ -5,7 +5,7 @@
#ifndef __RTW_PS_H_
#define __RTW_PS_H_

-#define RTW_LPS_THRESHOLD 2
+#define RTW_LPS_THRESHOLD 50

#define POWER_MODE_ACK BIT(6)
#define POWER_MODE_PG BIT(4)
--
2.17.1


2019-11-06 17:56:48

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2] rtw88: raise LPS threshold to 50, for less power consumption

<[email protected]> wrote:

> From: Yan-Hsuan Chuang <[email protected]>
>
> The LPS threshold was set to 2, means driver will leave LPS
> mode if there is more than 2 frames TX/RX for every 2 seconds.
> This makes driver enter/leave LPS frequently even if we just
> "ping -i1" to the others.
>
> Apparently we do not want to leave LPS mode if there is only
> some background traffics or web surfing. By experiment, set
> this to 50 is a more reasonable value to lower the over all
> power consumption.
>
> Signed-off-by: Yan-Hsuan Chuang <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

bf9840ccf8ef rtw88: raise LPS threshold to 50, for less power consumption

--
https://patchwork.kernel.org/patch/11222327/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches