diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 2311fa37de..cf01d4b464 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -15596,7 +15596,9 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle, qdf_atomic_init(&soc->num_tx_exception); soc->num_tx_allowed = wlan_cfg_get_dp_soc_tx_device_limit(soc->wlan_cfg_ctx); - soc->num_reg_tx_allowed = soc->num_tx_allowed - MAX_TX_SPL_DESC; + soc->num_tx_spl_allowed = + wlan_cfg_get_dp_soc_tx_spl_device_limit(soc->wlan_cfg_ctx); + soc->num_reg_tx_allowed = soc->num_tx_allowed - soc->num_tx_spl_allowed; if (soc->cdp_soc.ol_ops->get_dp_cfg_param) { int ret = soc->cdp_soc.ol_ops->get_dp_cfg_param(soc->ctrl_psoc, CDP_CFG_MAX_PEER_ID); diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index fa65c95408..62a16533e6 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -2481,6 +2481,8 @@ struct dp_soc { uint32_t num_tx_allowed; /* Num Regular Tx allowed */ uint32_t num_reg_tx_allowed; + /* Num Tx allowed for special frames*/ + uint32_t num_tx_spl_allowed; /* Preferred HW mode */ uint8_t preferred_hw_mode; diff --git a/wlan_cfg/cfg_dp.h b/wlan_cfg/cfg_dp.h index 9ba8a1c1bc..db9bd9e1b8 100644 --- a/wlan_cfg/cfg_dp.h +++ b/wlan_cfg/cfg_dp.h @@ -364,6 +364,10 @@ #define WLAN_CFG_TX_DEVICE_LIMIT_MIN 16384 #define WLAN_CFG_TX_DEVICE_LIMIT_MAX 65536 +#define WLAN_CFG_TX_SPL_DEVICE_LIMIT 1024 +#define WLAN_CFG_TX_SPL_DEVICE_LIMIT_MIN 0 +#define WLAN_CFG_TX_SPL_DEVICE_LIMIT_MAX 4096 + #define WLAN_CFG_TX_SW_INTERNODE_QUEUE 1024 #define WLAN_CFG_TX_SW_INTERNODE_QUEUE_MIN 128 #define WLAN_CFG_TX_SW_INTERNODE_QUEUE_MAX 1024 @@ -1176,6 +1180,13 @@ WLAN_CFG_TX_DEVICE_LIMIT, \ CFG_VALUE_OR_DEFAULT, "DP TX DEVICE limit") +#define CFG_DP_TX_SPL_DEVICE_LIMIT \ + CFG_INI_UINT("dp_tx_spl_device_limit", \ + WLAN_CFG_TX_SPL_DEVICE_LIMIT_MIN, \ + WLAN_CFG_TX_SPL_DEVICE_LIMIT_MAX, \ + WLAN_CFG_TX_SPL_DEVICE_LIMIT, \ + CFG_VALUE_OR_DEFAULT, "DP TX Special DEVICE limit") + #define CFG_DP_TX_SW_INTERNODE_QUEUE \ CFG_INI_UINT("dp_tx_sw_internode_queue", \ WLAN_CFG_TX_SW_INTERNODE_QUEUE_MIN, \ @@ -1864,6 +1875,7 @@ CFG(CFG_DP_TX_DESC_LIMIT_1) \ CFG(CFG_DP_TX_DESC_LIMIT_2) \ CFG(CFG_DP_TX_DEVICE_LIMIT) \ + CFG(CFG_DP_TX_SPL_DEVICE_LIMIT) \ CFG(CFG_DP_TX_SW_INTERNODE_QUEUE) \ CFG(CFG_DP_RXDMA_MONITOR_BUF_RING) \ CFG(CFG_DP_RXDMA_MONITOR_DST_RING) \ diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index bf4f2e23a3..b74022642c 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -2969,6 +2969,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc) CFG_DP_TX_DESC_LIMIT_2); wlan_cfg_ctx->tx_device_limit = cfg_get(psoc, CFG_DP_TX_DEVICE_LIMIT); + wlan_cfg_ctx->tx_spl_device_limit = cfg_get(psoc, + CFG_DP_TX_SPL_DEVICE_LIMIT); wlan_cfg_ctx->tx_sw_internode_queue = cfg_get(psoc, CFG_DP_TX_SW_INTERNODE_QUEUE); wlan_cfg_ctx->rxdma_err_dst_ring = cfg_get(psoc, @@ -3807,6 +3809,12 @@ wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg) return cfg->tx_device_limit; } +int +wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg) +{ + return cfg->tx_spl_device_limit; +} + int wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg) { diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index 96bfc3d7ec..35d7105616 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -250,6 +250,7 @@ struct wlan_srng_cfg { * @tx_desc_limit_1: tx_desc limit for 2 GHz * @tx_desc_limit_2: tx_desc limit for 5 GHz Low * @tx_device_limit: tx device limit + * @tx_spl_device_limit: tx device limit for special frames * @tx_sw_internode_queue: tx sw internode queue * @mon_drop_thresh: * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop @@ -428,6 +429,7 @@ struct wlan_cfg_dp_soc_ctxt { int tx_desc_limit_1; int tx_desc_limit_2; int tx_device_limit; + int tx_spl_device_limit; int tx_sw_internode_queue; int mon_drop_thresh; #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT @@ -1601,6 +1603,16 @@ wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg); int wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg); +/** + * wlan_cfg_get_dp_soc_tx_spl_device_limit - Get tx device limit for special + * frames + * @cfg: Configuration Handle + * + * Return: tx device limit for special frames + */ +int +wlan_cfg_get_dp_soc_tx_spl_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg); + /** * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue * @cfg: soc configuration context