added support of new kernel for rhel8.8
This commit is contained in:
parent
79204b790f
commit
9527222a9f
8
Makefile
8
Makefile
@ -46,6 +46,14 @@ 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
|
||||
ifdef KVER
|
||||
RHEL_SVER := $(shell echo $(KVER) |sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-\([0-9][0-9]*\).*/\1/')
|
||||
else
|
||||
RHEL_SVER := $(shell uname -r |sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*-\([0-9][0-9]*\).*/\1/')
|
||||
endif
|
||||
ifeq ($(shell test $(RHEL_SVER) -ge 477; echo $$?),0)
|
||||
EXTRA_CFLAGS += -DRHEL88
|
||||
endif
|
||||
endif
|
||||
|
||||
########################## WIFI IC ############################
|
||||
|
@ -464,7 +464,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
|
||||
* called by others with block-tx.
|
||||
*/
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
||||
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);
|
||||
#else
|
||||
@ -483,7 +483,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
|
||||
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
|
||||
goto exit;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
|
||||
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
|
||||
#else
|
||||
@ -506,7 +506,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
|
||||
}
|
||||
|
||||
ctype = rtw_chbw_to_nl80211_channel_type(ch, bw, offset, ht);
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))
|
||||
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype, 0);
|
||||
#else
|
||||
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype);
|
||||
@ -1159,7 +1159,7 @@ check_bss:
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(RHEL88))
|
||||
roam_info.links[0].bssid = cur_network->network.MacAddress;
|
||||
#else
|
||||
roam_info.bssid = cur_network->network.MacAddress;
|
||||
@ -1923,7 +1923,7 @@ exit:
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
, int link_id
|
||||
#endif
|
||||
, u8 key_index
|
||||
@ -2088,7 +2088,7 @@ addkey_end:
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
, int link_id
|
||||
#endif
|
||||
, u8 keyid
|
||||
@ -2279,7 +2279,7 @@ exit:
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
int link_id,
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
@ -2303,7 +2303,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
|
||||
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
int link_id,
|
||||
#endif
|
||||
u8 key_index
|
||||
@ -2355,7 +2355,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
|
||||
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
int link_id,
|
||||
#endif
|
||||
u8 key_index)
|
||||
@ -5418,7 +5418,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))
|
||||
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
|
||||
unsigned int link_id)
|
||||
#else
|
||||
@ -6803,7 +6803,7 @@ exit:
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
static int cfg80211_rtw_get_channel(struct wiphy *wiphy,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))
|
||||
struct wireless_dev *wdev, unsigned int link_id,
|
||||
#else
|
||||
struct wireless_dev *wdev,
|
||||
@ -10742,7 +10742,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
|
||||
rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88))
|
||||
if (wdev->links[0].client.current_bss) {
|
||||
#else
|
||||
if (wdev->current_bss) {
|
||||
|
@ -1634,7 +1634,7 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
||||
}
|
||||
|
||||
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || defined(RHEL8))
|
||||
eth_hw_addr_set(pnetdev, sa->sa_data);
|
||||
#else
|
||||
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
||||
@ -2154,7 +2154,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
|
||||
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
|
||||
#else
|
||||
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
|
||||
@ -2178,7 +2178,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
/* alloc netdev name */
|
||||
rtw_init_netdev_name(ndev, name);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || defined(RHEL8))
|
||||
eth_hw_addr_set(ndev, adapter_mac_addr(adapter));
|
||||
#else
|
||||
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
||||
|
@ -2914,7 +2914,7 @@ u64 rtw_division64(u64 x, u64 y)
|
||||
inline u32 rtw_random32(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88))
|
||||
return get_random_u32();
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
return prandom_u32();
|
||||
|
Loading…
x
Reference in New Issue
Block a user