hostap startup bug
jkmaline at cc.hut.fi
Sat Jan 11 13:39:03 EST 2003
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
> 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
More information about the HostAP