fix: fix for linux kernel 6.13 and 6.14

This commit is contained in:
Shen Mintao
2025-04-14 14:01:27 +08:00
parent d6765bdf1c
commit 92ae830935
2 changed files with 19 additions and 5 deletions
+15 -3
View File
@@ -3837,7 +3837,11 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
}
#endif
static int rwnx_cfg80211_set_monitor_channel(struct wiphy *wiphy,
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);
@@ -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);
@@ -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