rtl8188eu: Compile fix for kernel versions from 4.18 to 4.20

The #access_ok macro has two arguments starting from kernel 5.0.
This commit is contained in:
Karsten Wiese 2021-12-11 17:17:51 +01:00
parent 0f6d12e144
commit 667ab7a45f

View file

@ -356,7 +356,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit; goto exit;
} }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) { if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
#else #else
if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf, if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf,