1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-29 08:27:41 +00:00

Replace get_monotonic_boottime

This function is deprecated as of kernel 4.20. It is replaced straight
away with ktime_get_boottime_ts64
This commit is contained in:
Kamil Lorenc 2019-05-26 16:21:29 +02:00
parent 7d1c32cd06
commit ae733769ea

View File

@ -342,7 +342,11 @@ static const struct ieee80211_txrx_stypes
static u64 rtw_get_systime_us(void) 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 timespec64 ts;
ktime_get_boottime_ts64(&ts);
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
struct timespec ts; struct timespec ts;
get_monotonic_boottime(&ts); get_monotonic_boottime(&ts);
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000; return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;