OSDN Git Service

Update rtl8723bu driver
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 20 Apr 2020 08:33:53 +0000 (16:33 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 20 Apr 2020 08:33:53 +0000 (16:33 +0800)
From https://github.com/ulli-kroll/rtl8723bu master branch
commit 58a0fc2.

rtl8723bu/os_dep/linux/ioctl_cfg80211.c
rtl8723bu/os_dep/linux/rtw_android.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;
index 40da4a8..5469d2f 100644 (file)
@@ -618,7 +618,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
                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;