qcacmn: Allocate and Initialize monitor rings

Allocate tx/rx monitor destination rings for waikiki

CRs-Fixed: 3010845
Change-Id: I1c6950188e2693cab648679d34d6731db53978f9
This commit is contained in:
Naga
2021-10-05 00:16:43 +05:30
committed by Madan Koyyalamudi
parent e1a6f926ed
commit df329ebb84
10 changed files with 221 additions and 45 deletions

View File

@@ -4981,7 +4981,7 @@ dp_print_pdev_cfg_params(struct dp_pdev *pdev)
DP_PRINT_STATS("DMA Mon buf ring size: %d ", DP_PRINT_STATS("DMA Mon buf ring size: %d ",
pdev_cfg_ctx->dma_mon_buf_ring_size); pdev_cfg_ctx->dma_mon_buf_ring_size);
DP_PRINT_STATS("DMA Mon dest ring size: %d ", DP_PRINT_STATS("DMA Mon dest ring size: %d ",
pdev_cfg_ctx->dma_mon_dest_ring_size); pdev_cfg_ctx->dma_rx_mon_dest_ring_size);
DP_PRINT_STATS("DMA Mon status ring size: %d ", DP_PRINT_STATS("DMA Mon status ring size: %d ",
pdev_cfg_ctx->dma_mon_status_ring_size); pdev_cfg_ctx->dma_mon_status_ring_size);
DP_PRINT_STATS("Rxdma monitor desc ring: %d", DP_PRINT_STATS("Rxdma monitor desc ring: %d",

View File

@@ -197,8 +197,9 @@ void dp_mon_rings_free_1_0(struct dp_pdev *pdev)
} }
static static
QDF_STATUS dp_mon_rings_init_1_0(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_mon_rings_init_1_0(struct dp_pdev *pdev)
{ {
struct dp_soc *soc = pdev->soc;
int mac_id = 0; int mac_id = 0;
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx; struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
@@ -226,8 +227,9 @@ fail1:
} }
static static
QDF_STATUS dp_mon_rings_alloc_1_0(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_mon_rings_alloc_1_0(struct dp_pdev *pdev)
{ {
struct dp_soc *soc = pdev->soc;
int mac_id = 0; int mac_id = 0;
int entries; int entries;
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx; struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
@@ -255,24 +257,24 @@ fail1:
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
} }
#else #else
static static inline
void dp_mon_rings_deinit_1_0(struct dp_pdev *pdev) void dp_mon_rings_deinit_1_0(struct dp_pdev *pdev)
{ {
} }
static static inline
void dp_mon_rings_free_1_0(struct dp_pdev *pdev) void dp_mon_rings_free_1_0(struct dp_pdev *pdev)
{ {
} }
static static inline
QDF_STATUS dp_mon_rings_init_1_0(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_mon_rings_init_1_0(struct dp_pdev *pdev)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
static static inline
QDF_STATUS dp_mon_rings_alloc_1_0(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_mon_rings_alloc_1_0(struct dp_pdev *pdev)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

View File

@@ -2233,7 +2233,7 @@ QDF_STATUS dp_mon_dest_rings_alloc(struct dp_pdev *pdev, int lmac_id)
dp_mon_err("%pK: " RNG_ERR "rxdma_mon_buf_ring ", soc); dp_mon_err("%pK: " RNG_ERR "rxdma_mon_buf_ring ", soc);
goto fail1; goto fail1;
} }
entries = wlan_cfg_get_dma_mon_dest_ring_size(pdev_cfg_ctx); entries = wlan_cfg_get_dma_rx_mon_dest_ring_size(pdev_cfg_ctx);
if (dp_srng_alloc(soc, &soc->rxdma_mon_dst_ring[lmac_id], if (dp_srng_alloc(soc, &soc->rxdma_mon_dst_ring[lmac_id],
RXDMA_MONITOR_DST, entries, 0)) { RXDMA_MONITOR_DST, entries, 0)) {
dp_mon_err("%pK: " RNG_ERR "rxdma_mon_dst_ring", soc); dp_mon_err("%pK: " RNG_ERR "rxdma_mon_dst_ring", soc);

View File

@@ -367,6 +367,7 @@ QDF_STATUS dp_mon_htt_srng_setup_2_0(struct dp_soc *soc,
dp_mon_err("Failed to send htt srng message for Tx mon dst ring"); dp_mon_err("Failed to send htt srng message for Tx mon dst ring");
return status; return status;
} }
return status; return status;
} }
@@ -409,8 +410,10 @@ QDF_STATUS dp_mon_soc_attach_2_0(struct dp_soc *soc)
{ {
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc); struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
struct dp_mon_soc_be *mon_soc = NULL; struct dp_mon_soc_be *mon_soc = NULL;
int entries = 8192; int entries;
struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx;
soc_cfg_ctx = soc->wlan_cfg_ctx;
mon_soc = (struct dp_mon_soc_be *)qdf_mem_malloc(sizeof(*mon_soc)); mon_soc = (struct dp_mon_soc_be *)qdf_mem_malloc(sizeof(*mon_soc));
if (!mon_soc) { if (!mon_soc) {
dp_mon_err("%pK: mem allocation failed", soc); dp_mon_err("%pK: mem allocation failed", soc);
@@ -419,13 +422,15 @@ QDF_STATUS dp_mon_soc_attach_2_0(struct dp_soc *soc)
qdf_mem_zero(mon_soc, sizeof(*mon_soc)); qdf_mem_zero(mon_soc, sizeof(*mon_soc));
be_soc->monitor_soc_be = mon_soc; be_soc->monitor_soc_be = mon_soc;
entries = wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(soc_cfg_ctx);
if (dp_srng_alloc(soc, &soc->rxdma_mon_buf_ring[0], if (dp_srng_alloc(soc, &soc->rxdma_mon_buf_ring[0],
RXDMA_MONITOR_BUF, entries, 0)) { RXDMA_MONITOR_BUF, entries, 0)) {
dp_mon_err("%pK: " RNG_ERR "rx_mon_buf_ring", soc); dp_mon_err("%pK: " RNG_ERR "rx_mon_buf_ring", soc);
goto fail; goto fail;
} }
if (dp_srng_alloc(soc, &mon_soc->tx_mon_buf_ring, entries = wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(soc_cfg_ctx);
if (dp_srng_alloc(soc, &be_soc->monitor_soc_be->tx_mon_buf_ring,
TX_MONITOR_BUF, entries, 0)) { TX_MONITOR_BUF, entries, 0)) {
dp_mon_err("%pK: " RNG_ERR "tx_mon_buf_ring", soc); dp_mon_err("%pK: " RNG_ERR "tx_mon_buf_ring", soc);
goto fail; goto fail;
@@ -473,7 +478,6 @@ QDF_STATUS dp_mon_soc_deinit_2_0(struct dp_soc *soc)
dp_srng_deinit(soc, &mon_soc->tx_mon_buf_ring, dp_srng_deinit(soc, &mon_soc->tx_mon_buf_ring,
TX_MONITOR_BUF, 0); TX_MONITOR_BUF, 0);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
@@ -520,25 +524,107 @@ fail:
} }
static static
void dp_pdev_mon_rings_deinit(struct dp_pdev *pdev) void dp_pdev_mon_rings_deinit_2_0(struct dp_pdev *pdev)
{ {
int mac_id = 0;
struct dp_soc *soc = pdev->soc;
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
struct dp_mon_soc_be *mon_soc = be_soc->monitor_soc_be;
for (mac_id = 0; mac_id < DP_NUM_MACS_PER_PDEV; mac_id++) {
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, mac_id,
pdev->pdev_id);
dp_srng_deinit(soc, &soc->rxdma_mon_dst_ring[lmac_id],
RXDMA_MONITOR_DST, 0);
dp_srng_deinit(soc, &mon_soc->tx_mon_dst_ring[lmac_id],
TX_MONITOR_DST, 0);
}
} }
static static
QDF_STATUS dp_pdev_mon_rings_init(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_pdev_mon_rings_init_2_0(struct dp_pdev *pdev)
{ {
struct dp_soc *soc = pdev->soc;
int mac_id = 0;
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
struct dp_mon_soc_be *mon_soc = be_soc->monitor_soc_be;
for (mac_id = 0; mac_id < DP_NUM_MACS_PER_PDEV; mac_id++) {
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, mac_id,
pdev->pdev_id);
if (dp_srng_init(soc, &soc->rxdma_mon_dst_ring[lmac_id],
RXDMA_MONITOR_DST, 0, lmac_id)) {
dp_mon_err("%pK: " RNG_ERR "rxdma_mon_dst_ring", soc);
goto fail;
}
if (dp_srng_init(soc, &mon_soc->tx_mon_dst_ring[lmac_id],
TX_MONITOR_DST, 0, lmac_id)) {
dp_mon_err("%pK: " RNG_ERR "tx_mon_dst_ring", soc);
goto fail;
}
}
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
fail:
dp_pdev_mon_rings_deinit_2_0(pdev);
return QDF_STATUS_E_NOMEM;
} }
static static
void dp_pdev_mon_rings_free(struct dp_pdev *pdev) void dp_pdev_mon_rings_free_2_0(struct dp_pdev *pdev)
{ {
int mac_id = 0;
struct dp_soc *soc = pdev->soc;
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
struct dp_mon_soc_be *mon_soc = be_soc->monitor_soc_be;
for (mac_id = 0; mac_id < DP_NUM_MACS_PER_PDEV; mac_id++) {
int lmac_id = dp_get_lmac_id_for_pdev_id(soc, mac_id,
pdev->pdev_id);
dp_srng_free(soc, &soc->rxdma_mon_dst_ring[lmac_id]);
dp_srng_free(soc, &mon_soc->tx_mon_dst_ring[lmac_id]);
}
} }
static static
QDF_STATUS dp_pdev_mon_rings_alloc(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_pdev_mon_rings_alloc_2_0(struct dp_pdev *pdev)
{ {
struct dp_soc *soc = pdev->soc;
int mac_id = 0;
int entries;
struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx;
struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(soc);
struct dp_mon_soc_be *mon_soc = be_soc->monitor_soc_be;
pdev_cfg_ctx = pdev->wlan_cfg_ctx;
for (mac_id = 0; mac_id < DP_NUM_MACS_PER_PDEV; mac_id++) {
int lmac_id =
dp_get_lmac_id_for_pdev_id(soc, mac_id, pdev->pdev_id);
entries = wlan_cfg_get_dma_rx_mon_dest_ring_size(pdev_cfg_ctx);
if (dp_srng_alloc(soc, &soc->rxdma_mon_dst_ring[lmac_id],
RXDMA_MONITOR_DST, entries, 0)) {
dp_err("%pK: " RNG_ERR "rxdma_mon_dst_ring", pdev);
goto fail;
}
entries = wlan_cfg_get_dma_tx_mon_dest_ring_size(pdev_cfg_ctx);
if (dp_srng_alloc(soc, &mon_soc->tx_mon_dst_ring[lmac_id],
TX_MONITOR_DST, entries, 0)) {
dp_err("%pK: " RNG_ERR "tx_mon_dst_ring", pdev);
goto fail;
}
}
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
fail:
dp_pdev_mon_rings_free_2_0(pdev);
return QDF_STATUS_E_NOMEM;
} }
static static
@@ -615,23 +701,23 @@ QDF_STATUS dp_mon_soc_deinit_2_0(struct dp_soc *soc)
} }
static inline static inline
void dp_pdev_mon_rings_deinit(struct dp_pdev *pdev) void dp_pdev_mon_rings_deinit_2_0(struct dp_pdev *pdev)
{ {
} }
static inline static inline
QDF_STATUS dp_pdev_mon_rings_init(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_pdev_mon_rings_init_2_0(struct dp_soc *soc, struct dp_pdev *pdev)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
static inline static inline
void dp_pdev_mon_rings_free(struct dp_pdev *pdev) void dp_pdev_mon_rings_free_2_0(struct dp_pdev *pdev)
{ {
} }
static inline static inline
QDF_STATUS dp_pdev_mon_rings_alloc(struct dp_soc *soc, struct dp_pdev *pdev) QDF_STATUS dp_pdev_mon_rings_alloc_2_0(struct dp_soc *soc, struct dp_pdev *pdev)
{ {
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
@@ -777,10 +863,10 @@ struct dp_mon_ops monitor_ops_2_0 = {
dp_mon_filter_reset_rx_pktlog_cbf_2_0, dp_mon_filter_reset_rx_pktlog_cbf_2_0,
#endif #endif
.mon_filter_update = dp_mon_filter_update_2_0, .mon_filter_update = dp_mon_filter_update_2_0,
.mon_rings_alloc = dp_pdev_mon_rings_alloc, .mon_rings_alloc = dp_pdev_mon_rings_alloc_2_0,
.mon_rings_free = dp_pdev_mon_rings_free, .mon_rings_free = dp_pdev_mon_rings_free_2_0,
.mon_rings_init = dp_pdev_mon_rings_init, .mon_rings_init = dp_pdev_mon_rings_init_2_0,
.mon_rings_deinit = dp_pdev_mon_rings_deinit, .mon_rings_deinit = dp_pdev_mon_rings_deinit_2_0,
.rx_mon_desc_pool_init = NULL, .rx_mon_desc_pool_init = NULL,
.rx_mon_desc_pool_deinit = NULL, .rx_mon_desc_pool_deinit = NULL,
.rx_mon_desc_pool_alloc = NULL, .rx_mon_desc_pool_alloc = NULL,

View File

@@ -2088,7 +2088,7 @@ QDF_STATUS dp_mon_pdev_attach(struct dp_pdev *pdev)
} }
if (mon_ops->mon_rings_alloc) { if (mon_ops->mon_rings_alloc) {
if (mon_ops->mon_rings_alloc(soc, pdev)) { if (mon_ops->mon_rings_alloc(pdev)) {
dp_mon_err("%pK: MONITOR rings setup failed", pdev); dp_mon_err("%pK: MONITOR rings setup failed", pdev);
goto fail2; goto fail2;
} }
@@ -2207,7 +2207,7 @@ QDF_STATUS dp_mon_pdev_init(struct dp_pdev *pdev)
} }
if (mon_ops->mon_rings_init) { if (mon_ops->mon_rings_init) {
if (mon_ops->mon_rings_init(soc, pdev)) { if (mon_ops->mon_rings_init(pdev)) {
dp_mon_err("%pK: MONITOR rings setup failed", pdev); dp_mon_err("%pK: MONITOR rings setup failed", pdev);
goto fail1; goto fail1;
} }

View File

@@ -496,9 +496,9 @@ struct dp_mon_ops {
#endif #endif
QDF_STATUS (*mon_filter_update)(struct dp_pdev *pdev); QDF_STATUS (*mon_filter_update)(struct dp_pdev *pdev);
QDF_STATUS (*mon_rings_alloc)(struct dp_soc* soc, struct dp_pdev *pdev); QDF_STATUS (*mon_rings_alloc)(struct dp_pdev *pdev);
void (*mon_rings_free)(struct dp_pdev *pdev); void (*mon_rings_free)(struct dp_pdev *pdev);
QDF_STATUS (*mon_rings_init)(struct dp_soc* soc, struct dp_pdev *pdev); QDF_STATUS (*mon_rings_init)(struct dp_pdev *pdev);
void (*mon_rings_deinit)(struct dp_pdev *pdev); void (*mon_rings_deinit)(struct dp_pdev *pdev);
QDF_STATUS (*rx_mon_buffers_alloc)(struct dp_pdev *pdev); QDF_STATUS (*rx_mon_buffers_alloc)(struct dp_pdev *pdev);

View File

@@ -332,10 +332,18 @@
#define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MIN 16 #define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MIN 16
#define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MAX 8192 #define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MAX 8192
#define WLAN_CFG_TX_MONITOR_BUF_RING_SIZE 4096
#define WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MIN 16
#define WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX 8192
#define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE 2048 #define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE 2048
#define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN 48 #define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN 48
#define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MAX 8192 #define WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MAX 8192
#define WLAN_CFG_TX_MONITOR_DST_RING_SIZE 2048
#define WLAN_CFG_TX_MONITOR_DST_RING_SIZE_MIN 48
#define WLAN_CFG_TX_MONITOR_DST_RING_SIZE_MAX 4096
#define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE 1024 #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE 1024
#define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN 16 #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN 16
#define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MAX 8192 #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MAX 8192
@@ -888,6 +896,13 @@
WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE, \ WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE, \
CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor buffer ring") CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor buffer ring")
#define CFG_DP_TX_MONITOR_BUF_RING \
CFG_INI_UINT("dp_tx_monitor_buf_ring", \
WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MIN, \
WLAN_CFG_TX_MONITOR_BUF_RING_SIZE_MAX, \
WLAN_CFG_TX_MONITOR_BUF_RING_SIZE, \
CFG_VALUE_OR_DEFAULT, "DP TX monitor buffer ring")
#define CFG_DP_RXDMA_MONITOR_DST_RING \ #define CFG_DP_RXDMA_MONITOR_DST_RING \
CFG_INI_UINT("dp_rxdma_monitor_dst_ring", \ CFG_INI_UINT("dp_rxdma_monitor_dst_ring", \
WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN, \ WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN, \
@@ -895,6 +910,13 @@
WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE, \ WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE, \
CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor destination ring") CFG_VALUE_OR_DEFAULT, "DP RXDMA monitor destination ring")
#define CFG_DP_TX_MONITOR_DST_RING \
CFG_INI_UINT("dp_tx_monitor_dst_ring", \
WLAN_CFG_TX_MONITOR_DST_RING_SIZE_MIN, \
WLAN_CFG_TX_MONITOR_DST_RING_SIZE_MAX, \
WLAN_CFG_TX_MONITOR_DST_RING_SIZE, \
CFG_VALUE_OR_DEFAULT, "DP TX monitor destination ring")
#define CFG_DP_RXDMA_MONITOR_STATUS_RING \ #define CFG_DP_RXDMA_MONITOR_STATUS_RING \
CFG_INI_UINT("dp_rxdma_monitor_status_ring", \ CFG_INI_UINT("dp_rxdma_monitor_status_ring", \
WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN, \ WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN, \
@@ -1427,6 +1449,8 @@
CFG(CFG_DP_HW_CC_ENABLE) \ CFG(CFG_DP_HW_CC_ENABLE) \
CFG(CFG_FORCE_RX_64_BA) \ CFG(CFG_FORCE_RX_64_BA) \
CFG(CFG_DP_DELAY_MON_REPLENISH) \ CFG(CFG_DP_DELAY_MON_REPLENISH) \
CFG(CFG_DP_TX_MONITOR_BUF_RING) \
CFG(CFG_DP_TX_MONITOR_DST_RING) \
CFG_DP_IPA_TX_RING_CFG \ CFG_DP_IPA_TX_RING_CFG \
CFG_DP_PPE_CONFIG \ CFG_DP_PPE_CONFIG \
CFG_DP_IPA_TX_ALT_RING_CFG CFG_DP_IPA_TX_ALT_RING_CFG

View File

@@ -1804,6 +1804,10 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING); cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING);
wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc, wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc,
CFG_DP_DELAY_MON_REPLENISH); CFG_DP_DELAY_MON_REPLENISH);
wlan_cfg_ctx->rx_mon_buf_ring_size = cfg_get(psoc,
CFG_DP_RXDMA_MONITOR_BUF_RING);
wlan_cfg_ctx->tx_mon_buf_ring_size = cfg_get(psoc,
CFG_DP_TX_MONITOR_BUF_RING);
wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx); wlan_soc_ipa_cfg_attach(psoc, wlan_cfg_ctx);
wlan_soc_hw_cc_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); wlan_soc_ppe_cfg_attach(psoc, wlan_cfg_ctx);
@@ -1833,8 +1837,10 @@ wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *psoc)
CFG_DP_RXDMA_BUF_RING); CFG_DP_RXDMA_BUF_RING);
wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc, wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc,
CFG_DP_RXDMA_MONITOR_BUF_RING); CFG_DP_RXDMA_MONITOR_BUF_RING);
wlan_cfg_ctx->dma_mon_dest_ring_size = cfg_get(psoc, wlan_cfg_ctx->dma_rx_mon_dest_ring_size = cfg_get(psoc,
CFG_DP_RXDMA_MONITOR_DST_RING); CFG_DP_RXDMA_MONITOR_DST_RING);
wlan_cfg_ctx->dma_tx_mon_dest_ring_size = cfg_get(psoc,
CFG_DP_TX_MONITOR_DST_RING);
wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc, wlan_cfg_ctx->dma_mon_status_ring_size = cfg_get(psoc,
CFG_DP_RXDMA_MONITOR_STATUS_RING); CFG_DP_RXDMA_MONITOR_STATUS_RING);
wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc, wlan_cfg_ctx->rxdma_monitor_desc_ring = cfg_get(psoc,
@@ -2262,12 +2268,19 @@ int wlan_cfg_get_dma_mon_buf_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size); qdf_export_symbol(wlan_cfg_get_dma_mon_buf_ring_size);
int wlan_cfg_get_dma_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
{ {
return cfg->dma_mon_dest_ring_size; return cfg->dma_rx_mon_dest_ring_size;
} }
qdf_export_symbol(wlan_cfg_get_dma_mon_dest_ring_size); qdf_export_symbol(wlan_cfg_get_dma_rx_mon_dest_ring_size);
int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
{
return cfg->dma_tx_mon_dest_ring_size;
}
qdf_export_symbol(wlan_cfg_get_dma_tx_mon_dest_ring_size);
int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg) int wlan_cfg_get_dma_mon_stat_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg)
{ {
@@ -2854,3 +2867,19 @@ uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->pkt_capture_mode; return cfg->pkt_capture_mode;
} }
#endif #endif
uint32_t
wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->rx_mon_buf_ring_size;
}
qdf_export_symbol(wlan_cfg_get_dp_soc_rx_mon_buf_ring_size);
uint32_t
wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->tx_mon_buf_ring_size;
}
qdf_export_symbol(wlan_cfg_get_dp_soc_tx_mon_buf_ring_size);

