[ltp] wireless led on x41, using feisty

Paul Fox linux-thinkpad@linux-thinkpad.org
Thu, 14 Jun 2007 08:26:26 -0400


up until yesterday i was running edgy.  in edgy, the code in
/etc/acpi/wireless.sh simply changed the value found in
/sys/class/net/eth1/device/power/state back and forth from 0 (on)
to 2 (off) on every button push.  it all seemed to work.

in feisty, wireless.sh calls the function toggleAllWirelessStates
in /usr/share/acpi-support/state-funcs.  this script now looks
for /sys/class/net/eth1/device/rf_kill first, to toggle it
between 0 and 1.  if the rf_kill node isn't there, the code goes
on and does the old toggling of /sys/class/net/eth1/device/power/state

on my X41, the new behavior succeeds in turning the radio on and
off, but does nothing to the led:  the led remains on even when
the radio is off.

i modified the loop in the new code so that rather than quitting
after toggling the rf_kill value, it goes on and also toggles the
power/state value.  now everything seems to work as i think it
should -- the radio and led go on and off together.

a comment in the new script says:
 # Attempts to use 'rf_kill' first, and then tries 'power/state', though that
 # will fail on >=2.6.18 kernels since upstream removed the functionality...

i'm running 2.6.20-16, so it's clear that whatever was "removed" wasn't
removed entirely, if at all.

my questions:

    - can someone tell me what those proc (or, rather, sys)
	entries actually do?  is the sub-tree for wireless
	devices documented anywhere?

    - does anyone else have the same problem, and does this fix
	it, or is there another fix?

    - should i figure out how to file a bug against feisty?

many thanks...
paul
=---------------------
 paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 53.1 degrees)