deepin-superuser
deepin
7 hours ago 给你的代码加个高亮
diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_main.c b/drivers/aic8800/aic8800_fdrv/rwnx_main.c
index 2b1d07a..d9c0071 100644
--- a/drivers/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/drivers/aic8800/aic8800_fdrv/rwnx_main.c
@@ -4146,7 +4146,7 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
}
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+#if 1
static int rwnx_cfg80211_set_monitor_channel(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_chan_def *chandef)
#else
@@ -4206,7 +4206,7 @@ static int rwnx_cfg80211_set_monitor_channel(struct wiphy *wiphy,
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+#if 1
int rwnx_cfg80211_set_monitor_channel_(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_chan_def *chandef)
@@ -4701,7 +4701,7 @@ static int rwnx_cfg80211_get_channel(struct wiphy *wiphy,
if (rwnx_vif->vif_index == rwnx_hw->monitor_vif)
{
//retrieve channel from firmware
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+#if 1
rwnx_cfg80211_set_monitor_channel(wiphy, wdev->netdev, NULL);
#else
rwnx_cfg80211_set_monitor_channel(wiphy, NULL);
Reply Like 1 View the author


中文 
如题,上一版内核和目前版本内核区别

开源驱动根据#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))判断,导致识别API错误。以下是个人强制修复patch代码,但是对于非驱动开发工程师来说,应该比较难理解。非常不建议合并新驱动修改API.
diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_main.c b/drivers/aic8800/aic8800_fdrv/rwnx_main.c
index 2b1d07a..d9c0071 100644
--- a/drivers/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/drivers/aic8800/aic8800_fdrv/rwnx_main.c
@@ -4146,7 +4146,7 @@ cfg80211_chandef_identical(const struct cfg80211_chan_def *chandef1,
}
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+#if 1
static int rwnx_cfg80211_set_monitor_channel(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_chan_def *chandef)
#else
@@ -4206,7 +4206,7 @@ static int rwnx_cfg80211_set_monitor_channel(struct wiphy *wiphy,
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+#if 1
int rwnx_cfg80211_set_monitor_channel_(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_chan_def *chandef)
@@ -4701,7 +4701,7 @@ static int rwnx_cfg80211_get_channel(struct wiphy *wiphy,
if (rwnx_vif->vif_index == rwnx_hw->monitor_vif)
{
//retrieve channel from firmware
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
+#if 1
rwnx_cfg80211_set_monitor_channel(wiphy, wdev->netdev, NULL);
#else
rwnx_cfg80211_set_monitor_channel(wiphy, NULL);