mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
drivers_network: fix uwe5622 for kernel 6.15
- just a ton of hackfixes ref e4c416533f
This commit is contained in:
@@ -524,6 +524,9 @@ driver_uwe5622() {
|
||||
process_patch_file "${SRC}/patch/misc/wireless-uwe5622/uwe5622-fix-spanning-writes.patch" "applying"
|
||||
fi
|
||||
|
||||
if linux-version compare "${version}" ge 6.15; then
|
||||
process_patch_file "${SRC}/patch/misc/wireless-uwe5622/uwe5622-v6.15-timer-api-changes.patch" "applying"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
From 7f03df38a1f20c7107102fb9134762fc5e8fa14d Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Pardini <ricardo@pardini.net>
|
||||
Date: Fri, 23 May 2025 09:30:35 +0200
|
||||
Subject: [PATCH 1/2] uwe5622: fix build for 6.15 (timer api changes)
|
||||
|
||||
---
|
||||
.../wireless/uwe5622/unisocwifi/cfg80211.c | 8 ++++++++
|
||||
drivers/net/wireless/uwe5622/unisocwifi/qos.c | 8 ++++++++
|
||||
.../net/wireless/uwe5622/unisocwifi/reorder.c | 20 +++++++++++++++++++
|
||||
.../net/wireless/uwe5622/unisocwifi/tcp_ack.c | 16 +++++++++++++++
|
||||
4 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||
index 965db9b8cefd0..35e1317f13707 100755
|
||||
--- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
|
||||
@@ -1247,7 +1247,11 @@ void sprdwl_cancel_scan(struct sprdwl_vif *vif)
|
||||
|
||||
if (priv->scan_vif && priv->scan_vif == vif) {
|
||||
if (timer_pending(&priv->scan_timer))
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&priv->scan_timer);
|
||||
+ #else
|
||||
del_timer_sync(&priv->scan_timer);
|
||||
+ #endif
|
||||
|
||||
spin_lock_bh(&priv->scan_lock);
|
||||
|
||||
@@ -1307,7 +1311,11 @@ void sprdwl_scan_done(struct sprdwl_vif *vif, bool abort)
|
||||
|
||||
if (priv->scan_vif && priv->scan_vif == vif) {
|
||||
if (timer_pending(&priv->scan_timer))
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&priv->scan_timer);
|
||||
+ #else
|
||||
del_timer_sync(&priv->scan_timer);
|
||||
+ #endif
|
||||
|
||||
spin_lock_bh(&priv->scan_lock);
|
||||
if (priv->scan_request) {
|
||||
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/qos.c b/drivers/net/wireless/uwe5622/unisocwifi/qos.c
|
||||
index 7abcc0a02ee34..4dc12e5776481 100755
|
||||
--- a/drivers/net/wireless/uwe5622/unisocwifi/qos.c
|
||||
+++ b/drivers/net/wireless/uwe5622/unisocwifi/qos.c
|
||||
@@ -568,7 +568,11 @@ void reset_wmmac_parameters(struct sprdwl_priv *priv)
|
||||
g_wmmac_admittedtime[ac] = 0;
|
||||
}
|
||||
if (timer_pending(&priv->wmmac.wmmac_edcaf_timer))
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&priv->wmmac.wmmac_edcaf_timer);
|
||||
+ #else
|
||||
del_timer_sync(&priv->wmmac.wmmac_edcaf_timer);
|
||||
+ #endif
|
||||
|
||||
memset(&priv->wmmac.ac[0], 0, 4*sizeof(struct wmm_ac_params));
|
||||
}
|
||||
@@ -691,7 +695,11 @@ void update_admitted_time(struct sprdwl_priv *priv, u8 tsid, u16 medium_time, bo
|
||||
else {
|
||||
g_wmmac_admittedtime[ac] = 0;
|
||||
if (timer_pending(&priv->wmmac.wmmac_edcaf_timer))
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&priv->wmmac.wmmac_edcaf_timer);
|
||||
+ #else
|
||||
del_timer_sync(&priv->wmmac.wmmac_edcaf_timer);
|
||||
+ #endif
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/reorder.c b/drivers/net/wireless/uwe5622/unisocwifi/reorder.c
|
||||
index c6c77648dddef..98e74d0450bba 100644
|
||||
--- a/drivers/net/wireless/uwe5622/unisocwifi/reorder.c
|
||||
+++ b/drivers/net/wireless/uwe5622/unisocwifi/reorder.c
|
||||
@@ -108,7 +108,11 @@ static inline void mod_reorder_timer(struct rx_ba_node *ba_node)
|
||||
mod_timer(&ba_node->reorder_timer,
|
||||
jiffies + RX_BA_LOSS_RECOVERY_TIMEOUT);
|
||||
} else {
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete(&ba_node->reorder_timer);
|
||||
+ #else
|
||||
del_timer(&ba_node->reorder_timer);
|
||||
+ #endif
|
||||
ba_node->timeout_cnt = 0;
|
||||
}
|
||||
}
|
||||
@@ -436,7 +440,11 @@ static void reorder_msdu_process(struct sprdwl_rx_ba_entry *ba_entry,
|
||||
}
|
||||
} else if (unlikely(!ba_node_desc->buff_cnt)) {
|
||||
/* Should never happen */
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete(&ba_node->reorder_timer);
|
||||
+ #else
|
||||
del_timer(&ba_node->reorder_timer);
|
||||
+ #endif
|
||||
ba_node->timeout_cnt = 0;
|
||||
}
|
||||
} else {
|
||||
@@ -645,7 +653,11 @@ static void wlan_delba_event(struct sprdwl_rx_ba_entry *ba_entry,
|
||||
return;
|
||||
}
|
||||
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&ba_node->reorder_timer);
|
||||
+ #else
|
||||
del_timer_sync(&ba_node->reorder_timer);
|
||||
+ #endif
|
||||
spin_lock_bh(&ba_node->ba_node_lock);
|
||||
if (ba_node->active) {
|
||||
ba_node_desc = ba_node->rx_ba;
|
||||
@@ -876,7 +888,11 @@ void sprdwl_reorder_deinit(struct sprdwl_rx_ba_entry *ba_entry)
|
||||
continue;
|
||||
|
||||
hlist_for_each_entry_safe(ba_node, node, head, hlist) {
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&ba_node->reorder_timer);
|
||||
+ #else
|
||||
del_timer_sync(&ba_node->reorder_timer);
|
||||
+ #endif
|
||||
spin_lock_bh(&ba_node->ba_node_lock);
|
||||
ba_node->active = 0;
|
||||
flush_reorder_buffer(ba_node->rx_ba);
|
||||
@@ -983,7 +999,11 @@ void peer_entry_delba(void *hw_intf, unsigned char lut_index)
|
||||
if (ba_node) {
|
||||
wl_info("%s: del ba lut_index: %d, tid %d\n",
|
||||
__func__, lut_index, tid);
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
|
||||
+ timer_delete_sync(&ba_node->reorder_timer);
|
||||
+ #else
|
||||
del_timer_sync(&ba_node->reorder_timer);
|
||||
+ #endif
|
||||
spin_lock_bh(&ba_node->ba_node_lock);
|
||||
if (ba_node->active) {
|
||||
ba_node_desc = ba_node->rx_ba;
|
||||
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c b/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c
|
||||
index 4db766fbac3b4..4abfa9d04e1b9 100644
|
||||
--- a/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c
|
||||
+++ b/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c
|
||||
@@ -84,7 +84,11 @@ void sprdwl_tcp_ack_deinit(struct sprdwl_priv *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);
|
||||
@@ -342,7 +346,11 @@ int sprdwl_tcp_ack_handle(struct sprdwl_msg_buf *new_msgbuf,
|
||||
if (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
|
||||
}
|
||||
|
||||
ack_info->in_send_msg = NULL;
|
||||
@@ -374,7 +382,11 @@ int sprdwl_tcp_ack_handle(struct sprdwl_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;
|
||||
@@ -537,7 +549,11 @@ void enable_tcp_ack_delay(char *buf, unsigned char offset)
|
||||
write_seqlock_bh(&ack_m->ack_info[i].seqlock);
|
||||
drop_msg = ack_m->ack_info[i].msgbuf;
|
||||
ack_m->ack_info[i].msgbuf = NULL;
|
||||
+ #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
|
||||
write_sequnlock_bh(&ack_m->ack_info[i].seqlock);
|
||||
|
||||
if (drop_msg)
|
||||
--
|
||||
2.49.0
|
||||
|
||||
Reference in New Issue
Block a user