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.

