diff --git a/include/basic_types.h b/include/basic_types.h index c0737f5..4ec0e61 100644 --- a/include/basic_types.h +++ b/include/basic_types.h @@ -72,6 +72,10 @@ #ifdef PLATFORM_LINUX #include + #ifndef RHEL_RELEASE_CODE + #define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b)) + #define RHEL_RELEASE_CODE 0 + #endif #include #include #include diff --git a/include/osdep_service.h b/include/osdep_service.h index dc6ace8..d7e3753 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -16,6 +16,10 @@ #define __OSDEP_SERVICE_H_ #include +#ifndef RHEL_RELEASE_CODE +#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b)) +#define RHEL_RELEASE_CODE 0 +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) #include #endif diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h index 6f5a5a4..684d685 100644 --- a/include/osdep_service_linux.h +++ b/include/osdep_service_linux.h @@ -16,6 +16,10 @@ #define __OSDEP_LINUX_SERVICE_H_ #include +#ifndef RHEL_RELEASE_CODE +#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b)) +#define RHEL_RELEASE_CODE 0 +#endif #include #include #include diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index ef370be..a3e4e81 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1366,7 +1366,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(3, 13, 0) - #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 #else , void *accel_priv diff --git a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c index 333267b..a373af7 100644 --- a/os_dep/linux/rtw_android.c +++ b/os_dep/linux/rtw_android.c @@ -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)) { diff --git a/platform/platform_aml_s905_sdio.h b/platform/platform_aml_s905_sdio.h index 2b87576..17d3cd7 100644 --- a/platform/platform_aml_s905_sdio.h +++ b/platform/platform_aml_s905_sdio.h @@ -16,6 +16,10 @@ #define __PLATFORM_AML_S905_SDIO_H__ #include /* Linux vresion */ +#ifndef RHEL_RELEASE_CODE +#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b)) +#define RHEL_RELEASE_CODE 0 +#endif extern void sdio_reinit(void); extern void extern_wifi_set_enable(int is_on);