qcacmn: Add new set and get APIs to manage cfg items

Add new set and get APIs for cfg items so that
those cfg items can be managed from the external
components.

Change-Id: I52eb747fc6c544cfe43273c3b8b0fcc27b5a4a5f
CRs-Fixed: 3502582
このコミットが含まれているのは:
Karthik Kantamneni
2023-05-02 13:40:34 +05:30
committed by Rahul Choudhary
コミット 8487e8e057
3個のファイルの変更126行の追加1行の削除

ファイルの表示

@@ -4222,6 +4222,10 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
cfg_get(psoc, CFG_DP_RX_BUFF_POOL_ENABLE);
wlan_cfg_ctx->is_rx_refill_buff_pool_enabled =
cfg_get(psoc, CFG_DP_RX_REFILL_BUFF_POOL_ENABLE);
#ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
wlan_cfg_ctx->rx_refill_buff_pool_size =
DP_RX_REFILL_BUFF_POOL_SIZE;
#endif
wlan_cfg_ctx->rx_pending_high_threshold =
cfg_get(psoc, CFG_DP_RX_PENDING_HL_THRESHOLD);
wlan_cfg_ctx->rx_pending_low_threshold =
@@ -4678,6 +4682,12 @@ int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->tx_ring_size;
}
void wlan_cfg_set_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
int ring_size)
{
cfg->tx_ring_size = ring_size;
}
int wlan_cfg_time_control_bp(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->time_control_bp;
@@ -4688,6 +4698,12 @@ int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->tx_comp_ring_size;
}
void wlan_cfg_set_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
int ring_size)
{
cfg->tx_comp_ring_size = ring_size;
}
int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->per_pdev_rx_ring;
@@ -4837,6 +4853,12 @@ int wlan_cfg_get_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
return cfg->rx_dma_buf_ring_size;
}
void wlan_cfg_set_rx_dma_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg,
int ring_size)
{
cfg->rx_dma_buf_ring_size = ring_size;
}
int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg)
{
return cfg->num_mac_rings;
@@ -5036,6 +5058,13 @@ wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->rxdma_refill_ring;
}
void
wlan_cfg_set_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg,
int ring_size)
{
cfg->rxdma_refill_ring = ring_size;
}
bool
wlan_cfg_get_dp_soc_rxdma_refill_lt_disable(struct wlan_cfg_dp_soc_ctxt *cfg)
{
@@ -5098,6 +5127,13 @@ wlan_cfg_get_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->rx_sw_desc_num;
}
void
wlan_cfg_set_dp_soc_rx_sw_desc_num(struct wlan_cfg_dp_soc_ctxt *cfg,
int desc_num)
{
cfg->rx_sw_desc_num = desc_num;
}
uint32_t
wlan_cfg_get_reo_rings_mapping(struct wlan_cfg_dp_soc_ctxt *cfg)
{
@@ -5332,6 +5368,17 @@ bool wlan_cfg_is_rx_refill_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->is_rx_refill_buff_pool_enabled;
}
int wlan_cfg_get_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->rx_refill_buff_pool_size;
}
void
wlan_cfg_set_rx_refill_buf_pool_size(struct wlan_cfg_dp_soc_ctxt *cfg, int size)
{
cfg->rx_refill_buff_pool_size = size;
}
#else
bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
{