ap_scan=2 problem?

YenJung Chang yenjung at gmail.com
Thu Mar 3 08:41:46 EST 2005


On Thu, 3 Mar 2005 13:54:46 +0800, YenJung Chang <yenjung at gmail.com> wrote:
> On Wed, 2 Mar 2005 20:18:00 -0800, Jouni Malinen <jkmaline at cc.hut.fi> wrote:
> > On Thu, Mar 03, 2005 at 10:41:14AM +0800, YenJung Chang wrote:
> >
> > > I tested wpa_supplicant with ap_scan=1 and ap_scan=2, and it seems
> > > there is some problem on ap_scan=2.
> >
> > > The testing steps on ap_scan=1 and ap_scan=2 are same:
> > > 1.  $ wpa_supplicant.conf -i ath0 -c/etc/wpa_supplicant.conf -d > supp1.log
> >
> > I don't think the current madwifi driver and interface code for that in
> > wpa_supplicant support ap_scan=2.
> >
> > --
> > Jouni Malinen                                            PGP id EFC895FA
> > _______________________________________________
> > HostAP mailing list
> > HostAP at shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
> 
> What I am curious is the connection to AP could be created
> successfully with ap_scan=2 at first time, but it failed after
> "wpa_cli reassoicate".
> Does it make sense?
> 
> Regards,
> YJ.

After suveyed the Madwifi source code, I guess the roaming parameter
set to madwifi when ap_scan=2 should be 1, not 0.
Because Madwifi would not start its state machine of authentication
and association after set essid if the roaming parameter is not 1.
I modified the parameter as following:

--- driver_madwifi.c	
+++ driver_madwifi.c	
@@ -309,7 +309,7 @@
 		 * roaming */
 		/* FIX: this does not seem to work; would probably need to
 		 * change something in the driver */
-		if (set80211param(drv, IEEE80211_PARAM_ROAMING, 0, 1) < 0)
+		if (set80211param(drv, IEEE80211_PARAM_ROAMING, 1, 1) < 0)
 			ret = -1;

I tried it without security and it seems work well. But I have no idea
if the modification has any side effect.
Any comment?

Regards,
YJ.



More information about the HostAP mailing list