fix some source code for kernel 6.12

This commit is contained in:
Shen Mintao
2025-01-09 11:06:42 +08:00
parent b03491a064
commit 04dc3e356a
4 changed files with 22 additions and 7 deletions
-2
View File
@@ -4,8 +4,6 @@ EXTRA_CFLAGS += -Wno-implicit-fallthrough
RWNX_VERS_NUM := 6.4.3.0 RWNX_VERS_NUM := 6.4.3.0
CONFIG_MODULE_SIG = n
CONFIG_AIC8800_WLAN_SUPPORT = m CONFIG_AIC8800_WLAN_SUPPORT = m
MODULE_NAME = aic8800_fdrv MODULE_NAME = aic8800_fdrv
CONFIG_COUNTRY_CODE = "00" CONFIG_COUNTRY_CODE = "00"
+12 -2
View File
@@ -1071,7 +1071,9 @@ static void rwnx_csa_finish(struct work_struct *ws)
} else } else
rwnx_txq_vif_stop(vif, RWNX_TXQ_STOP_CHAN, rwnx_hw); rwnx_txq_vif_stop(vif, RWNX_TXQ_STOP_CHAN, rwnx_hw);
spin_unlock_bh(&rwnx_hw->cb_lock); spin_unlock_bh(&rwnx_hw->cb_lock);
#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION3) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0))
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0);
#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION3)
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0, 0); cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0); cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0);
@@ -4545,6 +4547,11 @@ int rwnx_cfg80211_start_radar_detection(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
, u32 cac_time_ms , u32 cac_time_ms
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0))
, int link_id
#endif
) )
{ {
struct rwnx_hw *rwnx_hw = wiphy_priv(wiphy); struct rwnx_hw *rwnx_hw = wiphy_priv(wiphy);
@@ -4694,7 +4701,10 @@ int rwnx_cfg80211_channel_switch(struct wiphy *wiphy,
goto end; goto end;
} else { } else {
INIT_WORK(&csa->work, rwnx_csa_finish); INIT_WORK(&csa->work, rwnx_csa_finish);
#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION4
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false);
#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION4
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false, 0); cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false, 0);
#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2 #elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false); cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false);
+10 -2
View File
@@ -1399,7 +1399,11 @@ static void rwnx_radar_cac_work(struct work_struct *ws)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
&ctxt->chan_def, &ctxt->chan_def,
#endif #endif
NL80211_RADAR_CAC_FINISHED, GFP_KERNEL); NL80211_RADAR_CAC_FINISHED, GFP_KERNEL
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
, 0
#endif
);
rwnx_send_apm_stop_cac_req(rwnx_hw, radar->cac_vif); rwnx_send_apm_stop_cac_req(rwnx_hw, radar->cac_vif);
rwnx_chanctx_unlink(radar->cac_vif); rwnx_chanctx_unlink(radar->cac_vif);
@@ -1499,7 +1503,11 @@ void rwnx_radar_cancel_cac(struct rwnx_radar *radar)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
&ctxt->chan_def, &ctxt->chan_def,
#endif #endif
NL80211_RADAR_CAC_ABORTED, GFP_KERNEL); NL80211_RADAR_CAC_ABORTED, GFP_KERNEL
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
, 0
#endif
);
rwnx_chanctx_unlink(radar->cac_vif); rwnx_chanctx_unlink(radar->cac_vif);
} }
-1
View File
@@ -1,4 +1,3 @@
CONFIG_MODULE_SIG = n
CONFIG_USB_SUPPORT =y CONFIG_USB_SUPPORT =y
CONFIG_RFTEST =y CONFIG_RFTEST =y
CONFIG_USB_BT =y CONFIG_USB_BT =y