Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-kernel-drivers: Commit

external/kernel-drivers


Commit MetaInfo

Révision63c47b7966d40e5468df1cd8df601aadef99756d (tree)
l'heure2020-04-20 17:33:53
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

Update rtl8723bu driver

From https://github.com/ulli-kroll/rtl8723bu master branch
commit 58a0fc2.

Change Summary

Modification

--- a/rtl8723bu/os_dep/linux/ioctl_cfg80211.c
+++ b/rtl8723bu/os_dep/linux/ioctl_cfg80211.c
@@ -355,8 +355,17 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
355355 static u64 rtw_get_systime_us(void)
356356 {
357357 #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
358366 struct timespec ts;
359367 get_monotonic_boottime(&ts);
368+#endif
360369 return ((u64)ts.tv_sec*1000000) + ts.tv_nsec / 1000;
361370 #else
362371 struct timeval tv;
--- a/rtl8723bu/os_dep/linux/rtw_android.c
+++ b/rtl8723bu/os_dep/linux/rtw_android.c
@@ -618,7 +618,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
618618 goto exit;
619619 }
620620
621+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
622+ if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){
623+#else
621624 if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)){
625+#endif
622626 DBG_871X("%s: failed to access memory\n", __FUNCTION__);
623627 ret = -EFAULT;
624628 goto exit;
Afficher sur ancien navigateur de dépôt.