mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 02:43:38 +00:00
This series is based on * 2020-07-10 ipq6018-ilq-11-0_qca_oem-034672b0676c37b1f4519e5720e18e95fe6236ef Add support for * qsdk kernel/v4.4 * qsdk ethernet subsystem * v5.7 ath11k backport + QualComm staging patches (wlan_ap_1.0) * ath11k-firmware * hostapd/iw/... Feature support * full boot, system detection * sysupgrade to nand * HE support via latest hostapd * driver support for usb, crypto, hwmon, cpufreq, ... Missing * NSS/HW flow offloading - FW blob is not redistributable Using the qsdk v4.4 is an intermediate solution while the vanilla is being tested. Vanilla kernel is almost on feature par. Work has already started to upstream the ethernet and switch drivers. Once complete the target will be fully upstream. Signed-off-by: John Crispin <john@phrozen.org>
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
--- a/drivers/net/wireless/ath/ath11k/dp.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/dp.c
|
|
@@ -881,6 +881,8 @@ int ath11k_dp_alloc(struct ath11k_base *
|
|
INIT_LIST_HEAD(&dp->reo_cmd_cache_flush_list);
|
|
spin_lock_init(&dp->reo_cmd_lock);
|
|
|
|
+ dp->reo_cmd_cache_flush_count = 0;
|
|
+
|
|
ret = ath11k_wbm_idle_ring_setup(ab, &n_link_desc);
|
|
if (ret) {
|
|
ath11k_warn(ab, "failed to setup wbm_idle_ring: %d\n", ret);
|
|
--- a/drivers/net/wireless/ath/ath11k/dp.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/dp.h
|
|
@@ -36,6 +36,7 @@ struct dp_rx_tid {
|
|
struct ath11k_base *ab;
|
|
};
|
|
|
|
+#define DP_REO_DESC_FREE_THRESHOLD 64
|
|
#define DP_REO_DESC_FREE_TIMEOUT_MS 1000
|
|
|
|
struct dp_reo_cache_flush_elem {
|
|
@@ -222,6 +223,7 @@ struct ath11k_dp {
|
|
struct hal_wbm_idle_scatter_list scatter_list[DP_IDLE_SCATTER_BUFS_MAX];
|
|
struct list_head reo_cmd_list;
|
|
struct list_head reo_cmd_cache_flush_list;
|
|
+ u32 reo_cmd_cache_flush_count;
|
|
/* protects access to reo_cmd_list and reo_cmd_cache_flush_list */
|
|
spinlock_t reo_cmd_lock;
|
|
};
|
|
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
|
|
@@ -579,6 +579,7 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
|
|
list_for_each_entry_safe(cmd_cache, tmp_cache,
|
|
&dp->reo_cmd_cache_flush_list, list) {
|
|
list_del(&cmd_cache->list);
|
|
+ dp->reo_cmd_cache_flush_count--;
|
|
dma_unmap_single(ab->dev, cmd_cache->data.paddr,
|
|
cmd_cache->data.size, DMA_BIDIRECTIONAL);
|
|
kfree(cmd_cache->data.vaddr);
|
|
@@ -665,15 +666,18 @@ static void ath11k_dp_rx_tid_del_func(st
|
|
|
|
spin_lock_bh(&dp->reo_cmd_lock);
|
|
list_add_tail(&elem->list, &dp->reo_cmd_cache_flush_list);
|
|
+ dp->reo_cmd_cache_flush_count++;
|
|
spin_unlock_bh(&dp->reo_cmd_lock);
|
|
|
|
/* Flush and invalidate aged REO desc from HW cache */
|
|
spin_lock_bh(&dp->reo_cmd_lock);
|
|
list_for_each_entry_safe(elem, tmp, &dp->reo_cmd_cache_flush_list,
|
|
list) {
|
|
- if (time_after(jiffies, elem->ts +
|
|
+ if (dp->reo_cmd_cache_flush_count > DP_REO_DESC_FREE_THRESHOLD ||
|
|
+ time_after(jiffies, elem->ts +
|
|
msecs_to_jiffies(DP_REO_DESC_FREE_TIMEOUT_MS))) {
|
|
list_del(&elem->list);
|
|
+ dp->reo_cmd_cache_flush_count--;
|
|
spin_unlock_bh(&dp->reo_cmd_lock);
|
|
|
|
ath11k_dp_reo_cache_flush(ab, &elem->data);
|