[PATCH 1/2] Allow scanning while in authenticated only state

Jouni Malinen j
Sun Nov 1 12:10:24 PST 2009


On Sat, Oct 31, 2009 at 12:33:16PM +0200, Maxim Levitsky wrote:

> How about putting this in wpa_supplicant, and end all trouble with this
> for once?
> 
> This is a workaround/hack, but at least it works....

Could you please add a comment pointing that out and explaining that the
deauth in disassoc is there due to mac80211's inability to handle
multiple APs in authenticated-but-not-associated state?

> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
>  static int wpa_driver_nl80211_disassociate(void *priv, const u8 *addr,
>                                            int reason_code)

> -       return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE,
> +
> +       err = wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISASSOCIATE,
> +                                      reason_code);
> +       if (err)
> +               return err;
> +       return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE,
>                                        reason_code);

There should be no need for doing both disassoc and deauth; just send
deauth only if that is needed. This will save one extra frame
transmission and speeds up roaming a bit.

Though, is this enough to handle the roaming cases where wpa_supplicant
may not try to send either disassociation or deauthentication?

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list