support for kernel 5.0.0-8 (ubunt 19.04 beta)

This commit is contained in:
dingl 2019-04-02 22:23:03 +08:00
parent 2807a0a2b7
commit ceba78be61
2 changed files with 13 additions and 0 deletions

View File

@ -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;

View File

@ -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;