[PATCH] Re: Double disconnect event

Dmitry Shmidt dimitrysh at google.com
Wed Feb 24 18:53:02 EST 2010


Hi Dan,

Thank you for the advice. Then I need to clear the flag in driver
association call as well, don't I?

Dmitry

On Wed, Feb 24, 2010 at 3:27 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Wed, 2010-02-24 at 13:21 -0800, Dmitry Shmidt wrote:
>> Hi,
>>
>> How about this one:
>
> It may not be as safe as you think.  The zero-BSSID IWAP event also
> comes in when an association request has failed.  The patch you've sent
> will suppress that valid case, and thus the supplicant and upper layers
> will have no idea that the assoc request failed.
>
> You're really looking for the kind of event granularity that
> cfg80211/nl80211 bring to the table.
>
> Dan
>
>> From ab0662bbd4a507f6c97f80c6e7482f2ece266ef9 Mon Sep 17 00:00:00 2001
>> From: Dmitry Shmidt <dimitrysh at google.com>
>> Date: Wed, 24 Feb 2010 13:19:37 -0800
>> Subject: [PATCH] WEXT: Suppress additional DISASSOCIATE events
>>
>> Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
>> ---
>>  src/drivers/driver_wext.c |   11 ++++++++---
>>  src/drivers/driver_wext.h |    1 +
>>  2 files changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
>> index 2614f23..3e00fa5 100644
>> --- a/src/drivers/driver_wext.c
>> +++ b/src/drivers/driver_wext.c
>> @@ -470,11 +470,14 @@ static void
>> wpa_driver_wext_event_wireless(struct wpa_driver_wext_data *drv,
>>                               drv->assoc_req_ies = NULL;
>>                               os_free(drv->assoc_resp_ies);
>>                               drv->assoc_resp_ies = NULL;
>> -                             wpa_supplicant_event(drv->ctx, EVENT_DISASSOC,
>> -                                                  NULL);
>> -
>> +                             if (!drv->skip_disconnect) {
>> +                                     drv->skip_disconnect = 1;
>> +                                     wpa_supplicant_event(drv->ctx, EVENT_DISASSOC,
>> +                                                          NULL);
>> +                             }
>>                       } else {
>>                               wpa_driver_wext_event_assoc_ies(drv);
>> +                             drv->skip_disconnect = 0;
>>                               wpa_supplicant_event(drv->ctx, EVENT_ASSOC,
>>                                                    NULL);
>>                       }
>> @@ -733,6 +736,8 @@ void * wpa_driver_wext_init(void *ctx, const char *ifname)
>>
>>       drv->mlme_sock = -1;
>>
>> +     drv->skip_disconnect = 0;
>> +
>>       if (wpa_driver_wext_finish_drv_init(drv) < 0)
>>               goto err3;
>>
>> diff --git a/src/drivers/driver_wext.h b/src/drivers/driver_wext.h
>> index 602c7e1..559e890 100644
>> --- a/src/drivers/driver_wext.h
>> +++ b/src/drivers/driver_wext.h
>> @@ -43,6 +43,7 @@ struct wpa_driver_wext_data {
>>       char mlmedev[IFNAMSIZ + 1];
>>
>>       int scan_complete_events;
>> +     int skip_disconnect;
>>
>>       int cfg80211; /* whether driver is using cfg80211 */
>>  };
>> _______________________________________________
>> HostAP mailing list
>> HostAP at lists.shmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap
>
>
>


More information about the HostAP mailing list