hostap startup bug

James Harper james.harper
Fri Jan 10 20:37:09 PST 2003


i posted a few weeks ago about a problem i was having where my dlink520 
card would fail to start about half the time.

i'm running 2.5.55 and was maybe thinking it was something to do with 
that, or maybe because i'm using an smp system.

i patched the modules so that you can unload them under the latest 
kernels (hostap.c uses a deprecated module call and can't be unloaded) 
and did some experimentation.

if i load the modules then it gets stuck, pretty much 80% of the time 
and fails at various points, normally by the time it tries to enable the 
mac port.

the funny thing i noticed though, was that when i did an rmmod 
hostap_pci, it would unload the module, then reload it all by itself, 
and then everything would work fine thereafter.

if i type 'ifup wlan0' it seems to work, if i type 'ifconfig wlan0' it 
falls flat on it's head. i think the interface is being brought up 
before the ifupdown scripts would normally bring it up.

i noticed that if i comment out the wlan0 section in 
/etc/network/interfaces everything worked fine. it just _never_ fails to 
startup! then i found that if I do a 'pre-up' script of 'sleep 1' it 
also appears to work.

my theory therefore is that ifupdown is trying to do something with the 
driver before it is properly initialised, if it is initialised by other 
means (ifconfig/modules being loaded). i noticed that some of the init 
code doesn't use the normal serialising methods so the problem could lie 
in there...

i'm quite happy to spend time on this, i've already done a bit of 
patching to make it work under 2.5.55, but can anyone give me some hints 
on where to start?

thanks

James







More information about the Hostap mailing list