wpa_supplicant: Use monotonic time for RX/BSS times

The BSS table, scan timeout, and related functionality should use
monotonic time since they care about relative values (age) only.
Unfortunately, these are all connected, so the patch can't be split
further. Another problem with this is that it changes the driver wrapper
API. Though, it seems only the test driver is using this.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2013-12-16 21:08:28 +01:00 committed by Jouni Malinen
parent 46b8d4c004
commit acb69cec6f
11 changed files with 58 additions and 56 deletions

View file

@ -3248,9 +3248,9 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
}
if (mask & WPA_BSS_MASK_AGE) {
struct os_time now;
struct os_reltime now;
os_get_time(&now);
os_get_reltime(&now);
ret = os_snprintf(pos, end - pos, "age=%d\n",
(int) (now.sec - bss->last_update.sec));
if (ret < 0 || ret >= end - pos)