From 92ae830935a709034bafa9f4177eb4b22d53b37c Mon Sep 17 00:00:00 2001 From: Shen Mintao Date: Mon, 14 Apr 2025 14:01:27 +0800 Subject: [PATCH] fix: fix for linux kernel 6.13 and 6.14 --- drivers/aic8800/aic8800_fdrv/rwnx_main.c | 20 +++++++++++++++---- .../aic8800/aic_load_fw/aic_bluetooth_main.c | 4 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_main.c b/drivers/aic8800/aic8800_fdrv/rwnx_main.c index b3c8fd6..02dad94 100644 --- a/drivers/aic8800/aic8800_fdrv/rwnx_main.c +++ b/drivers/aic8800/aic8800_fdrv/rwnx_main.c @@ -3837,8 +3837,12 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1, } #endif -static int rwnx_cfg80211_set_monitor_channel(struct wiphy *wiphy, - struct cfg80211_chan_def *chandef) +static int rwnx_cfg80211_set_monitor_channel( + struct wiphy *wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0) + struct net_device *, +#endif + struct cfg80211_chan_def *chandef) { struct rwnx_hw *rwnx_hw = wiphy_priv(wiphy); struct rwnx_vif *rwnx_vif; @@ -4363,7 +4367,13 @@ static int rwnx_cfg80211_get_channel(struct wiphy *wiphy, if (rwnx_vif->vif_index == rwnx_hw->monitor_vif) { //retrieve channel from firmware - rwnx_cfg80211_set_monitor_channel(wiphy, NULL); + rwnx_cfg80211_set_monitor_channel( + wiphy, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0) + NULL, +#endif + NULL + ); } //Check if channel context is valid @@ -8540,7 +8550,9 @@ static void __exit rwnx_mod_exit(void) module_init(rwnx_mod_init); module_exit(rwnx_mod_exit); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0) +MODULE_IMPORT_NS("VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver"); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); #endif MODULE_FIRMWARE(RWNX_CONFIG_FW_NAME); diff --git a/drivers/aic8800/aic_load_fw/aic_bluetooth_main.c b/drivers/aic8800/aic_load_fw/aic_bluetooth_main.c index 9d1442d..c590fb1 100644 --- a/drivers/aic8800/aic_load_fw/aic_bluetooth_main.c +++ b/drivers/aic8800/aic_load_fw/aic_bluetooth_main.c @@ -69,7 +69,9 @@ static void __exit aic_bluetooth_mod_exit(void) module_init(aic_bluetooth_mod_init); module_exit(aic_bluetooth_mod_exit); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0) +MODULE_IMPORT_NS("VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver"); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); #endif