I'm using linux-image-2.6.30-1-amd64 version 2.6.30-6 with iwlagn:
nemi:/etc# uname -a
Linux nemi 2.6.30-1-amd64 #1 SMP Sat Aug 15 18:09:19 UTC 2009 x86_64 GNU/Linux
nemi:/etc# readlink /sys/class/net/wlan0/device/driver
../../../../bus/pci/drivers/iwlagn
nemi:/etc# lspci -Qnns3:
03:00.0 Network controller [0280]: Intel Corporation Wireless WiFi Link 5300
[8086:4236]
The default power_level setting is:
nemi:/etc# cat /sys/class/net/wlan0/device/power_level
SYSTEM:auto MODE:auto INDEX:0
Setting level 3:
nemi:/etc# echo 3 > /sys/class/net/wlan0/device/power_level
nemi:/etc# cat /sys/class/net/wlan0/device/power_level
SYSTEM:auto MODE:fixed INDEX:3
Setting level 0:
nemi:/etc# echo 0 > /sys/class/net/wlan0/device/power_level
nemi:/etc# cat /sys/class/net/wlan0/device/power_level
SYSTEM:auto MODE:fixed INDEX:0
Notice how this is different from the default "MODE:auto".
Setting level 6 restores the default:
nemi:/etc# echo 6 > /sys/class/net/wlan0/device/power_level
nemi:/etc# cat /sys/class/net/wlan0/device/power_level
SYSTEM:auto MODE:auto INDEX:0
However level 7 seem to be gone, as reported by Clemens:
nemi:/etc# echo 7 > /sys/class/net/wlan0/device/power_level
bash: echo: write error: Invalid argument
So there still is a difference between 0 and 6. I have absolutely no
idea which one should be used on AC, but I do note that 6 seems to be
the default.
A side note: The "wireless" node seems to be gone in 2.6.30:
nemi:/etc# ls -la /sys/class/net/wlan0/wireless
ls: cannot access /sys/class/net/wlan0/wireless: No such file or directory
So I had to modify the wireless-iwl-power script:
--- /usr/share/laptop-mode-tools/modules/wireless-iwl-power.orig
2009-08-01 05:21:45.000000000 +0200
+++ /usr/share/laptop-mode-tools/modules/wireless-iwl-power 2009-08-27
13:26:26.000000000 +0200
@@ -18,7 +18,7 @@
local LINK_TARGET;
for DEVICE in /sys/class/net/*; do
- if [ -d $DEVICE/wireless -a -h $DEVICE/device/driver ]; then
+ if [ -h $DEVICE/device/driver ]; then
# See if the driver for $DEVICE matches the supplied
one by checking the link to
# the driver.
LINK_TARGET=`readlink $DEVICE/device/driver`
You may want to apply this or something similar to get 2.6.30 support.
I must admit that I didn't really understand the need for the
"-d $DEVICE/wireless" test. Testing the driver name should be safe
enough.
Bjørn
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]