Merge pull request #232 from CGarces/centos8_fix

Add RHEL/CENTOS 8 support
This commit is contained in:
Carlos Garcés
2021-04-03 16:52:43 +02:00
committed by GitHub
5 changed files with 120 additions and 114 deletions

View File

@@ -1337,7 +1337,7 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0)
, struct net_device *sb_dev
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
, void *accel_priv

View File

@@ -663,7 +663,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
ret = -ENOMEM;
goto exit;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0))
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)){
#else
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {