diff --git a/Makefile b/Makefile index c51e155..7e4dd0f 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,9 @@ endif ifeq ($(shell test $(RHEL_SVER) -ge 427; echo $$?),0) EXTRA_CFLAGS += -DRHEL94 endif +ifeq ($(shell test $(RHEL_SVER) -ge 503; echo $$?),0) +EXTRA_CFLAGS += -DRHEL95 +endif endif endif diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 25186a3..41859cd 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -465,7 +465,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(RHEL88)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) || defined(RHEL89) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) || (defined(RHEL89) && !defined(RHEL95)) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0); #else cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); @@ -484,7 +484,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, goto exit; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(RHEL88)) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) || defined(RHEL89) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0))) || (defined(RHEL89) && !defined(RHEL95)) cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); #else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); @@ -6911,7 +6911,10 @@ static void rtw_get_chbwoff_from_cfg80211_chan_def( #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) */ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0)) + , struct net_device *dev + , struct cfg80211_chan_def *chandef +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)) , struct cfg80211_chan_def *chandef #else , struct ieee80211_channel *chan diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 05b9120..06d0f04 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -31,7 +31,7 @@ MODULE_VERSION(DRIVERVERSION); * This declaration was created to resolve an error on Rockchip. * You can modify or add flags in the fs/Makefile. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)) MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); #endif diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index d365609..78b8885 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -362,7 +362,7 @@ struct rtw_usb_drv usb_drv = { .usbdrv.reset_resume = rtw_resume, #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)) && !defined(RHEL95) .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown, #else .usbdrv.driver.shutdown = rtw_dev_shutdown,