aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-08-18 18:27:30 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-05 14:29:57 (GMT)
commita48f8380fa561d5ebb37754a9dbb85bedd11b81e (patch)
tree424654bcae590fde37acf85017b3633aeb9bc9e4
parent78842760c21f875845f7b7c8f9f4b55a942885e0 (diff)
downloadhostap-07-a48f8380fa561d5ebb37754a9dbb85bedd11b81e.zip
hostap-07-a48f8380fa561d5ebb37754a9dbb85bedd11b81e.tar.gz
hostap-07-a48f8380fa561d5ebb37754a9dbb85bedd11b81e.tar.bz2
dbus: Deauthenticate instead of disassociate on disconnect command
This clears up authentication state in the driver and in case of cfg80211, unlocks the BSS entry for the previously used AP. The previous commit cf4783e35fb4861181c275a3dbd607b58c7d4067 changed only the ctrl_iface DISCONNECT command behavior; this new commit does the same for D-Bus commands. (cherry picked from commit f9cd8587fb91f7f948f148ef10a8154714654d9d)
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c6
-rw-r--r--wpa_supplicant/dbus/dbus_old_handlers.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 83691de..602ad34 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1300,7 +1300,8 @@ DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message,
{
if (wpa_s->current_ssid != NULL) {
wpa_s->disconnected = 1;
- wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+ wpa_supplicant_deauthenticate(wpa_s,
+ WLAN_REASON_DEAUTH_LEAVING);
return NULL;
}
@@ -1433,7 +1434,8 @@ DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message,
}
if (ssid == wpa_s->current_ssid)
- wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+ wpa_supplicant_deauthenticate(wpa_s,
+ WLAN_REASON_DEAUTH_LEAVING);
out:
os_free(iface);
diff --git a/wpa_supplicant/dbus/dbus_old_handlers.c b/wpa_supplicant/dbus/dbus_old_handlers.c
index ef60b8f..d914697 100644
--- a/wpa_supplicant/dbus/dbus_old_handlers.c
+++ b/wpa_supplicant/dbus/dbus_old_handlers.c
@@ -872,7 +872,8 @@ DBusMessage * wpas_dbus_iface_remove_network(DBusMessage *message,
}
if (ssid == wpa_s->current_ssid)
- wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+ wpa_supplicant_deauthenticate(wpa_s,
+ WLAN_REASON_DEAUTH_LEAVING);
reply = wpas_dbus_new_success_reply(message);
out:
@@ -1141,7 +1142,7 @@ DBusMessage * wpas_dbus_iface_disconnect(DBusMessage *message,
struct wpa_supplicant *wpa_s)
{
wpa_s->disconnected = 1;
- wpa_supplicant_disassociate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
+ wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
return wpas_dbus_new_success_reply(message);
}