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;
goto exit;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
+ if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){
+#else
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)){
+#endif
DBG_871X("%s: failed to access memory\n", __FUNCTION__);
ret = -EFAULT;
goto exit;