lkml.org 
[lkml]   [2021]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] wilc1000: Allow setting power_save before driver is initialized
Date

On 23/12/21 22:38, David Mosberger-Tang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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.


Okay. In my setup, I observed that PS mode works with and without
wpa_supplicant. Now tested by following your command sequence.


>> 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.


I have tested by making the WILC as build-in module to insert driver
automatically at boot-up. I hope it should be fine. Because I have
already tested as loadable module earlier.

Below are the number observed
------------------------------ --------------------------
- before starting wpa_supplicant             : ~16.3 mA
- wpa_supplicant started                         : ~40 mA
- PSM on                                                  :  ~6 mA


The 'sleep 10' would have no impact in my setup because I have measured
the current consumption for wilc1000 chip.

I have shared the screenshot at https://postimg.cc/67S41dkb


> 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?


Second case was verified earlier and also tested by toggle power_save
mode on/off many times and I observe the numbers are in same range for
both cases.

Regards,
Ajay

\
 
 \ /
  Last update: 2021-12-24 17:21    [W:0.111 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site