qcacmn: Create a wlan configuration table for ring types

1. Add config table to accommodate per ring type
   configuration to have a finer control over the
   ring.
2. Provide struct wlan_srng_cfg interface to add
   more parameters to control the ring.
3. Add interrupt threshold configuration parameters
   to wlan_srng_cfg structure.
4. Add WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING
   and WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING to have
   different timer values for REO and WBM ring.

Change-Id: Ied50e3241ab2cc181ca4ed7f126959cd5d9d2de5
CRs-Fixed: 2455297
这个提交包含在:
Venkata Sharath Chandra Manchala
2019-05-16 17:33:18 -07:00
提交者 nshrivas
父节点 95101bb281
当前提交 cb6d0c0741
修改 5 个文件,包含 227 行新增40 行删除

查看文件

@@ -27,6 +27,7 @@
#include <cdp_txrx_ops.h>
#include "wlan_cfg.h"
#include "cfg_ucfg_api.h"
#include "hal_api.h"
/*
* FIX THIS -
@@ -202,6 +203,82 @@ static const int reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS] = {
WLAN_CFG_REO_STATUS_RING_MASK_3};
#endif /*CONFIG_MCL*/
/**
* g_wlan_srng_cfg[] - Per ring_type specific configuration
*
*/
struct wlan_srng_cfg g_wlan_srng_cfg[MAX_RING_TYPES];
/* REO_DST ring configuration */
struct wlan_srng_cfg wlan_srng_reo_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING,
.batch_count_threshold = 0,
.low_threshold = 0,
};
/* WBM2SW_RELEASE ring configuration */
struct wlan_srng_cfg wlan_srng_wbm_release_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING,
.batch_count_threshold = 0,
.low_threshold = 0,
};
/* RXDMA_BUF ring configuration */
struct wlan_srng_cfg wlan_srng_rxdma_buf_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
.batch_count_threshold = 0,
.low_threshold = WLAN_CFG_RXDMA_REFILL_RING_SIZE >> 3,
};
/* RXDMA_MONITOR_BUF ring configuration */
struct wlan_srng_cfg wlan_srng_rxdma_monitor_buf_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
.batch_count_threshold = 0,
.low_threshold = WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE >> 3,
};
/* RXDMA_MONITOR_STATUS ring configuration */
struct wlan_srng_cfg wlan_srng_rxdma_monitor_status_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_RX,
.batch_count_threshold = 0,
.low_threshold = WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE >> 3,
};
/* DEFAULT_CONFIG ring configuration */
struct wlan_srng_cfg wlan_srng_default_cfg = {
.timer_threshold = WLAN_CFG_INT_TIMER_THRESHOLD_OTHER,
.batch_count_threshold = WLAN_CFG_INT_BATCH_THRESHOLD_OTHER,
.low_threshold = 0,
};
void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
{
g_wlan_srng_cfg[REO_DST] = wlan_srng_reo_cfg;
g_wlan_srng_cfg[WBM2SW_RELEASE] = wlan_srng_wbm_release_cfg;
g_wlan_srng_cfg[REO_EXCEPTION] = wlan_srng_default_cfg;
g_wlan_srng_cfg[REO_REINJECT] = wlan_srng_default_cfg;
g_wlan_srng_cfg[REO_CMD] = wlan_srng_default_cfg;
g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg;
g_wlan_srng_cfg[TCL_DATA] = wlan_srng_default_cfg;
g_wlan_srng_cfg[TCL_CMD] = wlan_srng_default_cfg;
g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg;
g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_srng_default_cfg;
g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_srng_default_cfg;
g_wlan_srng_cfg[RXDMA_BUF] = wlan_srng_rxdma_buf_cfg;
g_wlan_srng_cfg[RXDMA_DST] = wlan_srng_default_cfg;
g_wlan_srng_cfg[RXDMA_MONITOR_BUF] =
wlan_srng_rxdma_monitor_buf_cfg;
g_wlan_srng_cfg[RXDMA_MONITOR_STATUS] =
wlan_srng_rxdma_monitor_status_cfg;
g_wlan_srng_cfg[RXDMA_MONITOR_DST] = wlan_srng_default_cfg;
g_wlan_srng_cfg[RXDMA_MONITOR_DESC] = wlan_srng_default_cfg;
g_wlan_srng_cfg[DIR_BUF_RX_DMA_SRC] = wlan_srng_default_cfg;
#ifdef WLAN_FEATURE_CIF_CFR
g_wlan_srng_cfg[WIFI_POS_SRC] = wlan_srng_default_cfg;
#endif
*wlan_cfg = g_wlan_srng_cfg;
}
/**
* wlan_cfg_soc_attach() - Allocate and prepare SoC configuration
* @psoc - Object manager psoc
@@ -241,6 +318,7 @@ struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void *psoc)
wlan_cfg_ctx->tx_comp_ring_size_nss =
cfg_get(psoc, CFG_DP_NSS_COMP_RING_SIZE);
wlan_cfg_ctx->int_batch_threshold_tx =
cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_TX);
wlan_cfg_ctx->int_timer_threshold_tx =