DWL-520 trouble

unlisted unlisted
Sat Jul 10 15:03:07 PDT 2004


On Fri, 9 Jul 2004 13:38:34 -0700
Ka-Hing Cheung <kahing at gmail.com> wrote:

> Nevermind, I figured it out. It turns out that I need to unload the
> modules before rebooting, otherwise loading the modules next time
> would result bring down the machine. Not fun.
> 
> Anyone know a way of auto unloading the modules whenever the interface
> is brought down?

you can simply add a "rmmod hostap_pci hostap_crypt_wep hostap" script
to runlevels 0 (halt) and 6 (reboot).

for example, on debian:
- echo "rmmod hostap_pci hostap_crypt_wep hostap" >
/etc/rc0.d/rmmod_hostap
- chmod 755 /etc/rc0.d/rmmod_hostap
- cp -av /etc/rc0.d/rmmod_hostap /etc/rc6.d/rmmod_hostap

you should be able to do something similar on other (sysvinit)
distributions, as it's just a matter of where the runscripts reside.

on debian, you can also:

$ cat << EOF >> /etc/network/interfaces
> iface wlan0 inet dhcp
>  pre-up modprobe --autoclean hostap_pci
>  pre-up iwconfig wlan0 mode Managed rate auto
>  post-down rmmod hostap_pci hostap_crypt_wep hostap
> EOF

which will cause the module to be unloaded when the interface is
"ifdown", which "ifdown -a" (ifdown all) occurs in
/etc/rc0.d/S35networking and /etc/rc6.d/S35networking.

for other distributions i can't help as the only other distro i've used
is red hat, and that was years ago with 6.2.




More information about the Hostap mailing list