aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-16 20:08:41 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-24 06:01:59 (GMT)
commit4e1eae1dff54295d5d8036f8aeb4d84fbd38f7fa (patch)
treeac68419b2abad77e91398ee0ea47b1e0c6cc2bd3 /wpa_supplicant/events.c
parent151ab808fa64c7b3d302ec476c5797d89a42ac54 (diff)
downloadhostap-4e1eae1dff54295d5d8036f8aeb4d84fbd38f7fa.zip
hostap-4e1eae1dff54295d5d8036f8aeb4d84fbd38f7fa.tar.gz
hostap-4e1eae1dff54295d5d8036f8aeb4d84fbd38f7fa.tar.bz2
wpa_supplicant: Use monotonic time for temp-disabled networks
Temporarily disabled networks are disabled for a certain duration, so the code should use monotonic time. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 21a1132..fd12cf8 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -53,12 +53,12 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
static int wpas_temp_disabled(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid)
{
- struct os_time now;
+ struct os_reltime now;
if (ssid == NULL || ssid->disabled_until.sec == 0)
return 0;
- os_get_time(&now);
+ os_get_reltime(&now);
if (ssid->disabled_until.sec > now.sec)
return ssid->disabled_until.sec - now.sec;