View File

@@ -227,6 +227,8 @@ struct wlan_srng_cfg {
* @hw_cc_conv_enabled: cookie conversion enabled * @hw_cc_conv_enabled: cookie conversion enabled
* @tcl_wbm_map_array: TCL-WBM map array * @tcl_wbm_map_array: TCL-WBM map array
* @pkt_capture_mode: Packet capture mode config * @pkt_capture_mode: Packet capture mode config
* @rx_mon_buf_ring_size: Rx monitor buf ring size
* @tx_mon_buf_ring_size: Tx monitor buf ring size
*/ */
struct wlan_cfg_dp_soc_ctxt { struct wlan_cfg_dp_soc_ctxt {
int num_int_ctxts; int num_int_ctxts;
@@ -370,24 +372,30 @@ struct wlan_cfg_dp_soc_ctxt {
#ifdef WLAN_FEATURE_PKT_CAPTURE_V2 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
uint32_t pkt_capture_mode; uint32_t pkt_capture_mode;
#endif #endif
uint32_t rx_mon_buf_ring_size;
uint32_t tx_mon_buf_ring_size;
}; };
/** /**
* struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio) * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio)
* @rx_dma_buf_ring_size - Size of RxDMA buffer ring * @rx_dma_buf_ring_size - Size of RxDMA buffer ring
* @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring * @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring
* @dma_mon_dest_ring_size - Size of RxDMA Monitor Destination ring * @dma_rx_mon_dest_ring_size - Size of RxDMA Monitor Destination ring
* @dma_tx_mon_dest_ring_size - Size of Tx Monitor Destination ring
* @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring * @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring
* @rxdma_monitor_desc_ring - rxdma monitor desc ring size * @rxdma_monitor_desc_ring - rxdma monitor desc ring size
* @dma_tx_mon_buf_ring_size - Tx monitor BUF Ring size
*/ */
struct wlan_cfg_dp_pdev_ctxt { struct wlan_cfg_dp_pdev_ctxt {
int rx_dma_buf_ring_size; int rx_dma_buf_ring_size;
int dma_mon_buf_ring_size; int dma_mon_buf_ring_size;
int dma_mon_dest_ring_size; int dma_rx_mon_dest_ring_size;
int dma_tx_mon_dest_ring_size;
int dma_mon_status_ring_size; int dma_mon_status_ring_size;
int rxdma_monitor_desc_ring; int rxdma_monitor_desc_ring;
int num_mac_rings; int num_mac_rings;
int nss_enabled; int nss_enabled;
int dma_tx_mon_buf_ring_size;
}; };
/** /**
@@ -1032,16 +1040,6 @@ uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
int wlan_cfg_get_dma_mon_buf_ring_size( int wlan_cfg_get_dma_mon_buf_ring_size(
struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx); struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
/*
* wlan_cfg_get_dma_mon_dest_ring_size() - Return Size of RxDMA Monitor
* Destination ring
* @wlan_cfg_pdev_ctx
*
* Return: dma_mon_dest_size
*/
int wlan_cfg_get_dma_mon_dest_ring_size(
struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
/* /*
* wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
* @wlan_cfg_pdev_ctx * @wlan_cfg_pdev_ctx
@@ -1858,4 +1856,38 @@ uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg)
return 0; return 0;
} }
#endif #endif
/**
* wlan_cfg_get_dp_soc_rx_mon_buf_ring_size() - Rx MON buf ring size
* @cfg: Configuration Handle
*
* Return: Size of Rx MON buf ring size
*/
uint32_t
wlan_cfg_get_dp_soc_rx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_get_dp_soc_tx_mon_buf_ring_size() - Tx MON buf ring size
* @cfg: Configuration Handle
*
* Return: Size of Tx MON buf ring size
*/
uint32_t
wlan_cfg_get_dp_soc_tx_mon_buf_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
/**
* wlan_cfg_get_dma_rx_mon_dest_ring_size() - Rx MON dest ring size
* @cfg: Configuration Handle
*
* Return: Size of Rx MON dest ring size
*/
int wlan_cfg_get_dma_rx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
/**
* wlan_cfg_get_dma_tx_mon_dest_ring_size() - Tx MON dest ring size
* @cfg: Configuration Handle
*
* Return: Size of Tx MON dest ring size
*/
int wlan_cfg_get_dma_tx_mon_dest_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg);
#endif #endif

View File

@@ -47,6 +47,8 @@
#define NUM_RXDMA_RINGS_PER_PDEV 2 #define NUM_RXDMA_RINGS_PER_PDEV 2
#define DP_NUM_MACS_PER_PDEV 2
/*Maximum Number of LMAC instances*/ /*Maximum Number of LMAC instances*/
#define MAX_NUM_LMAC_HW 2 #define MAX_NUM_LMAC_HW 2
#else #else
@@ -60,6 +62,7 @@
#define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11 #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11
#define NUM_RXDMA_RINGS_PER_PDEV 1 #define NUM_RXDMA_RINGS_PER_PDEV 1
#define MAX_NUM_LMAC_HW 3 #define MAX_NUM_LMAC_HW 3
#define DP_NUM_MACS_PER_PDEV 1
#endif #endif