From 86a0e9625141503aa9fb7cc58e499edc6a2eb5ab Mon Sep 17 00:00:00 2001 From: Rin Cat Date: Mon, 7 Jan 2019 19:36:19 -0500 Subject: [PATCH] Linux 4.20 compat: get_monotonic_boottime() --- os_dep/linux/ioctl_cfg80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100755 => 100644 os_dep/linux/ioctl_cfg80211.c diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c old mode 100755 new mode 100644 index e7e8930..b3a5066 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -686,7 +686,11 @@ static int rtw_cfg80211_sync_iftype(_adapter *adapter) static u64 rtw_get_systime_us(void) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)) + struct timespec ts; + getboottime(&ts); + return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000; +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) struct timespec ts; get_monotonic_boottime(&ts); return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;