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>
This commit is contained in:
Johannes Berg 2013-11-25 21:56:07 +01:00 committed by Jouni Malinen
parent 100298e896
commit fe52c210cf
3 changed files with 12 additions and 6 deletions

View file

@ -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