mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-20 19:03:39 +00:00
61 lines
2.4 KiB
Diff
61 lines
2.4 KiB
Diff
From f68c3ef5e15c27d42eb3c7ad9f75ead7248e63e3 Mon Sep 17 00:00:00 2001
|
|
From: Hari Chandrakanthan <quic_haric@quicinc.com>
|
|
Date: Thu, 28 Sep 2023 15:28:21 +0530
|
|
Subject: [PATCH] wifi: ath12k: add module param to limit tx data frames
|
|
|
|
Add two new module params dp_group_tx_limit and dp_pdev_tx_limit to limit
|
|
the number of tx data frames in the driver.
|
|
|
|
Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
|
|
---
|
|
drivers/net/wireless/ath/ath12k/core.c | 8 ++++++++
|
|
drivers/net/wireless/ath/ath12k/core.h | 2 ++
|
|
drivers/net/wireless/ath/ath12k/mac.c | 4 ++--
|
|
3 files changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath12k/core.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/core.c
|
|
@@ -72,6 +72,14 @@ bool ath12k_debug_critical = false;
|
|
module_param_named(debug_critical, ath12k_debug_critical, bool, 0644);
|
|
MODULE_PARM_DESC(debug_critical, "Debug critical issue (0 - disable, 1 - enable)");
|
|
|
|
+unsigned int ath12k_dp_group_tx_limit = ATH12K_DP_GROUP_TX_LIMIT;
|
|
+module_param_named(dp_group_tx_limit, ath12k_dp_group_tx_limit, uint, 0444);
|
|
+MODULE_PARM_DESC(dp_group_tx_limit, "DP hw group tx limit");
|
|
+
|
|
+unsigned int ath12k_dp_pdev_tx_limit = ATH12K_DP_PDEV_TX_LIMIT;
|
|
+module_param_named(dp_pdev_tx_limit, ath12k_dp_pdev_tx_limit, uint, 0444);
|
|
+MODULE_PARM_DESC(dp_pdev_tx_limit, "DP pdev tx limit");
|
|
+
|
|
static DEFINE_MUTEX(ath12k_hw_lock);
|
|
static struct list_head ath12k_hw_groups = LIST_HEAD_INIT(ath12k_hw_groups);
|
|
|
|
--- a/drivers/net/wireless/ath/ath12k/core.h
|
|
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
|
@@ -50,6 +50,8 @@
|
|
|
|
extern unsigned int ath12k_frame_mode;
|
|
extern bool ath12k_debug_critical;
|
|
+extern unsigned int ath12k_dp_group_tx_limit;
|
|
+extern unsigned int ath12k_dp_pdev_tx_limit;
|
|
|
|
#define ATH12K_MON_TIMER_INTERVAL 10
|
|
#define ATH12K_RESET_TIMEOUT_HZ (180 * HZ)
|
|
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
|
@@ -9169,12 +9169,12 @@ bool ath12k_mac_tx_check_max_limit(struc
|
|
if (skb->protocol == cpu_to_be16(ETH_P_PAE))
|
|
return false;
|
|
|
|
- if (atomic_read(&ab->ag->num_dp_tx_pending) > ATH12K_DP_GROUP_TX_LIMIT) {
|
|
+ if (atomic_read(&ab->ag->num_dp_tx_pending) > ath12k_dp_group_tx_limit) {
|
|
ab->soc_stats.tx_err.group_threshold_limit++;
|
|
return true;
|
|
}
|
|
|
|
- if (atomic_read(&ar->dp.num_tx_pending) > ATH12K_DP_PDEV_TX_LIMIT) {
|
|
+ if (atomic_read(&ar->dp.num_tx_pending) > ath12k_dp_pdev_tx_limit) {
|
|
ar->ab->soc_stats.tx_err.pdev_threshold_limit++;
|
|
return true;
|
|
}
|