adapt for 4.20

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
This commit is contained in:
Icenowy Zheng 2018-11-07 09:09:10 +08:00
parent 625771d2ff
commit f9549e2c8a
2 changed files with 6 additions and 2 deletions

View file

@ -1,2 +1,2 @@
#define DRIVERVERSION "v4.3.22.9_16440.20151221_BTCOEX20151214-0700-ICE02" #define DRIVERVERSION "v4.3.22.9_16440.20151221_BTCOEX20151214-0700-ICE03"
#define BTCOEXVERSION "BTCOEX20151214-0700" #define BTCOEXVERSION "BTCOEX20151214-0700"

View file

@ -347,7 +347,11 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
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;