aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-16 20:08:27 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-24 05:17:25 (GMT)
commit46b8d4c004d49842bcccef110707ede6f109590e (patch)
tree693e3c0c8e18863811da12e573e52259d4bdc90b /wpa_supplicant/sme.c
parentf073fdee7bc9d573d611a3a7af71b053f66eadf6 (diff)
downloadhostap-46b8d4c004d49842bcccef110707ede6f109590e.zip
hostap-46b8d4c004d49842bcccef110707ede6f109590e.tar.gz
hostap-46b8d4c004d49842bcccef110707ede6f109590e.tar.bz2
wpa_supplicant: Use monotonic time for SA query timeout
The SA query timeout is just a regular timeout (currently hard-coded to 1000 TU), so use monotonic time for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 87c14ae..3a96623 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1151,9 +1151,9 @@ static const unsigned int sa_query_retry_timeout = 201;
static int sme_check_sa_query_timeout(struct wpa_supplicant *wpa_s)
{
u32 tu;
- struct os_time now, passed;
- os_get_time(&now);
- os_time_sub(&now, &wpa_s->sme.sa_query_start, &passed);
+ struct os_reltime now, passed;
+ os_get_reltime(&now);
+ os_reltime_sub(&now, &wpa_s->sme.sa_query_start, &passed);
tu = (passed.sec * 1000000 + passed.usec) / 1024;
if (sa_query_max_timeout < tu) {
wpa_dbg(wpa_s, MSG_DEBUG, "SME: SA Query timed out");
@@ -1203,7 +1203,7 @@ static void sme_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
return;
if (wpa_s->sme.sa_query_count == 0) {
/* Starting a new SA Query procedure */
- os_get_time(&wpa_s->sme.sa_query_start);
+ os_get_reltime(&wpa_s->sme.sa_query_start);
}
trans_id = nbuf + wpa_s->sme.sa_query_count * WLAN_SA_QUERY_TR_ID_LEN;
wpa_s->sme.sa_query_trans_id = nbuf;