diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-04-11 14:21:35 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-04-11 14:24:24 +0300 |
commit | a625ff6059c9de153891a9754642086e21d509bd (patch) | |
tree | cae10598297a3a51f5e76a1965e03343bbf00af3 /src/ap | |
parent | 42ca9845be73bfb0d90495a88bbba9d2a333bab9 (diff) | |
download | external_wpa_supplicant_8_ti-a625ff6059c9de153891a9754642086e21d509bd.zip external_wpa_supplicant_8_ti-a625ff6059c9de153891a9754642086e21d509bd.tar.gz external_wpa_supplicant_8_ti-a625ff6059c9de153891a9754642086e21d509bd.tar.bz2 |
AP: Reschedule ap_handle_timer event on (re)association
Previously, the timeout scheduled during the previous association was
used after reassociation if the STA entry had not yet been removed. The
next timeout does not need to happen that quickly, so reschedule it
during reassociation.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap')
-rw-r--r-- | src/ap/hostapd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 03917bc..0f94188 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -990,4 +990,12 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta, wpa_auth_sm_event(sta->wpa_sm, WPA_REAUTH); } else wpa_auth_sta_associated(hapd->wpa_auth, sta->wpa_sm); + + wpa_printf(MSG_DEBUG, "%s: reschedule ap_handle_timer timeout " + "for " MACSTR " (%d seconds - ap_max_inactivity)", + __func__, MAC2STR(sta->addr), + hapd->conf->ap_max_inactivity); + eloop_cancel_timeout(ap_handle_timer, hapd, sta); + eloop_register_timeout(hapd->conf->ap_max_inactivity, 0, + ap_handle_timer, hapd, sta); } |