Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp66350ybx; Thu, 31 Oct 2019 23:07:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0Sjlqkcke9y5Z7NyOCvmPrS6/+S/XCWR2DYR3tFrmK0vH/bR5dcA2oWpLZXvsVfIX3QFu X-Received: by 2002:a17:906:e5a:: with SMTP id q26mr8108971eji.246.1572588429711; Thu, 31 Oct 2019 23:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572588429; cv=none; d=google.com; s=arc-20160816; b=KPXWgdGGIMqERG8+n09EJ6hd5TWMsjq0bUp6Uc8L33xh3NMdL7lp0mx/vAxbL8+iTv 7cqJuzi0VanPRTUgiYgspdNVZeDVQsKXyWbFlet9AlOrrMMBWx10p+ty9edZh0SupS+e aKQ1OQ7eAGTvOWJKFWOEgL0r0CLOJs+MQIbgaj9ASyBlHFT33sDCWr/dt0B1iDvyq7Nt qPCrrzeo0pP22a9sFqzNvrRUghFjox3flxYx3q0yGPGEBjHqgle3m4h9pYhVZ/wIfD3X IzSdufM1MEvgiP/E4ZSTL7YiE9FljgVDexagfWs3cehvk1jvjtOEgVCddmly6sK80n6c XxMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:authenticated-by; bh=M+DwHk28SozPuNsTM4/8wJf/weJMpnqUCFWMk86BB/4=; b=HhcHfvZmvt0IPP0Wfps2Sd7IjVcISzuFdvtqWzXZF6jJLfsLOO9emVgocmFIVN9JG6 k43kuk63XxnB+WExMeFdnpCZT2kgSDn/ZZEf1VD3WENOlI2u3ntwbqTWehBqP/0fE6oL dhxKD4D18GtnlXmsX3U9LdSRexqMqNTRZrOAwcn+CmA/RGUehQBPQ8R/MzXGE5uxj0xd ITqI8GlS60EzaFpvcPRtKC8ZY5S382pQ7xV0k2MXubhAbP8VwFyMShLePz+LKRJ/0yxZ nNoqcwzIUhRQMhTb7gXrDfQzuJ+wr8d31ICjId6KUbRQJOe1AHlri3KGVIcKe/K97s9C hM7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si5034459ejy.286.2019.10.31.23.06.34; Thu, 31 Oct 2019 23:07:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727491AbfKAFTw (ORCPT + 99 others); Fri, 1 Nov 2019 01:19:52 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:35495 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727332AbfKAFTw (ORCPT ); Fri, 1 Nov 2019 01:19:52 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID xA15Ji48015123, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id xA15Ji48015123 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 1 Nov 2019 13:19:44 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.468.0; Fri, 1 Nov 2019 13:19:44 +0800 From: To: CC: , Subject: [PATCH v2] rtw88: raise LPS threshold to 50, for less power consumption Date: Fri, 1 Nov 2019 13:19:42 +0800 Message-ID: <20191101051942.18730-1-yhchuang@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang 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 --- 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