Merged the hostap_2.6 updates, and the Leap of Faith work, from the hostap_update...
[mech_eap.git] / libeap / src / ap / ap_mlme.c
index 2b09b11..e7308a0 100644 (file)
@@ -4,14 +4,8 @@
  * Copyright 2003-2004, Instant802 Networks, Inc.
  * Copyright 2005-2006, Devicescape Software, Inc.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "utils/includes.h"
@@ -22,6 +16,7 @@
 #include "wpa_auth.h"
 #include "sta_info.h"
 #include "ap_mlme.h"
+#include "hostapd.h"
 
 
 #ifndef CONFIG_NO_HOSTAPD_LOGGER
@@ -64,6 +59,7 @@ void mlme_authenticate_indication(struct hostapd_data *hapd,
                       MAC2STR(sta->addr), mlme_auth_alg_str(sta->auth_alg));
        if (sta->auth_alg != WLAN_AUTH_FT && !(sta->flags & WLAN_STA_MFP))
                mlme_deletekeys_request(hapd, sta);
+       ap_sta_clear_disconnect_timeouts(hapd, sta);
 }
 
 
@@ -86,7 +82,8 @@ void mlme_deauthenticate_indication(struct hostapd_data *hapd,
                       HOSTAPD_LEVEL_DEBUG,
                       "MLME-DEAUTHENTICATE.indication(" MACSTR ", %d)",
                       MAC2STR(sta->addr), reason_code);
-       mlme_deletekeys_request(hapd, sta);
+       if (!hapd->iface->driver_ap_teardown)
+               mlme_deletekeys_request(hapd, sta);
 }
 
 
@@ -110,6 +107,7 @@ void mlme_associate_indication(struct hostapd_data *hapd, struct sta_info *sta)
                       MAC2STR(sta->addr));
        if (sta->auth_alg != WLAN_AUTH_FT)
                mlme_deletekeys_request(hapd, sta);
+       ap_sta_clear_disconnect_timeouts(hapd, sta);
 }
 
 
@@ -124,8 +122,6 @@ void mlme_associate_indication(struct hostapd_data *hapd, struct sta_info *sta)
  * reassociation procedure that was initiated by that specific peer MAC entity.
  *
  * PeerSTAAddress = sta->addr
- *
- * sta->previous_ap contains the "Current AP" information from ReassocReq.
  */
 void mlme_reassociate_indication(struct hostapd_data *hapd,
                                 struct sta_info *sta)
@@ -136,6 +132,7 @@ void mlme_reassociate_indication(struct hostapd_data *hapd,
                       MAC2STR(sta->addr));
        if (sta->auth_alg != WLAN_AUTH_FT)
                mlme_deletekeys_request(hapd, sta);
+       ap_sta_clear_disconnect_timeouts(hapd, sta);
 }