Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4011148ybg; Tue, 29 Oct 2019 00:24:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5qEt9edDd1gN0eUNJoG/TxWX9Jww1jyhDNoil/aoWY78f/p8mBmzSeaj3HaUMq5TdY1Ke X-Received: by 2002:a17:906:fca5:: with SMTP id qw5mr1752331ejb.133.1572333861874; Tue, 29 Oct 2019 00:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572333861; cv=none; d=google.com; s=arc-20160816; b=Yo9CfJhylc0WQXAmP5wExd56HXweV7Uy2DQ/hcx+7ueZCJJHaFykdewbTLVQN+rqK4 4iquuEBxB4tpgQ0Ir9mabkdpFL+TwGAJnUVbHTZFh3QKuF8bEia9XENtHhuCS/EVXpXr I/ztyKSJng5q5T1YK6DC6y73fHDnZvK8bcAvMpp48x+qNIhuuvbOikLr3l1BgUvLKz+D 9aqcfHMisAMKekic7lYDxfpv29CvAblLvs1JZfdm1TrMXgh5MgEUxViUpqRXTTUPgdr8 Et0gYn/H9IKRZEM3hZyDI9FBl/xX8DqWTXlSv2jIhoVFaqS+/yfeLuwc+QyhcULab7R7 7Flw== 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=lDvFbMqtLQKHIm5EaIS2pT+S04TntpX/aAE34tFDiwo=; b=VzcL8UVXmQ0dzwg+4WOlq8V+Ul+C8M07BqW46S1J8vjynQgPzmXNhl/J+aSfNC3SvC 64/myg1Q1avQwesTgWzNGPMkRI+1j7gim3k1Di709HcmY8SFd8oAajUA7jzPrw6KQENJ dE8bEQxDUaLm1ecJJYSw7QKacUReooHn5JxQgfPC9Dbr53czwOoerS+jNzcb2jxL8MU6 asTuAGCdR5ne8PkHf4VXodBUKsYzkFFDyVqfSUHjHs4ciC77L0narCInW8SEEbOgrwr/ 6TfXECnnSp0v8CRrU18xfn1uPVju5COphV+MG1h2S+KFW4MOFZH37u30203PZvyNpvXN eWgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=KlKGwIx8; 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 r5si11106734edi.349.2019.10.29.00.23.48; Tue, 29 Oct 2019 00:24:21 -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=KlKGwIx8; 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 S1725922AbfJ2EBn (ORCPT + 99 others); Tue, 29 Oct 2019 00:01:43 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:34452 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbfJ2EBn (ORCPT ); Tue, 29 Oct 2019 00:01:43 -0400 Received: by mail-qk1-f195.google.com with SMTP id c25so4703923qkk.1 for ; Mon, 28 Oct 2019 21:01:42 -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=lDvFbMqtLQKHIm5EaIS2pT+S04TntpX/aAE34tFDiwo=; b=KlKGwIx8cfO8yaZzxzEbFh5++cMI7RVpXh/rLolviVV991j0eAW2/dnvaFoqFTPCjy h2b+K+ht+FSeKFG0KXR27D3uanJKHlxuYwqQlBglJMr7PDNNmahQJ7NgU99renrkdEDh x9RfFUDtymqLDHzFFjSoW5Y70KvoImCVUyBi3zlRJxRIUPPGCCEMV0kW8IvKmRSHxeHj DdECs4VPIWISAmBCqNocw/NkKqw33eVreZV2PVMwYwlK2EDto6ldP/95fYEACeogOM+G Ffdzauv5IHziGh0rbVHFWXzzkCR0i6eQP4GzII5VbNMwRf8EAJoz1q0k3xm0JnYwAXcI JcVA== 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=lDvFbMqtLQKHIm5EaIS2pT+S04TntpX/aAE34tFDiwo=; b=VgA/ljDGJtusAetSf+9wdYVdG57qN47kO+7Enmf19U1T3GsC3zkHqZnUvBTuHxnHJk 4rWrOcHwRhUIlEXfl2DyVMofYfumYsbhDaaiyR18hl6ijx1GGMHkQhM+8HO6lfQVXl5q EvZ0fqUCH+9ZysRtvJFlcn6nm3wYqUDJPqc2e8lWfXSIDbsuw9jZ/Xra1Q7s1Vjl52Mo tGzaJQQKeJXZyH0EBr5+hwoFbhUaK4kb9CUcZaS4LMs3rmGfGJdLjYOVEgJBKEkd9mMC E3Che1hUt0f0lfZ6enPmSeKKckzP4T3O5FyPukPqE6bXdpfO5VjWaRO4G8WfKfwtIFVz oGxA== X-Gm-Message-State: APjAAAXGcJ3jI9+UtVeQ+G7Ypl3Umcnjgbgy0Aexe62YgsRoaaAvpUX2 NqyjZ+WNsUBVi+iivEa5u10xJBwfURp89jp/AdCuPg== X-Received: by 2002:a37:847:: with SMTP id 68mr18123162qki.366.1572321702297; Mon, 28 Oct 2019 21:01:42 -0700 (PDT) MIME-Version: 1.0 References: <20191025093345.22643-1-yhchuang@realtek.com> <20191025093345.22643-4-yhchuang@realtek.com> In-Reply-To: From: Chris Chiu Date: Tue, 29 Oct 2019 12:01:30 +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 Mon, Oct 28, 2019 at 11:13 AM Tony Chuang wrote: > > > 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 > > > --- Reviewed-by: Chris Chiu > > > 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 > > > > I think according to the context, ps_active is good for me. > But I can still send a separate patch to rename it. > Or you can :) > > Yan-Hsuan OK. Then I have no problem with this patch. Chris