Merge pull request #8 from vorasilp/6.15

fix kernel 6.15 compile error
This commit is contained in:
MinQ
2025-06-11 13:10:59 +08:00
committed by GitHub
4 changed files with 56 additions and 11 deletions
+10 -1
View File
@@ -527,7 +527,12 @@ static void aicwf_sdio_bus_stop(struct device *dev)
aicwf_sdio_pwrctl_timer(sdiodev, 0);
if(timer_pending(&sdiodev->rwnx_hw->p2p_alive_timer)){
ret = del_timer(&sdiodev->rwnx_hw->p2p_alive_timer);}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
ret = timer_delete(&sdiodev->rwnx_hw->p2p_alive_timer);
#else
ret = del_timer(&sdiodev->rwnx_hw->p2p_alive_timer);
#endif
}
sdio_dbg("%s\n",__func__);
if (sdiodev->pwrctl_tsk) {
complete(&sdiodev->pwrctrl_trgg);
@@ -1080,7 +1085,11 @@ void aicwf_sdio_pwrctl_timer(struct aic_sdio_dev *sdiodev, uint duration)
spin_lock_bh(&sdiodev->pwrctl_lock);
if (!duration) {
if (timer_pending(&sdiodev->timer))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&sdiodev->timer);
#else
del_timer_sync(&sdiodev->timer);
#endif
} else {
sdiodev->active_duration = duration;
timeout = msecs_to_jiffies(sdiodev->active_duration);
@@ -106,7 +106,11 @@ void tcp_ack_deinit(struct rwnx_hw *priv)
drop_msg = NULL;
write_seqlock_bh(&ack_m->ack_info[i].seqlock);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete(&ack_m->ack_info[i].timer);
#else
del_timer(&ack_m->ack_info[i].timer);
#endif
drop_msg = ack_m->ack_info[i].msgbuf;
ack_m->ack_info[i].msgbuf = NULL;
write_sequnlock_bh(&ack_m->ack_info[i].seqlock);
@@ -375,7 +379,11 @@ int tcp_ack_handle(struct msg_buf *new_msgbuf,
//printk("%lx \n",ack_info->msgbuf);
drop_msg = ack_info->msgbuf;
ack_info->msgbuf = NULL;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete(&ack_info->timer);
#else
del_timer(&ack_info->timer);
#endif
}else{
//printk("msgbuf is NULL \n");
}
@@ -409,7 +417,11 @@ int tcp_ack_handle(struct msg_buf *new_msgbuf,
atomic_read(&ack_m->max_drop_cnt)))) {
ack_info->drop_cnt = 0;
ack_info->in_send_msg = new_msgbuf;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete(&ack_info->timer);
#else
del_timer(&ack_info->timer);
#endif
} else {
ret = 1;
ack_info->msgbuf = new_msgbuf;
@@ -472,7 +484,11 @@ int tcp_ack_handle_new(struct msg_buf *new_msgbuf,
ack_info->drop_cnt = 0;
send_msg = new_msgbuf;
ack_info->in_send_msg = send_msg;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete(&ack_info->timer);
#else
del_timer(&ack_info->timer);
#endif
}else{
ret = 1;
ack_info->msgbuf = new_msgbuf;
+8
View File
@@ -2191,7 +2191,11 @@ static int rwnx_cfg80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wde
#if 0
if (rwnx_vif == rwnx_hw->p2p_dev_vif) {
if (timer_pending(&rwnx_hw->p2p_alive_timer)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&rwnx_hw->p2p_alive_timer);
#else
del_timer_sync(&rwnx_hw->p2p_alive_timer);
#endif
}
}
#endif
@@ -2440,7 +2444,11 @@ static void rwnx_cfgp2p_stop_p2p_device(struct wiphy *wiphy, struct wireless_dev
if (rwnx_vif == rwnx_hw->p2p_dev_vif) {
rwnx_hw->is_p2p_alive = 0;
if (timer_pending(&rwnx_hw->p2p_alive_timer)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
timer_delete_sync(&rwnx_hw->p2p_alive_timer);
#else
del_timer_sync(&rwnx_hw->p2p_alive_timer);
#endif
}
if (rwnx_vif->up) {
rwnx_send_remove_if(rwnx_hw, rwnx_vif->vif_index, true);
+12
View File
@@ -1428,7 +1428,11 @@ int reord_flush_tid(struct aicwf_rx_priv *rx_priv, struct sk_buff *skb, u8 tid)
preorder_ctrl->enable = false;
spin_unlock_irqrestore(&preorder_ctrl->reord_list_lock, flags);
if (timer_pending(&preorder_ctrl->reord_timer))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
ret = timer_delete_sync(&preorder_ctrl->reord_timer);
#else
ret = del_timer_sync(&preorder_ctrl->reord_timer);
#endif
cancel_work_sync(&preorder_ctrl->reord_timer_work);
return 0;
@@ -1454,7 +1458,11 @@ void reord_deinit_sta(struct aicwf_rx_priv* rx_priv, struct reord_ctrl_info *reo
if(preorder_ctrl->enable){
preorder_ctrl->enable = false;
if (timer_pending(&preorder_ctrl->reord_timer)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
ret = timer_delete_sync(&preorder_ctrl->reord_timer);
#else
ret = del_timer_sync(&preorder_ctrl->reord_timer);
#endif
}
cancel_work_sync(&preorder_ctrl->reord_timer_work);
}
@@ -1833,7 +1841,11 @@ int reord_process_unit(struct aicwf_rx_priv *rx_priv, struct sk_buff *skb, u16 s
}
} else {
if(timer_pending(&preorder_ctrl->reord_timer)) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
ret = timer_delete(&preorder_ctrl->reord_timer);
#else
ret = del_timer(&preorder_ctrl->reord_timer);
#endif
}
}