From 3fc2c3fc246bde645a066fe676d56a7ce4bc8e09 Mon Sep 17 00:00:00 2001 From: XChikuX Date: Fri, 30 Aug 2019 01:14:32 -0700 Subject: [PATCH] Updated Kernel Calls for Linux >= 5.0 --- os_dep/linux/ioctl_cfg80211.c | 4 ++-- os_dep/linux/rtw_android.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 80a3c01..7928168 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -335,8 +335,8 @@ static const struct ieee80211_txrx_stypes static u64 rtw_get_systime_us(void) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) - struct timespec ts; - get_monotonic_boottime(&ts); + struct timespec64 ts; + ktime_get_boottime_ts64(&ts); return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000; #else struct timeval tv; diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 9c85dfb..3c0cbf0 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -626,7 +626,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) goto exit; } - if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) { + if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) { RTW_INFO("%s: failed to access memory\n", __FUNCTION__); ret = -EFAULT; goto exit;