]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Reschedule ap_handle_timer event on (re)association
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 11 Apr 2012 11:21:35 +0000 (14:21 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 11 Apr 2012 11:24:24 +0000 (14:24 +0300)
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>

src/ap/hostapd.c

index 03917bced109692c1782b565d73dc3ec794219d5..0f94188a039e3275aba5a657217263a9445cd270 100644 (file)
@@ -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);
 }