]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use WPA_INTERFACE_DISABLED with interface removed events
authorJouni Malinen <j@w1.fi>
Sat, 18 Feb 2012 11:16:17 +0000 (13:16 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 18 Feb 2012 11:16:17 +0000 (13:16 +0200)
This makes WPA_INTERFACE_DISABLED more consistent in indicating that
wpa_supplicant cannot currently control the interface regardless of
whether the interface is disabled or completely removed.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1

wpa_supplicant/events.c

index 7ee27c83b951ad980323c94c75bc6e90a2953f8b..0cc1fc26858d4c319d8bc2e88994af09340941c5 100644 (file)
@@ -1820,11 +1820,13 @@ wpa_supplicant_event_interface_status(struct wpa_supplicant *wpa_s,
                        wpa_msg(wpa_s, MSG_INFO, "Failed to initialize the "
                                "driver after interface was added");
                }
+               wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
                break;
        case EVENT_INTERFACE_REMOVED:
                wpa_dbg(wpa_s, MSG_DEBUG, "Configured interface was removed");
                wpa_s->interface_removed = 1;
                wpa_supplicant_mark_disassoc(wpa_s);
+               wpa_supplicant_set_state(wpa_s, WPA_INTERFACE_DISABLED);
                l2_packet_deinit(wpa_s->l2);
                wpa_s->l2 = NULL;
 #ifdef CONFIG_IBSS_RSN