added rhel8 support
On branch rhel8 Changes to be committed: modified: Makefile modified: README.md modified: include/osdep_service_linux.h modified: os_dep/linux/ioctl_cfg80211.c modified: os_dep/linux/ioctl_cfg80211.h modified: os_dep/linux/nlrtw.c modified: os_dep/linux/os_intfs.c modified: os_dep/linux/rtw_android.c modified: os_dep/osdep_service.c
This commit is contained in:
parent
1c8bdd7ef5
commit
2c1c54dad1
5
Makefile
5
Makefile
@ -26,6 +26,11 @@ EXTRA_LDFLAGS += --strip-debug
|
|||||||
|
|
||||||
CONFIG_AUTOCFG_CP = n
|
CONFIG_AUTOCFG_CP = n
|
||||||
|
|
||||||
|
RHEL_VER := $(shell echo `grep '^ID_LIKE' /etc/os-release |grep -qi 'fedora' && grep '^VERSION_ID' /etc/os-release | cut -f2 -d= | cut -c2`)
|
||||||
|
ifeq (${RHEL_VER},8)
|
||||||
|
EXTRA_CFLAGS += -DRHEL8
|
||||||
|
endif
|
||||||
|
|
||||||
########################## WIFI IC ############################
|
########################## WIFI IC ############################
|
||||||
CONFIG_MULTIDRV = n
|
CONFIG_MULTIDRV = n
|
||||||
CONFIG_RTL8188E = n
|
CONFIG_RTL8188E = n
|
||||||
|
@ -77,6 +77,8 @@ $ sudo uname -a && mokutil --sb-state && lsusb && rfkill list all && dkms status
|
|||||||
|
|
||||||
- Ubuntu 20.xx (kernels 5.4 and 5.8) and 21.xx (kernels 5.11 and 5.14)
|
- Ubuntu 20.xx (kernels 5.4 and 5.8) and 21.xx (kernels 5.11 and 5.14)
|
||||||
|
|
||||||
|
- RHEL 8.4 (kernel 4.18.0)
|
||||||
|
|
||||||
### Download Locations for Tested Linux Distributions
|
### Download Locations for Tested Linux Distributions
|
||||||
|
|
||||||
- [Arch Linux](https://www.archlinux.org)
|
- [Arch Linux](https://www.archlinux.org)
|
||||||
@ -86,12 +88,14 @@ $ sudo uname -a && mokutil --sb-state && lsusb && rfkill list all && dkms status
|
|||||||
- [Manjaro](https://manjaro.org)
|
- [Manjaro](https://manjaro.org)
|
||||||
- [Raspberry Pi OS](https://www.raspberrypi.org)
|
- [Raspberry Pi OS](https://www.raspberrypi.org)
|
||||||
- [Ubuntu](https://www.ubuntu.com)
|
- [Ubuntu](https://www.ubuntu.com)
|
||||||
|
- [RHEL](https://www.redhat.com)
|
||||||
|
|
||||||
### Tested Hardware
|
### Tested Hardware
|
||||||
|
|
||||||
- [EDUP EP-AC1605GS WiFi Adapter 1300Mbps USB 3.0 High Gain Wireless Adapter](https://www.amazon.com/gp/product/B07Q56K68T)
|
- [EDUP EP-AC1605GS WiFi Adapter 1300Mbps USB 3.0 High Gain Wireless Adapter](https://www.amazon.com/gp/product/B07Q56K68T)
|
||||||
- [FIDECO 6B21-AC1200M WiFi Adapter - AC1200 Dual Band](https://www.amazon.co.uk/gp/product/B08523KPP9)
|
- [FIDECO 6B21-AC1200M WiFi Adapter - AC1200 Dual Band](https://www.amazon.co.uk/gp/product/B08523KPP9)
|
||||||
- [Cudy WU1400 AC 1300Mbps USB 3.0 WiFi Adapter](https://www.amazon.com/Cudy-WU1200-AC1200Mbps-Wireless-Compatible/dp/B07Q9KY4NT)
|
- [Cudy WU1400 AC 1300Mbps USB 3.0 WiFi Adapter](https://www.amazon.com/Cudy-WU1200-AC1200Mbps-Wireless-Compatible/dp/B07Q9KY4NT)
|
||||||
|
- [jjPlus WMU6202 miniPCIe - USB - WIFI2.4/5.0GHz Bluetooth (RTL8822BU)](https://techship.com/products/jjplus-wmu6202-mpcie-usb-wifi24-50ghz-bluetooth/)
|
||||||
|
|
||||||
### Compatible Devices
|
### Compatible Devices
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) || defined(RHEL8))
|
||||||
#include <uapi/linux/sched/types.h>
|
#include <uapi/linux/sched/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ static int rtw_cfg80211_sync_iftype(_adapter *adapter)
|
|||||||
|
|
||||||
static u64 rtw_get_systime_us(void)
|
static u64 rtw_get_systime_us(void)
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) || defined(RHEL8))
|
||||||
return ktime_to_us(ktime_get_boottime());
|
return ktime_to_us(ktime_get_boottime());
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
@ -8289,7 +8289,7 @@ exit:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(RHEL8))
|
||||||
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy,
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||||
struct wireless_dev *wdev,
|
struct wireless_dev *wdev,
|
||||||
@ -10467,7 +10467,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
|||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
.mgmt_tx = cfg80211_rtw_mgmt_tx,
|
.mgmt_tx = cfg80211_rtw_mgmt_tx,
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) && !defined(RHEL8))
|
||||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
||||||
#else
|
#else
|
||||||
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
|
.update_mgmt_frame_registrations = cfg80211_rtw_update_mgmt_frame_register,
|
||||||
@ -10556,7 +10556,7 @@ int rtw_wiphy_register(struct wiphy *wiphy)
|
|||||||
{
|
{
|
||||||
RTW_INFO(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy));
|
RTW_INFO(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy));
|
||||||
|
|
||||||
#if ( (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) \
|
#if ( (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && !defined(RHEL8)) \
|
||||||
|| defined(RTW_VENDOR_EXT_SUPPORT) )
|
|| defined(RTW_VENDOR_EXT_SUPPORT) )
|
||||||
rtw_cfgvendor_attach(wiphy);
|
rtw_cfgvendor_attach(wiphy);
|
||||||
#endif
|
#endif
|
||||||
@ -10570,7 +10570,7 @@ void rtw_wiphy_unregister(struct wiphy *wiphy)
|
|||||||
{
|
{
|
||||||
RTW_INFO(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy));
|
RTW_INFO(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy));
|
||||||
|
|
||||||
#if ( (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) \
|
#if ( (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && !defined(RHEL8)) \
|
||||||
|| defined(RTW_VENDOR_EXT_SUPPORT) )
|
|| defined(RTW_VENDOR_EXT_SUPPORT) )
|
||||||
rtw_cfgvendor_detach(wiphy);
|
rtw_cfgvendor_detach(wiphy);
|
||||||
#endif
|
#endif
|
||||||
|
@ -414,7 +414,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || defined(RHEL8))
|
||||||
#define rtw_cfg80211_notify_new_peer_candidate(wdev, addr, ie, ie_len, sig_dbm, gfp) cfg80211_notify_new_peer_candidate(wdev_to_ndev(wdev), addr, ie, ie_len, sig_dbm, gfp)
|
#define rtw_cfg80211_notify_new_peer_candidate(wdev, addr, ie, ie_len, sig_dbm, gfp) cfg80211_notify_new_peer_candidate(wdev_to_ndev(wdev), addr, ie, ie_len, sig_dbm, gfp)
|
||||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||||
#define rtw_cfg80211_notify_new_peer_candidate(wdev, addr, ie, ie_len, sig_dbm, gfp) cfg80211_notify_new_peer_candidate(wdev_to_ndev(wdev), addr, ie, ie_len, gfp)
|
#define rtw_cfg80211_notify_new_peer_candidate(wdev, addr, ie, ie_len, sig_dbm, gfp) cfg80211_notify_new_peer_candidate(wdev_to_ndev(wdev), addr, ie, ie_len, gfp)
|
||||||
|
@ -108,7 +108,7 @@ static struct genl_ops nlrtw_genl_ops[] = {
|
|||||||
{
|
{
|
||||||
.cmd = NLRTW_CMD_CHANNEL_UTILIZATION,
|
.cmd = NLRTW_CMD_CHANNEL_UTILIZATION,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) || !defined(RHEL8))
|
||||||
.policy = nlrtw_genl_policy,
|
.policy = nlrtw_genl_policy,
|
||||||
#endif
|
#endif
|
||||||
.doit = nlrtw_ch_util_set,
|
.doit = nlrtw_ch_util_set,
|
||||||
@ -129,7 +129,7 @@ static struct genl_family nlrtw_genl_family = {
|
|||||||
.name = "nlrtw_"DRV_NAME,
|
.name = "nlrtw_"DRV_NAME,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
.maxattr = NLRTW_ATTR_MAX,
|
.maxattr = NLRTW_ATTR_MAX,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0) || defined(RHEL8))
|
||||||
.policy = nlrtw_genl_policy,
|
.policy = nlrtw_genl_policy,
|
||||||
#endif
|
#endif
|
||||||
.netnsok = true,
|
.netnsok = true,
|
||||||
|
@ -1722,7 +1722,7 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
|
|||||||
|
|
||||||
static u16 rtw_select_queue(struct net_device *dev, 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(3, 13, 0)
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || defined(RHEL8))
|
||||||
, struct net_device *sb_dev
|
, struct net_device *sb_dev
|
||||||
#else
|
#else
|
||||||
, void *accel_priv
|
, void *accel_priv
|
||||||
|
@ -663,7 +663,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || defined(RHEL8))
|
||||||
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
|
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
|
||||||
#else
|
#else
|
||||||
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
|
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
|
||||||
|
@ -2507,7 +2507,7 @@ static int isFileReadable(const char *path, u32 *sz)
|
|||||||
else {
|
else {
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
oldfs = get_fs();
|
oldfs = get_fs();
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) || defined(RHEL8))
|
||||||
set_fs(KERNEL_DS);
|
set_fs(KERNEL_DS);
|
||||||
#else
|
#else
|
||||||
set_fs(get_ds());
|
set_fs(get_ds());
|
||||||
@ -2555,7 +2555,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz)
|
|||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
oldfs = get_fs();
|
oldfs = get_fs();
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) || defined(RHEL8))
|
||||||
set_fs(KERNEL_DS);
|
set_fs(KERNEL_DS);
|
||||||
#else
|
#else
|
||||||
set_fs(get_ds());
|
set_fs(get_ds());
|
||||||
@ -2602,7 +2602,7 @@ static int storeToFile(const char *path, u8 *buf, u32 sz)
|
|||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
|
||||||
oldfs = get_fs();
|
oldfs = get_fs();
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) || defined(RHEL8))
|
||||||
set_fs(KERNEL_DS);
|
set_fs(KERNEL_DS);
|
||||||
#else
|
#else
|
||||||
set_fs(get_ds());
|
set_fs(get_ds());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user