Needs to disconnect from previous AP before associating to a new one?

Holger Schurig holgerschurig
Thu Dec 2 07:43:49 PST 2010


> Hello Everyone,
> 
> I'm using Linux kernel 2.6.35. Looks like nl80211/cfg80211 directly
> returns -EALREADY if it is connected to any AP (in __cfg80211_connect
> function in net\wireless\sme.c). This will cause association to a new
> AP to fail unless you disconnect from the previous connected AP.
> Unfortunately Android does not do this... Has anyone got the same
> problem before and got a solution for it?

The solution is to fix android.

Just do the equivalent of "iw wlan0 disconnect" before re-connecting. To 
my best knowledge recent versions of wpa_supplicant do this 
automatically.

-- 
Homepage: http://www.holgerschurig.de



More information about the Hostap mailing list