diff --git a/Makefile b/Makefile index d8cd530..2f7bd51 100644 --- a/Makefile +++ b/Makefile @@ -44,18 +44,28 @@ EXTRA_LDFLAGS += --strip-debug 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 RHEL_VER 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 (${RHEL_VER},8) +EXTRA_CFLAGS += -DRHEL8 ifeq ($(shell test $(RHEL_SVER) -ge 477; echo $$?),0) EXTRA_CFLAGS += -DRHEL88 endif endif +ifeq (${RHEL_VER},9) +ifeq ($(shell test $(RHEL_SVER) -ge 284; echo $$?),0) +EXTRA_CFLAGS += -DRHEL92 -DRHEL88 +endif +endif + +endif + ########################## WIFI IC ############################ CONFIG_MULTIDRV = n CONFIG_RTL8188E = n diff --git a/hal/hal_hci/hal_usb.c b/hal/hal_hci/hal_usb.c index ab693ef..d683499 100644 --- a/hal/hal_hci/hal_usb.c +++ b/hal/hal_hci/hal_usb.c @@ -26,7 +26,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz) #ifdef PLATFORM_LINUX tasklet_init(&precvpriv->recv_tasklet, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) && !defined(RHEL92)) (void(*)(unsigned long))usb_recv_tasklet, #else (void *)usb_recv_tasklet, diff --git a/hal/rtl8822b/usb/rtl8822bu_xmit.c b/hal/rtl8822b/usb/rtl8822bu_xmit.c index 8bf20ad..711bdbd 100644 --- a/hal/rtl8822b/usb/rtl8822bu_xmit.c +++ b/hal/rtl8822b/usb/rtl8822bu_xmit.c @@ -878,7 +878,7 @@ s32 rtl8822bu_init_xmit_priv(PADAPTER padapter) #ifdef PLATFORM_LINUX tasklet_init(&pxmitpriv->xmit_tasklet, -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) && !defined(RHEL92)) (void(*)(unsigned long))rtl8822bu_xmit_tasklet, #else (void *)rtl8822bu_xmit_tasklet, diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 1e78cbb..89129c6 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1309,7 +1309,7 @@ u32 _rtw_down_sema(_sema *sema) inline void thread_exit(_completion *comp) { #ifdef PLATFORM_LINUX -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || defined(RHEL92)) kthread_complete_and_exit(comp, 0); #else complete_and_exit(comp, 0);