[Debian-eeepc-devel] Wifi toggling on '901 (again...)

oz oz at bluemonk.de
Sun Sep 14 08:58:38 UTC 2008

On Sat, 13 Sep 2008 22:57:56 +0100
"Phil Endecott" <phil_dlhbb_endecott at chezphil.org> wrote:

> Dear All,
> I just tried to toggle my wifi and it didn't work, despite me having 
> claimed that I had it working smoothly with a very minimal script in wireless.sh.
> The problem is this: the pciehp wasn't loaded, so the driver just 
> crashed when the hardware went away rather than being unloaded by the 
> kernel.  I suspect that when I was testing it before the module had 
> been loaded by the earler more complex script and I had never unloaded 
> it during testing.
> I have now put pciehp in my /etc/modules along with options 
> pciehp_force=1 pciehp_slot_with_bus=1.  Now I think it really does work 
> with this minimal wireless.sh script:
> wlan_control=/sys/devices/platform/eeepc/wlan
> case $1 in
>      on|enable)
>          echo 1 > $wlan_control
> 	;;
>      off|disable)
>          echo 0 > $wlan_control
> 	;;
>      *)
> 	echo "Usage: $0 [on|off]"
> 	exit 1
> 	;;
> esac
> I have also tracked down exactly what happens after you write 1 or 0 to 
> $wlan_control.  The chip is "unplugged" or "plugged" in to the bus, 
> which is detected by the pciehp module, and uevents are generated. You 
> can see these by running "udevadm monitor".  The uevent goes to udevd 
> which has a rule in /etc/udev/rules.d/80-drivers.rules that invokes 
> /lib/udev/net.agent.  For add, this calls "ifup --allow=hotplug ra0".  
> So, as long as you have a line in /etc/network/interfaces saying 
> "allow-hotplug ra0", it will try to bring up the interface.  Similarly, 
> removing it will run ifdown.
> Most of you probably already understood all that, but I had never put 
> all the pieces together.
> Phil.


thanks for putting the pieces together. I think, Damyan integrated the
minimal settings for the 901 in his eeepc-acpi-scripts since 1.0.6
(which I used since then).

But instead of 'allow-hotplug ra0', I have 'auto ra0' in
my /etc/network/interfaces - and it works also perfectly (?!).

I decided to choose 'auto ra0', because I use network-manager and this
is written in its /usr/share/doc/network-manager/README.Debian:

"Only devices that are *not* listed in /etc/network/interfaces or which
have been configured "auto" and "dhcp" (with no other options) are
managed by NM."

After reading your mail, Phil, I'm unsure now, which allow-class should
be preferred.


More information about the Debian-eeepc-devel mailing list