Messages in this thread | | | Subject | Re: [PATCH] wilc1000: Allow setting power_save before driver is initialized | From | David Mosberger-Tang <> | Date | Thu, 23 Dec 2021 10:08:00 -0700 |
| |
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
| |