Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4060193ybg; Fri, 25 Oct 2019 12:44:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4cPir6C1JkI1suVCnGLqLw3CzAIB4rcPt/neK56vRUElb1S31t7DQKKu34atRf7q+wKIu X-Received: by 2002:a17:906:5c0e:: with SMTP id e14mr5243872ejq.200.1572032664691; Fri, 25 Oct 2019 12:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572032664; cv=none; d=google.com; s=arc-20160816; b=irii9PDGMMxhVODrF8nIj6/iVAYs2FRG5jTKGwB+1h6UmQQcyIb2P6E6Fo7izxVzKU lmdk+m0emVBgofQZ6y6Nm17RiI4T5XPi63drbX8PN4ST4qrzqXAfh14RrlydCUTFpOsX 6O5rOaRB6Oo7amir+Qil3TpjoEDYQbVX4fEi5b3OLJQ1xikKN5hZeepZ6PQBKUwra+p5 QSm5h4r3Op1RHIMzcHmDP4AuX2TBQZQ6VkiQd4PDWsSf9PD/4WOdQlOtmeLfKHCm+Hw7 yOybqfzs41jxrhxlJLagyylzI5xPJ44Ls8S3Qf6qMYla/EV99eZlQnR4T+PBp8uwFX6b M0cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vJyEnzvWjh6BqwEAaRaKIbFDEVVjj/sLXsvP5ADxiIw=; b=EC7/HKI+5lwwyczY7FRZGQ+e/2EZTc2GqNcnC/O3gwJAMDWztj7Dp8znCC6+Pih87I /ztQKxzNteefVPaphtmNz+/pxsbGar6hqgQPMWjU4Ekv+2haCR/iWd4CmjedQAB3sh1R wA53LwWIg8P/m/5TPicnzdEkTsl1Y75UQxKcELA4WsN57BDp190HKD/C/MgH87cfiqj3 S5YEdoyJ+LkHUcHMEU+wfxMHgI4tY/zi3D+Q5yXUOtcK4JpBuSFqIza1Af9nMX4coo1l hAdElhaCTR/J6sZHXkWXSO+4Dy0OgcrwcMw+OiIt9hGxMh1pzcOJLqEu6JIlh5mgCW1C IZSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=Q08xE32D; 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 e56si1997214edb.172.2019.10.25.12.44.00; Fri, 25 Oct 2019 12:44:24 -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; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=Q08xE32D; 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 S2502585AbfJYKwG (ORCPT + 99 others); Fri, 25 Oct 2019 06:52:06 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:41651 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390265AbfJYKwF (ORCPT ); Fri, 25 Oct 2019 06:52:05 -0400 Received: by mail-qk1-f196.google.com with SMTP id p10so1285593qkg.8 for ; Fri, 25 Oct 2019 03:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vJyEnzvWjh6BqwEAaRaKIbFDEVVjj/sLXsvP5ADxiIw=; b=Q08xE32DjaLpJrddMuK3TyV4KtzsbCnYs2/VcxHlDDSDap2vALbY8pYkMKEBIALD9i XyP88p+UizhCM0RfhBi3GqgeqS0SpghiPoDyhWKhoSmsklIMD67A70mS1ZGXwDYmSVz5 KNw1JJIR6rycliKAw/1VT0kRXYX07zGep+WQK0J0CLjKWFEg/SfspT/EJTrNbKnWW8RH kk30gcqkO6PorBrGhtCtNJrcOL5XnonRADqBt7+YSf4ftrYZtbX8ZBS28Y2uTWRUhsx2 qRLxqmk2jj6kmU5X8j3fOnEmfiY/rNj5dRONQv0W1KTFUrmKyHjgoBkomaVN4OB1G1zO 1XZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vJyEnzvWjh6BqwEAaRaKIbFDEVVjj/sLXsvP5ADxiIw=; b=mPHM47DlxY7DoOcOAX0R0jP6SVECm29rGS8AnjcXBPHBFT8hPgTNNoLni+guQPwCA1 LThqSCIbPWkrc9IljFk2oPMWOj4DjBtZpSUZ56qI+5hAIRdK4ESyd8WsIGEvpqy+zoWT 5zvHbkGhdekW5ZH4reXdZ1jnGHo0HgOUZ/R4lnKQqg2j4Wt1S8PGUCtfC/7etvMlxvIY 57Zohz1p3zIehlRWH++lV9FSj+HBZYYrEOyTR7HBsys8d1oV5Vs/ue6lp49LFLqcVYO6 cJig2LodFrGKlcB1v4RwVWFLtxzLo5znjavqX7H01KTmNID5o2+REE/PwpA5vG6v5La7 VLHA== X-Gm-Message-State: APjAAAVWd4aL+5czR8W5BHyWcVqtUY2ACJfyqmlMwXR9z4hSUlJYYe6S yJ938arCUmCMJgo4A0cYrf4I2M3ev4AEPMIhpbYV5g== X-Received: by 2002:a37:847:: with SMTP id 68mr2092452qki.366.1572000706203; Fri, 25 Oct 2019 03:51:46 -0700 (PDT) MIME-Version: 1.0 References: <20191025093345.22643-1-yhchuang@realtek.com> <20191025093345.22643-4-yhchuang@realtek.com> In-Reply-To: <20191025093345.22643-4-yhchuang@realtek.com> From: Chris Chiu Date: Fri, 25 Oct 2019 18:51:34 +0800 Message-ID: Subject: Re: [PATCH 3/6] rtw88: use a module parameter to control LPS enter To: Tony Chuang Cc: Kalle Valo , linux-wireless , Brian Norris , g.schlmm@googlemail.com Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Oct 25, 2019 at 5:33 PM wrote: > > From: Yan-Hsuan Chuang > > If the number of packets is less than the LPS threshold, driver > can then enter LPS mode. > And driver used to take RTW_LPS_THRESHOLD as the threshold. As > the macro can not be changed after compiled, use a parameter > instead. > > The larger of the threshold, the more traffic required to leave > power save mode, responsive time could be longer, but also the > power consumption could be lower. > > Signed-off-by: Yan-Hsuan Chuang > --- > drivers/net/wireless/realtek/rtw88/main.c | 7 +++++-- > drivers/net/wireless/realtek/rtw88/ps.h | 2 -- > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c > index 7c1b89c4fb6c..bff8a0b129d9 100644 > --- a/drivers/net/wireless/realtek/rtw88/main.c > +++ b/drivers/net/wireless/realtek/rtw88/main.c > @@ -199,8 +202,8 @@ static void rtw_watch_dog_work(struct work_struct *work) > if (busy_traffic != test_bit(RTW_FLAG_BUSY_TRAFFIC, rtwdev->flags)) > rtw_coex_wl_status_change_notify(rtwdev); > > - if (stats->tx_cnt > RTW_LPS_THRESHOLD || > - stats->rx_cnt > RTW_LPS_THRESHOLD) > + if (stats->tx_cnt > rtw_lps_threshold || > + stats->rx_cnt > rtw_lps_threshold) > ps_active = true; > else > ps_active = false; The naming of 'ps_active' is a bit confusing. Per the commit message, it will leave LPS it tx/rx count > threshold. But I'll be misled by the name ps_active. Does it mean the current condition is PS active and ready to power sleep? I'd like to rename it to old-fashioned 'lps_enter' to represent the action that would be taken. It would be easier for me to understand. Chris > -- > 2.17.1 >