aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-07-20 10:11:31 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-20 10:28:12 (GMT)
commit8c0d0ff22e402977ddf814d798a5c8e02a21199c (patch)
treed769d9cdf675da6abdc1baa628e451a2b0416fd4 /wpa_supplicant/bss.c
parent7b7e8a2ee73819ffbf833d4a7a77fc310d93484c (diff)
downloadhostap-8c0d0ff22e402977ddf814d798a5c8e02a21199c.zip
hostap-8c0d0ff22e402977ddf814d798a5c8e02a21199c.tar.gz
hostap-8c0d0ff22e402977ddf814d798a5c8e02a21199c.tar.bz2
Use a single cleanup timer per wpa_supplicant process
Previously, one timeout per process (by default every 30 seconds) was used P2P peer expiration and another per-interface timeout (every 10 seconds) was used to expire BSS entries. Merge these to a single per-process timeout that triggers every 10 seconds to minimize number of process wakeups due to periodic operations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/bss.c')
-rw-r--r--wpa_supplicant/bss.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 8134562..e4bde6e 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -19,11 +19,6 @@
#include "bss.h"
-/**
- * WPA_BSS_EXPIRATION_PERIOD - Period of expiration run in seconds
- */
-#define WPA_BSS_EXPIRATION_PERIOD 10
-
#define WPA_BSS_FREQ_CHANGED_FLAG BIT(0)
#define WPA_BSS_SIGNAL_CHANGED_FLAG BIT(1)
#define WPA_BSS_PRIVACY_CHANGED_FLAG BIT(2)
@@ -828,16 +823,6 @@ void wpa_bss_flush_by_age(struct wpa_supplicant *wpa_s, int age)
}
-static void wpa_bss_timeout(void *eloop_ctx, void *timeout_ctx)
-{
- struct wpa_supplicant *wpa_s = eloop_ctx;
-
- wpa_bss_flush_by_age(wpa_s, wpa_s->conf->bss_expiration_age);
- eloop_register_timeout(WPA_BSS_EXPIRATION_PERIOD, 0,
- wpa_bss_timeout, wpa_s, NULL);
-}
-
-
/**
* wpa_bss_init - Initialize BSS table
* @wpa_s: Pointer to wpa_supplicant data
@@ -850,8 +835,6 @@ int wpa_bss_init(struct wpa_supplicant *wpa_s)
{
dl_list_init(&wpa_s->bss);
dl_list_init(&wpa_s->bss_id);
- eloop_register_timeout(WPA_BSS_EXPIRATION_PERIOD, 0,
- wpa_bss_timeout, wpa_s, NULL);
return 0;
}
@@ -883,7 +866,6 @@ void wpa_bss_flush(struct wpa_supplicant *wpa_s)
*/
void wpa_bss_deinit(struct wpa_supplicant *wpa_s)
{
- eloop_cancel_timeout(wpa_bss_timeout, wpa_s, NULL);
wpa_bss_flush(wpa_s);
}