OSDN Git Service

Update rtl8723bu driver
[android-x86/external-kernel-drivers.git] / rtl8723bu / os_dep / linux / ioctl_cfg80211.c
index 657a2fb..f45b214 100644 (file)
@@ -355,8 +355,17 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
 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;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+       ktime_get_coarse_real_ts64(&ts);
+#else
+       ts = current_kernel_time64();
+#endif
+#else
        struct timespec ts;
        get_monotonic_boottime(&ts);
+#endif
        return ((u64)ts.tv_sec*1000000) + ts.tv_nsec / 1000;
 #else
        struct timeval tv;