diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index a964d67..e9871b7 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1009,6 +1009,13 @@ unsigned int rtw_classify8021d(struct sk_buff *skb) return dscp >> 5; } + +#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,19,0)) +static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, + struct net_device *sb_dev, + select_queue_fallback_t fallback +#else + static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) , void *unused @@ -1016,6 +1023,8 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) , select_queue_fallback_t fallback #endif + +#endif ){ _adapter *padapter = rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index d56c2ec..2086a8f 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -352,7 +352,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;