]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Deinit driver before notifying interface has been removed
authorDmitry Shmidt <dimitrysh@google.com>
Sun, 29 Jan 2012 18:18:48 +0000 (20:18 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 29 Jan 2012 18:18:48 +0000 (20:18 +0200)
This avoids issues with some external program starting to use the
interface based on the interface removal event before wpa_supplicant
has completed deinitialization of the driver interface.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wpa_supplicant/wpa_supplicant.c

index 45149ffca6fea5450a3597404315acf9b883c6a0..6d622b82bb6c8ad290e93d1a2adde41e92632246 100644 (file)
@@ -2414,11 +2414,11 @@ static void wpa_supplicant_deinit_iface(struct wpa_supplicant *wpa_s,
 
        wpa_supplicant_cleanup(wpa_s);
 
-       if (notify)
-               wpas_notify_iface_removed(wpa_s);
-
        if (wpa_s->drv_priv)
                wpa_drv_deinit(wpa_s);
+
+       if (notify)
+               wpas_notify_iface_removed(wpa_s);
 }