From 981899f422fb25a95218a146619c7cda3ed5297c Mon Sep 17 00:00:00 2001 From: rafaelpierri Date: Tue, 23 Jul 2019 21:25:35 -0300 Subject: [PATCH] Sets default compilation system to PC and fixes method signature for Kernel 5.2+ (#303) --- Makefile | 4 ++-- os_dep/linux/os_intfs.c | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index d055510..dc027f3 100644 --- a/Makefile +++ b/Makefile @@ -74,9 +74,9 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y ###################### Platform Related ####################### # Jeston Nano Headers # /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9 -CONFIG_PLATFORM_I386_PC = n +CONFIG_PLATFORM_I386_PC = y CONFIG_PLATFORM_ARM_RPI = n -CONFIG_PLATFORM_ARM_JET_NANO = y +CONFIG_PLATFORM_ARM_JET_NANO = n CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ANDROID_INTEL_X86 = n CONFIG_PLATFORM_JB_X86 = n diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index f5b9251..9289ca1 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -686,19 +686,20 @@ 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(3, 13, 0) -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) - , struct net_device *sb_dev +#if (LINUX_VERSION_CODE>=KERNEL_VERSION(5,2,0)) +static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, + struct net_device *sb_dev) +#elif (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) +#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(3,14,0)) +static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, + void *accel_priv, + select_queue_fallback_t fallback) #else - , void *accel_priv +static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb) #endif -#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;