qcacmn: Add INI for memory limit used by Tx capture

User can specify a limit and frames are dropped when the memory
used by packets in the queues goes beyond the limit. This is a
SoC level param.

Change-Id: Id2bd9caaa11d9ea9f9e04c635ff629190bb62916
This commit is contained in:
Manoj Ekbote
2022-01-25 16:25:17 -08:00
committed by Madan Koyyalamudi
parent 3947f3f64f
commit 986121cc00
3 changed files with 63 additions and 3 deletions

View File

@@ -1949,6 +1949,20 @@ wlan_soc_vdev_hw_stats_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
}
#endif
#ifdef WLAN_TX_PKT_CAPTURE_ENH
static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
{
wlan_cfg_ctx->tx_capt_max_mem_allowed =
cfg_get(psoc, CFG_DP_TX_CAPT_MAX_MEM_MB) * 1024 * 1024;
}
#else
static void wlan_soc_tx_capt_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
{
}
#endif
/**
* wlan_cfg_soc_attach() - Allocate and prepare SoC configuration
* @psoc - Object manager psoc
@@ -2147,6 +2161,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
wlan_cfg_ctx->num_rxdma_dst_rings_per_pdev = NUM_RXDMA_RINGS_PER_PDEV;
wlan_cfg_ctx->num_rxdma_status_rings_per_pdev =
NUM_RXDMA_RINGS_PER_PDEV;
wlan_soc_tx_capt_cfg_attach(psoc, wlan_cfg_ctx);
return wlan_cfg_ctx;
}