hostap startup bug

James Harper james.harper
Sat Jan 11 15:46:01 PST 2003


I've compiled it... But I'm using my laptop at the moment so I can't
test it.

I'm using smp and pre-emptive kernel. Do you use ifupdown? If you do,
try bringing up the interface with ifconfig, on my system that invokes
the ifupdown script as well before the card is really ready for it.

My machine is an ABIT BP6 with 2x Celeron 400 (not overclocked). A
faster or slower machine might behave differently wrt how the init
timings work together.

I seem to be having much success with the line
  pre-up sleep
in my /etc/network/interfaces file. This makes it wait for a second
before it does anything to the card. Obviously this isn't ideal but it
works.

I'll give it a good test tonite and let you know how it went.

Thanks

James



> -----Original Message-----
> From: hostap-admin at shmoo.com [mailto:hostap-admin at shmoo.com] 
> On Behalf Of Jouni Malinen
> Sent: Sunday, 12 January 2003 05:39
> To: hostap at shmoo.com
> Subject: Re: hostap startup bug
> 
> 
> On Sat, Jan 11, 2003 at 03:37:09PM +1100, James Harper wrote:
> 
> > 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.
> 
> Current CVS version should have this fixed. At least it loads 
> and unloads fine with Linux 2.5.56. However, I haven't been 
> able to test this completely since generic pcmcia code in 
> 2.5.56 does not work with my laptop. In addition, I added a 
> new patch that can be used with 2.5.56. I haven't yet changed 
> module compilation, so latest 2.5.x kernel versions need to 
> use in-kernel-tree compilation.
> 
> > 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...
> 
> Yes, this seems to be problem. I'm usually just loading the 
> module manually so I do not hit such cases at all. I tried to 
> kill initialization by changing configuration as soon as 
> possible, but that did not seem to break anything with PC 
> Card version. I'll try similar things with hostap_pci.o 
> later. I don't have SMP system easily available for testing 
> now, so I won't test that. I'm using pre-emptive kernel, but 
> yes, this should also be tested on SMP since it could allow 
> races with the initialization code more easily.
> 
> Host AP driver registers netdevice before it has finished 
> initializing the card. This makes it possible for user space 
> programs trying to touch the interface before everything is 
> ready and might cause these somewhat random errors during 
> initialization. I have to check whether
> register_netdev() could be moved so that it would be 
> performed only after everything has been initialized. That 
> should remove these kinds of races.
> 
> > 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?
> 
> Do you have something else patched than the changes I did for 
> the current CVS version to load with 2.5.56? I think that at 
> least one problem is in allowing user space to interract with 
> the driver during initialization and fixing it cleanly might 
> require reordering something in the initialization.
> 
> -- 
> Jouni Malinen                                            PGP 
> id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
> 
> 





More information about the Hostap mailing list