Thanks to the new debug infrastructure (part of 1.52 release), it becomes very easy to now figure out what each individual module is doing.
The patch I proposed in previous mail was already part of wireless-ipw-power module (ipw* is the wireless device that I use) but power saving never came into effect. And I was lazy to figure out. With the new debug help, I have now known the problem. Reliance on iwconfig is going to work for the near future (till kernel breaks iwconfig). The problem was the I wasn't gathering the exit code of iwconfig properly. Fixed for 1.52. Works for ipw* devices. Will also work for iwl* devices. PS: If you'd like to test, pm me. I can provide you a test deb. Ritesh On Saturday 19 Sep 2009 13:13:35 Ritesh Raj Sarraf wrote: > Here's the final patch I've committed. > > === modified file 'usr/share/laptop-mode-tools/modules/wireless-iwl-power' > --- usr/share/laptop-mode-tools/modules/wireless-iwl-power 2009-09-18 > 05:26:58 +0000 > +++ usr/share/laptop-mode-tools/modules/wireless-iwl-power 2009-09-19 > 07:41:49 +0000 > @@ -35,6 +35,16 @@ > else > log "VERBOSE" "$DEVICE doesn't seem to be > enabled. Radio Switched off?"; > fi > + else > + # LP: #369113 > + # Kernel's 2.6.29 and above have been reported to > be missing > + # the $DEVICE/wireless folder. > + dev=`basename $DEVICE` > + ret=`$IWCONFIG $dev >/dev/null 2>&1`; > + if [ "$ret" = "0" ]; then > + # add the interface name to the list > + WIFI_IFNAMES="$WIFI_IFNAMES ${DEVICE##*/}" > + fi > fi > done > } > > On Saturday 19 Sep 2009 13:10:15 Ritesh Raj Sarraf wrote: > > Hello Darren, > > > > On Saturday 19 Sep 2009 04:28:40 Darren Hoo wrote: > > > > Again, on my box with ipw2200 device, 2.6.30 still presents the > > > > wireless folder. > > > > > > with my 3945ABG card, 2.6.30 does not have this folder either. > > > Isn't there a better way to check whether it is a wireless card? > > > > > > Also I want to know how does wireless card power saving work? > > > I know that I can set the signal power of the card using iwconfig like > > > # iwconfig wlan0 txpower 10 > > > > > > but changing /sys/class/net/*/device/power_level does not change > > > the tx-power that iwconfig reports. > > > > > > does this power_level have anything to do with that txpower? > > > will reducing txpower by iwconfig help power saving at all? > > > > Following is what I had done for the wireless-ipw-power module > > > > # LP: #369113 > > # Kernel's 2.6.29 and above have been > > reported to be missing > > # the $DEVICE/wireless folder. > > dev=`basename $DEVICE` > > ret=`$IWCONFIG $dev >/dev/null 2>&1`; > > if [ "$ret" = "0" ]; then > > # add the interface name to the > > list WIFI_IFNAMES="$WIFI_IFNAMES ${DEVICE##*/}" > > fi > > > > > > Perhaps, the same should be done for iwlwifi cards also. What we do here > > is just run iwconfig on the device. If it is not a wireless device, it > > would give you a bad exit status. That is what we are relying upon. > > > > I'll do the same for iwl-power module also. > > > > I'm not sure about the power saving. Wild guess is that if you know what > > your workload is (eg. server with a wireless card), you can power tune > > your device. > > > > Ritesh > -- Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention."
signature.asc
Description: This is a digitally signed message part.