qcacmn: Restrict the tx descriptors for low mem config
For low mem config, use user configured max tx descriptors to limit the
allocation of software tx descriptors.
Use dp_txrx_pflow_update_pdev_params function to print stats and to update
pdev param.
Change-Id: I8fa6f0bb8841de68e8dc205ffcb0fde264f1b0e0
CRs-Fixed: 2414452
diff --git a/wlan_cfg/cfg_dp.h b/wlan_cfg/cfg_dp.h
index 315b32a..4e0198d 100644
--- a/wlan_cfg/cfg_dp.h
+++ b/wlan_cfg/cfg_dp.h
@@ -143,7 +143,7 @@
#define WLAN_CFG_TX_COMP_RING_SIZE_MAX 0x80000
#define WLAN_CFG_NUM_TX_DESC_MIN 1024
-#define WLAN_CFG_NUM_TX_DESC_MAX 0x320000
+#define WLAN_CFG_NUM_TX_DESC_MAX 32768
#define WLAN_CFG_NUM_TX_EXT_DESC_MIN 1024
#define WLAN_CFG_NUM_TX_EXT_DESC_MAX 0x80000
diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c
index 201d08e..c6c3d27 100644
--- a/wlan_cfg/wlan_cfg.c
+++ b/wlan_cfg/wlan_cfg.c
@@ -267,6 +267,7 @@
wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
CFG_DP_TX_EXT_DESC_POOLS);
wlan_cfg_ctx->num_tx_desc = cfg_get(psoc, CFG_DP_TX_DESC);
+ wlan_cfg_ctx->min_tx_desc = WLAN_CFG_NUM_TX_DESC_MIN;
wlan_cfg_ctx->num_tx_ext_desc = cfg_get(psoc, CFG_DP_TX_EXT_DESC);
wlan_cfg_ctx->htt_packet_type = cfg_get(psoc, CFG_DP_HTT_PACKET_TYPE);
wlan_cfg_ctx->max_peer_id = cfg_get(psoc, CFG_DP_MAX_PEER_ID);
@@ -684,6 +685,11 @@
cfg->num_tx_desc = num_desc;
}
+int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+ return cfg->min_tx_desc;
+}
+
int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->num_tx_ext_desc;
diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h
index 2d3a4ca..dc6ca70 100644
--- a/wlan_cfg/wlan_cfg.h
+++ b/wlan_cfg/wlan_cfg.h
@@ -96,6 +96,7 @@
* @num_tx_desc_pool: Number of Tx Descriptor pools
* @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools
* @num_tx_desc: Number of Tx Descriptors per pool
+ * @min_tx_desc: Minimum number of Tx Descriptors per pool
* @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool
* @max_peer_id: Maximum value of peer id that FW can assign for a client
* @htt_packet_type: Default 802.11 encapsulation type for any VAP created
@@ -149,6 +150,7 @@
int num_tx_desc_pool;
int num_tx_ext_desc_pool;
int num_tx_desc;
+ int min_tx_desc;
int num_tx_ext_desc;
int max_peer_id;
int htt_packet_type;
@@ -648,6 +650,14 @@
int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
/*
+ * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool
+ * @wlan_cfg_ctx - Configuration Handle
+ *
+ * Return: num_tx_desc
+ */
+int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
+
+/*
* wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool
*
* @wlan_cfg_ctx - Configuration Handle