qcacmn: initialize PPE rings
Changes to initialize PPE rings based on ini configuration Change-Id: Id6a26b557c45fd78ae17675b0292424e979958ad
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d5006a849b
commit
0702aaf463
@@ -16,6 +16,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <wlan_utility.h>
|
||||
#include <dp_internal.h>
|
||||
#include <dp_htt.h>
|
||||
#include "dp_be.h"
|
||||
@@ -714,6 +715,183 @@ dp_init_near_full_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
static void dp_soc_ppe_srng_deinit(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
|
||||
return;
|
||||
|
||||
dp_srng_deinit(soc, &be_soc->ppe_release_ring, PPE_RELEASE, 0);
|
||||
wlan_minidump_remove(be_soc->ppe_release_ring.base_vaddr_unaligned,
|
||||
be_soc->ppe_release_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_PPE_RELEASE,
|
||||
"ppe_release_ring");
|
||||
|
||||
dp_srng_deinit(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0);
|
||||
wlan_minidump_remove(be_soc->ppe2tcl_ring.base_vaddr_unaligned,
|
||||
be_soc->ppe2tcl_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_PPE2TCL,
|
||||
"ppe2tcl_ring");
|
||||
|
||||
dp_srng_deinit(soc, &be_soc->reo2ppe_ring, REO2PPE, 0);
|
||||
wlan_minidump_remove(be_soc->reo2ppe_ring.base_vaddr_unaligned,
|
||||
be_soc->reo2ppe_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO2PPE,
|
||||
"reo2ppe_ring");
|
||||
}
|
||||
|
||||
static void dp_soc_ppe_srng_free(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
|
||||
return;
|
||||
|
||||
dp_srng_free(soc, &be_soc->ppe_release_ring);
|
||||
|
||||
dp_srng_free(soc, &be_soc->ppe2tcl_ring);
|
||||
|
||||
dp_srng_free(soc, &be_soc->reo2ppe_ring);
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_ppe_srng_alloc(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
uint32_t entries;
|
||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
entries = wlan_cfg_get_dp_soc_reo2ppe_ring_size(soc_cfg_ctx);
|
||||
|
||||
if (dp_srng_alloc(soc, &be_soc->reo2ppe_ring, REO2PPE,
|
||||
entries, 0)) {
|
||||
dp_err("%pK: dp_srng_alloc failed for reo2ppe", soc);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
entries = wlan_cfg_get_dp_soc_ppe2tcl_ring_size(soc_cfg_ctx);
|
||||
if (dp_srng_alloc(soc, &be_soc->ppe2tcl_ring, PPE2TCL,
|
||||
entries, 0)) {
|
||||
dp_err("%pK: dp_srng_alloc failed for ppe2tcl_ring", soc);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
entries = wlan_cfg_get_dp_soc_ppe_release_ring_size(soc_cfg_ctx);
|
||||
if (dp_srng_alloc(soc, &be_soc->ppe_release_ring, PPE_RELEASE,
|
||||
entries, 0)) {
|
||||
dp_err("%pK: dp_srng_alloc failed for ppe_release_ring", soc);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
fail:
|
||||
dp_soc_ppe_srng_free(soc);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
|
||||
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
|
||||
|
||||
soc_cfg_ctx = soc->wlan_cfg_ctx;
|
||||
|
||||
if (!wlan_cfg_get_dp_soc_is_ppe_enabled(soc_cfg_ctx))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (dp_srng_init(soc, &be_soc->reo2ppe_ring, REO2PPE, 0, 0)) {
|
||||
dp_err("%pK: dp_srng_init failed for reo2ppe", soc);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
wlan_minidump_log(be_soc->reo2ppe_ring.base_vaddr_unaligned,
|
||||
be_soc->reo2ppe_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_REO2PPE,
|
||||
"reo2ppe_ring");
|
||||
|
||||
if (dp_srng_init(soc, &be_soc->ppe2tcl_ring, PPE2TCL, 0, 0)) {
|
||||
dp_err("%pK: dp_srng_init failed for ppe2tcl_ring", soc);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
wlan_minidump_log(be_soc->ppe2tcl_ring.base_vaddr_unaligned,
|
||||
be_soc->ppe2tcl_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_PPE2TCL,
|
||||
"ppe2tcl_ring");
|
||||
|
||||
if (dp_srng_init(soc, &be_soc->ppe_release_ring, PPE_RELEASE, 0, 0)) {
|
||||
dp_err("%pK: dp_srng_init failed for ppe_release_ring", soc);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
wlan_minidump_log(be_soc->ppe_release_ring.base_vaddr_unaligned,
|
||||
be_soc->ppe_release_ring.alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
WLAN_MD_DP_SRNG_PPE_RELEASE,
|
||||
"ppe_release_ring");
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
fail:
|
||||
dp_soc_ppe_srng_deinit(soc);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
#else
|
||||
static void dp_soc_ppe_srng_deinit(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
|
||||
static void dp_soc_ppe_srng_free(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_ppe_srng_alloc(struct dp_soc *soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_ppe_srng_init(struct dp_soc *soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void dp_soc_srng_deinit_be(struct dp_soc *soc)
|
||||
{
|
||||
dp_soc_ppe_srng_deinit(soc);
|
||||
}
|
||||
|
||||
static void dp_soc_srng_free_be(struct dp_soc *soc)
|
||||
{
|
||||
dp_soc_ppe_srng_free(soc);
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_srng_alloc_be(struct dp_soc *soc)
|
||||
{
|
||||
return dp_soc_ppe_srng_alloc(soc);
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_srng_init_be(struct dp_soc *soc)
|
||||
{
|
||||
return dp_soc_ppe_srng_init(soc);
|
||||
}
|
||||
|
||||
void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
{
|
||||
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
||||
@@ -736,6 +914,10 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
arch_ops->txrx_soc_detach = dp_soc_detach_be;
|
||||
arch_ops->txrx_soc_init = dp_soc_init_be;
|
||||
arch_ops->txrx_soc_deinit = dp_soc_deinit_be;
|
||||
arch_ops->txrx_soc_srng_alloc = dp_soc_srng_alloc_be;
|
||||
arch_ops->txrx_soc_srng_init = dp_soc_srng_init_be;
|
||||
arch_ops->txrx_soc_srng_deinit = dp_soc_srng_deinit_be;
|
||||
arch_ops->txrx_soc_srng_free = dp_soc_srng_free_be;
|
||||
arch_ops->txrx_pdev_attach = dp_pdev_attach_be;
|
||||
arch_ops->txrx_pdev_detach = dp_pdev_detach_be;
|
||||
arch_ops->txrx_vdev_attach = dp_vdev_attach_be;
|
||||
|
@@ -153,6 +153,11 @@ struct dp_soc_be {
|
||||
struct dp_hw_cookie_conversion_t hw_cc_ctx;
|
||||
struct dp_spt_page_desc_list tx_spt_page_desc[MAX_TXDESC_POOLS];
|
||||
struct dp_spt_page_desc_list rx_spt_page_desc[MAX_RXDESC_POOLS];
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
struct dp_srng reo2ppe_ring;
|
||||
struct dp_srng ppe2tcl_ring;
|
||||
struct dp_srng ppe_release_ring;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* convert struct dp_soc_be pointer to struct dp_soc pointer */
|
||||
|
@@ -4291,6 +4291,7 @@ static QDF_STATUS dp_init_tx_ring_pair_by_index(struct dp_soc *soc,
|
||||
dp_err("dp_srng_init failed for tx_comp_ring");
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
wlan_minidump_log(soc->tx_comp_ring[index].base_vaddr_unaligned,
|
||||
soc->tx_comp_ring[index].alloc_size,
|
||||
soc->ctrl_psoc,
|
||||
@@ -12496,6 +12497,10 @@ fail1:
|
||||
static void dp_soc_srng_deinit(struct dp_soc *soc)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
if (soc->arch_ops.txrx_soc_srng_deinit)
|
||||
soc->arch_ops.txrx_soc_srng_deinit(soc);
|
||||
|
||||
/* Free the ring memories */
|
||||
/* Common rings */
|
||||
wlan_minidump_remove(soc->wbm_desc_rel_ring.base_vaddr_unaligned,
|
||||
@@ -12712,6 +12717,14 @@ static QDF_STATUS dp_soc_srng_init(struct dp_soc *soc)
|
||||
"reo_dest_ring");
|
||||
}
|
||||
|
||||
if (soc->arch_ops.txrx_soc_srng_init) {
|
||||
if (soc->arch_ops.txrx_soc_srng_init(soc)) {
|
||||
dp_init_err("%pK: dp_srng_init failed for arch rings",
|
||||
soc);
|
||||
goto fail1;
|
||||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
fail1:
|
||||
/*
|
||||
@@ -12731,6 +12744,9 @@ static void dp_soc_srng_free(struct dp_soc *soc)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
if (soc->arch_ops.txrx_soc_srng_free)
|
||||
soc->arch_ops.txrx_soc_srng_free(soc);
|
||||
|
||||
dp_srng_free(soc, &soc->wbm_desc_rel_ring);
|
||||
|
||||
for (i = 0; i < soc->num_tcl_data_rings; i++)
|
||||
@@ -12855,6 +12871,14 @@ static QDF_STATUS dp_soc_srng_alloc(struct dp_soc *soc)
|
||||
}
|
||||
}
|
||||
|
||||
if (soc->arch_ops.txrx_soc_srng_alloc) {
|
||||
if (soc->arch_ops.txrx_soc_srng_alloc(soc)) {
|
||||
dp_init_err("%pK: dp_srng_alloc failed for arch rings",
|
||||
soc);
|
||||
goto fail1;
|
||||
}
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
fail1:
|
||||
|
@@ -1562,6 +1562,10 @@ struct dp_arch_ops {
|
||||
QDF_STATUS (*txrx_soc_detach)(struct dp_soc *soc);
|
||||
QDF_STATUS (*txrx_soc_init)(struct dp_soc *soc);
|
||||
QDF_STATUS (*txrx_soc_deinit)(struct dp_soc *soc);
|
||||
QDF_STATUS (*txrx_soc_srng_alloc)(struct dp_soc *soc);
|
||||
QDF_STATUS (*txrx_soc_srng_init)(struct dp_soc *soc);
|
||||
void (*txrx_soc_srng_deinit)(struct dp_soc *soc);
|
||||
void (*txrx_soc_srng_free)(struct dp_soc *soc);
|
||||
QDF_STATUS (*txrx_pdev_attach)(struct dp_pdev *pdev);
|
||||
QDF_STATUS (*txrx_pdev_detach)(struct dp_pdev *pdev);
|
||||
QDF_STATUS (*txrx_vdev_attach)(struct dp_soc *soc,
|
||||
@@ -3385,5 +3389,4 @@ void dp_srng_deinit(struct dp_soc *soc, struct dp_srng *srng,
|
||||
enum timer_yield_status
|
||||
dp_should_timer_irq_yield(struct dp_soc *soc, uint32_t work_done,
|
||||
uint64_t start_time);
|
||||
|
||||
#endif /* _DP_TYPES_H_ */
|
||||
|
@@ -273,6 +273,24 @@ dp_rxdma_ring_sel_cfg_li(struct dp_soc *soc)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void dp_soc_srng_deinit_li(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
|
||||
static void dp_soc_srng_free_li(struct dp_soc *soc)
|
||||
{
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_srng_alloc_li(struct dp_soc *soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS dp_soc_srng_init_li(struct dp_soc *soc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops)
|
||||
{
|
||||
#ifndef QCA_HOST_MODE_WIFI_DISABLED
|
||||
@@ -295,13 +313,16 @@ void dp_initialize_arch_ops_li(struct dp_arch_ops *arch_ops)
|
||||
arch_ops->txrx_soc_detach = dp_soc_detach_li;
|
||||
arch_ops->txrx_soc_init = dp_soc_init_li;
|
||||
arch_ops->txrx_soc_deinit = dp_soc_deinit_li;
|
||||
arch_ops->txrx_soc_srng_alloc = dp_soc_srng_alloc_li;
|
||||
arch_ops->txrx_soc_srng_init = dp_soc_srng_init_li;
|
||||
arch_ops->txrx_soc_srng_deinit = dp_soc_srng_deinit_li;
|
||||
arch_ops->txrx_soc_srng_free = dp_soc_srng_free_li;
|
||||
arch_ops->txrx_pdev_attach = dp_pdev_attach_li;
|
||||
arch_ops->txrx_pdev_detach = dp_pdev_detach_li;
|
||||
arch_ops->txrx_vdev_attach = dp_vdev_attach_li;
|
||||
arch_ops->txrx_vdev_detach = dp_vdev_detach_li;
|
||||
arch_ops->dp_rx_desc_cookie_2_va =
|
||||
dp_rx_desc_cookie_2_va_li;
|
||||
|
||||
arch_ops->dp_rxdma_ring_sel_cfg = dp_rxdma_ring_sel_cfg_li;
|
||||
arch_ops->soc_cfg_attach = dp_soc_cfg_attach_li;
|
||||
}
|
||||
|
@@ -309,6 +309,7 @@ enum hal_ring_type {
|
||||
#ifdef WLAN_FEATURE_CIF_CFR
|
||||
WIFI_POS_SRC,
|
||||
#endif
|
||||
REO2PPE,
|
||||
PPE2TCL,
|
||||
PPE_RELEASE,
|
||||
TX_MONITOR_BUF,
|
||||
|
@@ -1857,6 +1857,26 @@ struct hal_hw_srng_config hw_srng_table_9224[] = {
|
||||
.max_size = HAL_RXDMA_MAX_RING_SIZE_BE,
|
||||
},
|
||||
#endif
|
||||
{ /* REO2PPE */
|
||||
.start_ring_id = HAL_SRNG_REO2PPE,
|
||||
.max_rings = 1,
|
||||
.entry_size = sizeof(struct reo_destination_ring) >> 2,
|
||||
.lmac_ring = FALSE,
|
||||
.ring_dir = HAL_SRNG_DST_RING,
|
||||
.reg_start = {
|
||||
HWIO_REO_R0_REO2PPE_RING_BASE_LSB_ADDR(
|
||||
REO_REG_REG_BASE),
|
||||
HWIO_REO_R2_REO2PPE_RING_HP_ADDR(
|
||||
REO_REG_REG_BASE),
|
||||
},
|
||||
/* Single ring - provide ring size if multiple rings of this
|
||||
* type are supported
|
||||
*/
|
||||
.reg_size = {},
|
||||
.max_size =
|
||||
HWIO_REO_R0_REO2PPE_RING_BASE_LSB_RING_BASE_ADDR_LSB_BMSK >>
|
||||
HWIO_REO_R0_REO2PPE_RING_BASE_LSB_RING_BASE_ADDR_LSB_SHFT,
|
||||
},
|
||||
{ /* PPE2TCL */
|
||||
.start_ring_id = HAL_SRNG_PPE2TCL1,
|
||||
.max_rings = 1,
|
||||
@@ -1941,30 +1961,6 @@ struct hal_hw_srng_config hw_srng_table_9224[] = {
|
||||
.reg_size = {},
|
||||
.max_size = HAL_RXDMA_MAX_RING_SIZE_BE,
|
||||
},
|
||||
/* TODO: Enable this ring once it is part of HW hdr file */
|
||||
#ifdef REO2PPE_UNDEFINED
|
||||
{ /* REO2PPE */
|
||||
.start_ring_id = HAL_SRNG_REO2PPE,
|
||||
.max_rings = 1,
|
||||
.entry_size = sizeof(struct reo_destination_ring) >> 2,
|
||||
.lmac_ring = FALSE,
|
||||
.ring_dir = HAL_SRNG_DST_RING,
|
||||
.reg_start = {
|
||||
HWIO_REO_R0_REO2PPE_RING_BASE_LSB_ADDR(
|
||||
REO_REG_REG_BASE),
|
||||
HWIO_REO_R0_REO2PPE_RING_HP_ADDR(
|
||||
REO_REG_REG_BASE),
|
||||
},
|
||||
/* Single ring - provide ring size if multiple rings of this
|
||||
* type are supported
|
||||
*/
|
||||
.reg_size = {},
|
||||
.max_size =
|
||||
HWIO_REO_R0_REO2PPE_RING_BASE_LSB_RING_BASE_ADDR_LSB_BMSK >>
|
||||
HWIO_REO_R0_REO2PPE_RING_BASE_LSB_RING_BASE_ADDR_LSB_SHFT,
|
||||
},
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -422,6 +422,9 @@ uint16_t wlan_util_get_peer_count_for_mode(struct wlan_objmgr_pdev *pdev,
|
||||
* @WLAN_MD_OBJMGR_VDEV - wlan_objmgr_vdev
|
||||
* @WLAN_MD_OBJMGR_VDEV_MLME -vdev mlme
|
||||
* @WLAN_MD_OBJMGR_VDEV_SM - wlan_sm
|
||||
* @WLAN_MD_DP_SRNG_REO2PPE- dp_srng type PPE rx ring
|
||||
* @WLAN_MD_DP_SRNG_PPE2TCL - dp_srng type for PPE tx ring
|
||||
* @WLAN_MD_DP_SRNG_PPE_RELEASE - dp_srng type for PPE tx com ring
|
||||
* @WLAN_MD_MAX - Max value
|
||||
*/
|
||||
enum wlan_minidump_host_data {
|
||||
@@ -459,6 +462,9 @@ enum wlan_minidump_host_data {
|
||||
WLAN_MD_OBJMGR_VDEV,
|
||||
WLAN_MD_OBJMGR_VDEV_MLME,
|
||||
WLAN_MD_OBJMGR_VDEV_SM,
|
||||
WLAN_MD_DP_SRNG_REO2PPE,
|
||||
WLAN_MD_DP_SRNG_PPE2TCL,
|
||||
WLAN_MD_DP_SRNG_PPE_RELEASE,
|
||||
WLAN_MD_MAX
|
||||
};
|
||||
|
||||
|
@@ -405,6 +405,18 @@
|
||||
#define WLAN_CFG_RADIO_DEFAULT_REO_MIN 0x1
|
||||
#define WLAN_CFG_RADIO_DEFAULT_REO_MAX 0x4
|
||||
|
||||
#define WLAN_CFG_REO2PPE_RING_SIZE 1024
|
||||
#define WLAN_CFG_REO2PPE_RING_SIZE_MIN 64
|
||||
#define WLAN_CFG_REO2PPE_RING_SIZE_MAX 1024
|
||||
|
||||
#define WLAN_CFG_PPE2TCL_RING_SIZE 1024
|
||||
#define WLAN_CFG_PPE2TCL_RING_SIZE_MIN 64
|
||||
#define WLAN_CFG_PPE2TCL_RING_SIZE_MAX 1024
|
||||
|
||||
#define WLAN_CFG_PPE_RELEASE_RING_SIZE 1024
|
||||
#define WLAN_CFG_PPE_RELEASE_RING_SIZE_MIN 64
|
||||
#define WLAN_CFG_PPE_RELEASE_RING_SIZE_MAX 1024
|
||||
|
||||
/* DP INI Declerations */
|
||||
#define CFG_DP_HTT_PACKET_TYPE \
|
||||
CFG_INI_UINT("dp_htt_packet_type", \
|
||||
@@ -1206,6 +1218,41 @@
|
||||
#define CFG_DP_IPA_TX_RING_CFG
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
#define CFG_DP_PPE_ENABLE \
|
||||
CFG_INI_BOOL("ppe_enable", false, \
|
||||
"DP ppe enable flag")
|
||||
|
||||
#define CFG_DP_REO2PPE_RING \
|
||||
CFG_INI_UINT("dp_reo2ppe_ring", \
|
||||
WLAN_CFG_REO2PPE_RING_SIZE_MIN, \
|
||||
WLAN_CFG_REO2PPE_RING_SIZE_MAX, \
|
||||
WLAN_CFG_REO2PPE_RING_SIZE, \
|
||||
CFG_VALUE_OR_DEFAULT, "DP REO2PPE ring")
|
||||
|
||||
#define CFG_DP_PPE2TCL_RING \
|
||||
CFG_INI_UINT("dp_ppe2tcl_ring", \
|
||||
WLAN_CFG_PPE2TCL_RING_SIZE_MIN, \
|
||||
WLAN_CFG_PPE2TCL_RING_SIZE_MAX, \
|
||||
WLAN_CFG_PPE2TCL_RING_SIZE, \
|
||||
CFG_VALUE_OR_DEFAULT, "DP PPE2TCL rings")
|
||||
|
||||
#define CFG_DP_PPE_RELEASE_RING \
|
||||
CFG_INI_UINT("dp_ppe_release_ring", \
|
||||
WLAN_CFG_PPE_RELEASE_RING_SIZE_MIN, \
|
||||
WLAN_CFG_PPE_RELEASE_RING_SIZE_MAX, \
|
||||
WLAN_CFG_PPE_RELEASE_RING_SIZE, \
|
||||
CFG_VALUE_OR_DEFAULT, "DP PPE Release Ring")
|
||||
|
||||
#define CFG_DP_PPE_CONFIG \
|
||||
CFG(CFG_DP_PPE_ENABLE) \
|
||||
CFG(CFG_DP_REO2PPE_RING) \
|
||||
CFG(CFG_DP_PPE2TCL_RING) \
|
||||
CFG(CFG_DP_PPE_RELEASE_RING)
|
||||
#else
|
||||
#define CFG_DP_PPE_CONFIG
|
||||
#endif
|
||||
|
||||
#define CFG_DP \
|
||||
CFG(CFG_DP_HTT_PACKET_TYPE) \
|
||||
CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
|
||||
@@ -1302,5 +1349,6 @@
|
||||
CFG(CFG_DP_HW_CC_ENABLE) \
|
||||
CFG(CFG_FORCE_RX_64_BA) \
|
||||
CFG(CFG_DP_DELAY_MON_REPLENISH) \
|
||||
CFG_DP_IPA_TX_RING_CFG
|
||||
CFG_DP_IPA_TX_RING_CFG \
|
||||
CFG_DP_PPE_CONFIG
|
||||
#endif /* _CFG_DP_H_ */
|
||||
|
@@ -1027,6 +1027,33 @@ wlan_soc_hw_cc_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
/**
|
||||
* wlan_soc_ppe_cfg_attach() - Update ppe config in dp soc
|
||||
* cfg context
|
||||
* @psoc - Object manager psoc
|
||||
* @wlan_cfg_ctx - dp soc cfg ctx
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void
|
||||
wlan_soc_ppe_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
|
||||
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
|
||||
{
|
||||
wlan_cfg_ctx->ppe_enable = cfg_get(psoc, CFG_DP_PPE_ENABLE);
|
||||
wlan_cfg_ctx->reo2ppe_ring = cfg_get(psoc, CFG_DP_REO2PPE_RING);
|
||||
wlan_cfg_ctx->ppe2tcl_ring = cfg_get(psoc, CFG_DP_PPE2TCL_RING);
|
||||
wlan_cfg_ctx->ppe_release_ring = cfg_get(psoc,
|
||||
CFG_DP_PPE_RELEASE_RING);
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
wlan_soc_ppe_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
|
||||
@@ -1205,6 +1232,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||
CFG_DP_DELAY_MON_REPLENISH);
|
||||
wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
|
||||
wlan_soc_hw_cc_cfg_attach(psoc, wlan_cfg_ctx);
|
||||
wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
|
||||
|
||||
return wlan_cfg_ctx;
|
||||
}
|
||||
@@ -2172,3 +2200,29 @@ uint32_t wlan_cfg_ipa_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
return cfg->ipa_tx_comp_ring_size;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
bool
|
||||
wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return cfg->ppe_enable;
|
||||
}
|
||||
|
||||
int
|
||||
wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return cfg->reo2ppe_ring;
|
||||
}
|
||||
|
||||
int
|
||||
wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return cfg->ppe2tcl_ring;
|
||||
}
|
||||
|
||||
int
|
||||
wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return cfg->ppe_release_ring;
|
||||
}
|
||||
#endif
|
||||
|
@@ -354,6 +354,12 @@ struct wlan_cfg_dp_soc_ctxt {
|
||||
#endif
|
||||
bool hw_cc_enabled;
|
||||
struct wlan_cfg_tcl_wbm_ring_num_map *tcl_wbm_map_array;
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
bool ppe_enable;
|
||||
int reo2ppe_ring;
|
||||
int ppe2tcl_ring;
|
||||
int ppe_release_ring;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1739,4 +1745,42 @@ wlan_cfg_set_delay_mon_replenish(struct wlan_cfg_dp_soc_ctxt *cfg, bool val);
|
||||
* Return:
|
||||
*/
|
||||
void wlan_cfg_dp_soc_ctx_dump(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
/*
|
||||
* wlan_cfg_get_dp_soc_is_ppe_enabled() - API to get ppe enable flag
|
||||
* @wlan_cfg_ctx - Configuration Handle
|
||||
*
|
||||
* Return: true if ppe is enabled else return false
|
||||
*/
|
||||
bool
|
||||
wlan_cfg_get_dp_soc_is_ppe_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
/*
|
||||
* wlan_cfg_get_dp_soc_reo2ppe_ring_size() - get ppe rx ring size
|
||||
* @wlan_cfg_ctx - Configuration Handle
|
||||
*
|
||||
* Return: size of reo2ppe ring
|
||||
*/
|
||||
int
|
||||
wlan_cfg_get_dp_soc_reo2ppe_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
/*
|
||||
* wlan_cfg_get_dp_soc_ppe2tcl_ring_size() - get ppe tx ring size
|
||||
* @wlan_cfg_ctx - Configuration Handle
|
||||
*
|
||||
* Return: size of ppe2tcl ring
|
||||
*/
|
||||
int
|
||||
wlan_cfg_get_dp_soc_ppe2tcl_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
/*
|
||||
* wlan_cfg_get_dp_soc_ppe_release_ring_size() - get ppe tx comp ring size
|
||||
* @wlan_cfg_ctx - Configuration Handle
|
||||
*
|
||||
* Return: size of ppe release ring
|
||||
*/
|
||||
int
|
||||
wlan_cfg_get_dp_soc_ppe_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user