fix for is_compat_task()

as seen and suggested by CGarces here https://github.com/CGarces/RTL8192EU-linux/issues/1#issuecomment-300795406
This commit is contained in:
masterzorag 2017-05-11 16:32:44 +02:00 committed by CGarces
parent c898434525
commit 3e0bf8d181
2 changed files with 8 additions and 0 deletions

View File

@ -14032,7 +14032,11 @@ static int rtw_ioctl_standard_wext_private(struct net_device *dev, struct ifreq
static int rtw_ioctl_wext_private(struct net_device *dev, struct ifreq *rq)
{
#ifdef CONFIG_COMPAT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
if(in_compat_syscall())
#else
if(is_compat_task())
#endif
return rtw_ioctl_compat_wext_private( dev, rq );
else
#endif // CONFIG_COMPAT

View File

@ -592,7 +592,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
#ifdef CONFIG_COMPAT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
if (in_compat_syscall()) {
#else
if (is_compat_task()) {
#endif
/* User space is 32-bit, use compat ioctl */
compat_android_wifi_priv_cmd compat_priv_cmd;