No subject

bogus at does.not.exist.com bogus at does.not.exist.com
Wed Jan 26 18:46:16 PST 2011


does something like post a NullData frame.

>
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 int ret =3D wpa_supplicant_fast_reconnect(=
wpa_s, bssid);
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret =3D=3D 0)
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ret =3D=3D -EBUSY) {
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /*
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* NB: EBUSY indicates a=
 scan is already in progress.
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* Just wait for it to c=
omplete; it will do the same
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* reconnect work just a=
 bit delayed (since it's likely
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* scanning more than 1 =
channel).
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 wpa_printf(MSG_INFO, "Fast=
 reconnect: piggyback on "
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"ex=
isting scan");
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
>
> Hm, is it really a good idea to rely on the error code? I'd think
> drivers aren't necessarily returning a real error code since the
> convention in wpa_s seems to be to just return -1. OTOH, -1 isn't -EBUSY
> (it is -EPERM), so comparing is probably fine, and driver_nl80211 does
> return the "real" error code. I suppose we should document some of this
> here (and in the nl80211 driver so nobody breaks it) though?

nl80211-based devices use the code in sme.c which returns -EBUSY for
this case.  I looked at changing all the driver routines to do this
but punted.  What's there now should work for all devices; but only
those that use the user-mode sme code will benefit.

-Sam



More information about the Hostap mailing list