external/kernel-drivers
Revision | 63c47b7966d40e5468df1cd8df601aadef99756d (tree) |
---|---|
Time | 2020-04-20 17:33:53 |
Author | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Update rtl8723bu driver
From https://github.com/ulli-kroll/rtl8723bu master branch
commit 58a0fc2.
@@ -355,8 +355,17 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { | ||
355 | 355 | static u64 rtw_get_systime_us(void) |
356 | 356 | { |
357 | 357 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) |
358 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0)) | |
359 | + struct timespec64 ts; | |
360 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) | |
361 | + ktime_get_coarse_real_ts64(&ts); | |
362 | +#else | |
363 | + ts = current_kernel_time64(); | |
364 | +#endif | |
365 | +#else | |
358 | 366 | struct timespec ts; |
359 | 367 | get_monotonic_boottime(&ts); |
368 | +#endif | |
360 | 369 | return ((u64)ts.tv_sec*1000000) + ts.tv_nsec / 1000; |
361 | 370 | #else |
362 | 371 | struct timeval tv; |
@@ -618,7 +618,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) | ||
618 | 618 | goto exit; |
619 | 619 | } |
620 | 620 | |
621 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)) | |
622 | + if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){ | |
623 | +#else | |
621 | 624 | if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)){ |
625 | +#endif | |
622 | 626 | DBG_871X("%s: failed to access memory\n", __FUNCTION__); |
623 | 627 | ret = -EFAULT; |
624 | 628 | goto exit; |