Add RHEL 8 support and support for possible work on future RHEL

releases.
This commit is contained in:
Quentin Barnes 2020-03-28 10:15:18 -05:00
parent be92ddcdb2
commit 1076705322
6 changed files with 18 additions and 2 deletions

View File

@ -72,6 +72,10 @@
#ifdef PLATFORM_LINUX
#include <linux/version.h>
#ifndef RHEL_RELEASE_CODE
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
#define RHEL_RELEASE_CODE 0
#endif
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>

View File

@ -16,6 +16,10 @@
#define __OSDEP_SERVICE_H_
#include <linux/version.h>
#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 <linux/sched/signal.h>
#endif

View File

@ -16,6 +16,10 @@
#define __OSDEP_LINUX_SERVICE_H_
#include <linux/version.h>
#ifndef RHEL_RELEASE_CODE
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
#define RHEL_RELEASE_CODE 0
#endif
#include <linux/spinlock.h>
#include <linux/compiler.h>
#include <linux/kernel.h>

View File

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

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)) {

View File

@ -16,6 +16,10 @@
#define __PLATFORM_AML_S905_SDIO_H__
#include <linux/version.h> /* 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);