linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Mosberger-Tang <davidm@egauge.net>
To: Ajay.Kathat@microchip.com
Cc: Claudiu.Beznea@microchip.com, kvalo@codeaurora.org,
	davem@davemloft.net, kuba@kernel.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wilc1000: Allow setting power_save before driver is initialized
Date: Thu, 23 Dec 2021 10:08:00 -0700	[thread overview]
Message-ID: <be3c95c8310504222e88c602a937b7f05cc01286.camel@egauge.net> (raw)
In-Reply-To: <122f79b7-7936-325c-b2d9-e15db6642d0f@microchip.com>

On Thu, 2021-12-23 at 14:02 +0000, Ajay.Kathat@microchip.com wrote:
> 
> I verified with wpa_supplicant and it seems the power save mode is 
> working fine. Tested multiple times with wpa_supplicant running. I 
> didn't observe any issue in entering or exiting the power-save mode with 
> wpa_supplicant.
> 
> Try to verify without wpa_supplicant in your setup to observe if we are 
> seeing this same results in that case.

It doesn't help me if it works without wpa_supplicant.  I need a
reliable way to have power-savings mode in effect when using
wpa_supplicant.

> With wpa_supplicant, the current consumption is less when PS mode is 
> enabled but it would be more compared to without wpa_supplicant.

That's not what I'm talking about though.  The problem is that it seems
to be rather erratic whether issuing the iw power_save command makes a
difference in power-consumption.

I fixed my setup so I can directly measure power consumed rather than
just current (power factor matters).  Again, this is for the entire
device (not just WILC1000).

What I find that when power-saving mode is working as expected, the
device uses an average of 1.1W.  When power-saving mode is not working,
power consumption is about 1.4W, or about 300mW higher.

I tried again *without* the patch applied and, as expected, the patch
doesn't really affect this behavior.

After playing with this for a while, I think I found two sequences that
reliably reproduce the difference.

First, on a freshly booted system and with wilc1000-spi autoloaded by
the kernel, try this sequence (copy & paste the commands):

   /usr/sbin/wpa_supplicant -Bs -iwlan0 -c/etc/wpa_supplicant.conf
   sleep 10
   iw dev wlan0 set power_save on

The above yields a power consumption of 1.4W reliably.  The "sleep 10"
doesn't matter here; the behavior is the same with or without it.  I
tried waiting up to 120 seconds with no difference.

Second, on a freshly booted system and with wilc1000-spi autoloaded by
the kernel, try this sequence (copy & paste the commands):

   /usr/sbin/wpa_supplicant -Bs -iwlan0 -c/etc/wpa_supplicant.conf
   sleep 10
   rmmod wilc1000-spi
   modprobe wilc1000-spi
   sleep 10
   iw dev wlan0 set power_save on

The above yields a power consumption of 1.1W reliably.

Can you reproduce this, or, if not, share the power consumption you see
for the two cases?

  --david



  reply	other threads:[~2021-12-23 17:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12  1:18 [PATCH] wilc1000: Allow setting power_save before driver is initialized David Mosberger-Tang
2021-12-12 21:20 ` David Mosberger-Tang
2021-12-15 13:01   ` Ajay.Kathat
2021-12-16  5:37     ` David Mosberger-Tang
     [not found]       ` <49a5456d-6a63-652e-d356-9678f6a9b266@microchip.com>
2021-12-16 15:30         ` David Mosberger-Tang
2021-12-23 14:02           ` Ajay.Kathat
2021-12-23 17:08             ` David Mosberger-Tang [this message]
2021-12-24 16:20               ` Ajay.Kathat
2021-12-24 17:38                 ` David Mosberger-Tang
     [not found]                   ` <f961481a-3f4c-5fd2-c46a-037d923fea4c@microchip.com>
2022-01-04  6:07                     ` David Mosberger-Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be3c95c8310504222e88c602a937b7f05cc01286.camel@egauge.net \
    --to=davidm@egauge.net \
    --cc=Ajay.Kathat@microchip.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).