aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-11-25 20:56:07 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-08 04:50:15 (GMT)
commitfe52c210cf6c83bcafa7b6dc0ee6fb523d502b2b (patch)
tree8ddde9706da3d291c549fe9707d253ffc35ce041 /src/utils
parent100298e896d95fd59a312aaa6100ed7bbcff930d (diff)
downloadhostap-fe52c210cf6c83bcafa7b6dc0ee6fb523d502b2b.zip
hostap-fe52c210cf6c83bcafa7b6dc0ee6fb523d502b2b.tar.gz
hostap-fe52c210cf6c83bcafa7b6dc0ee6fb523d502b2b.tar.bz2
Use monotonic clock for last_sae_token_key_update
Just the usual, with a new function os_reltime_initialized() thrown in that checks whether time has ever been retrieved (time can't be completely zero). Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/os.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/os.h b/src/utils/os.h
index f933292..2e2350a 100644
--- a/src/utils/os.h
+++ b/src/utils/os.h
@@ -108,6 +108,12 @@ static inline int os_reltime_expired(struct os_reltime *now,
}
+static inline int os_reltime_initialized(struct os_reltime *t)
+{
+ return t->sec != 0 || t->usec != 0;
+}
+
+
/**
* os_mktime - Convert broken-down time into seconds since 1970-01-01
* @year: Four digit year