WMM AC: Delete tspecs on roaming
authorEliad Peller <eliad@wizery.com>
Mon, 29 Dec 2014 02:14:59 +0000 (21:14 -0500)
committerJouni Malinen <j@w1.fi>
Sun, 4 Jan 2015 16:32:59 +0000 (18:32 +0200)
In case of roaming, we don't get disassoc notification, but
still want to remove the existing tspecs.

Move the wmm_ac_notify_disassoc() call to the state change
function, which get called also on roaming.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
wpa_supplicant/events.c
wpa_supplicant/wpa_supplicant.c

index 7fe92ea..db60e06 100644 (file)
@@ -2128,8 +2128,6 @@ static void wpa_supplicant_event_disassoc_finish(struct wpa_supplicant *wpa_s,
                return;
        }
 
-       wmm_ac_notify_disassoc(wpa_s);
-
        if (could_be_psk_mismatch(wpa_s, reason_code, locally_generated)) {
                wpa_msg(wpa_s, MSG_INFO, "WPA: 4-Way Handshake failed - "
                        "pre-shared key may be incorrect");
index 21f4af5..b048728 100644 (file)
@@ -760,6 +760,9 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
        if (state == WPA_DISCONNECTED || state == WPA_INACTIVE)
                wpa_supplicant_start_autoscan(wpa_s);
 
+       if (old_state >= WPA_ASSOCIATED && wpa_s->wpa_state < WPA_ASSOCIATED)
+               wmm_ac_notify_disassoc(wpa_s);
+
        if (wpa_s->wpa_state != old_state) {
                wpas_notify_state_changed(wpa_s, wpa_s->wpa_state, old_state);