diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c index d08b050f67..b2a26080e7 100644 --- a/dp/wifi3.0/dp_stats.c +++ b/dp/wifi3.0/dp_stats.c @@ -4981,7 +4981,7 @@ dp_print_pdev_cfg_params(struct dp_pdev *pdev) DP_PRINT_STATS("DMA Mon buf ring size: %d ", pdev_cfg_ctx->dma_mon_buf_ring_size); 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 ", pdev_cfg_ctx->dma_mon_status_ring_size); DP_PRINT_STATS("Rxdma monitor desc ring: %d", diff --git a/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c b/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c index a936f0224a..5e63678735 100644 --- a/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c +++ b/dp/wifi3.0/monitor/1.0/dp_mon_1.0.c @@ -197,8 +197,9 @@ void dp_mon_rings_free_1_0(struct dp_pdev *pdev) } 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; struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx; @@ -226,8 +227,9 @@ fail1: } 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 entries; struct wlan_cfg_dp_pdev_ctxt *pdev_cfg_ctx; @@ -255,24 +257,24 @@ fail1: return QDF_STATUS_E_NOMEM; } #else -static +static inline 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) { } -static -QDF_STATUS dp_mon_rings_init_1_0(struct dp_soc *soc, struct dp_pdev *pdev) +static inline +QDF_STATUS dp_mon_rings_init_1_0(struct dp_pdev *pdev) { return QDF_STATUS_SUCCESS; } -static -QDF_STATUS dp_mon_rings_alloc_1_0(struct dp_soc *soc, struct dp_pdev *pdev) +static inline +QDF_STATUS dp_mon_rings_alloc_1_0(struct dp_pdev *pdev) { return QDF_STATUS_SUCCESS; } diff --git a/dp/wifi3.0/monitor/1.0/dp_rx_mon_dest_1.0.c b/dp/wifi3.0/monitor/1.0/dp_rx_mon_dest_1.0.c index 58f773cfd7..5a706ba522 100644 --- a/dp/wifi3.0/monitor/1.0/dp_rx_mon_dest_1.0.c +++ b/dp/wifi3.0/monitor/1.0/dp_rx_mon_dest_1.0.c @@ -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); 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], RXDMA_MONITOR_DST, entries, 0)) { dp_mon_err("%pK: " RNG_ERR "rxdma_mon_dst_ring", soc); diff --git a/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c b/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c index 5475fe9663..7e7259a137 100644 --- a/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c +++ b/dp/wifi3.0/monitor/2.0/dp_mon_2.0.c @@ -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"); 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_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)); if (!mon_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)); 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], RXDMA_MONITOR_BUF, entries, 0)) { dp_mon_err("%pK: " RNG_ERR "rx_mon_buf_ring", soc); 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)) { dp_mon_err("%pK: " RNG_ERR "tx_mon_buf_ring", soc); 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, TX_MONITOR_BUF, 0); - return QDF_STATUS_SUCCESS; } @@ -520,25 +524,107 @@ fail: } 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 -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; + +fail: + dp_pdev_mon_rings_deinit_2_0(pdev); + return QDF_STATUS_E_NOMEM; } 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 -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; + +fail: + dp_pdev_mon_rings_free_2_0(pdev); + return QDF_STATUS_E_NOMEM; } static @@ -615,23 +701,23 @@ QDF_STATUS dp_mon_soc_deinit_2_0(struct dp_soc *soc) } 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 -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; } 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 -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; } @@ -777,10 +863,10 @@ struct dp_mon_ops monitor_ops_2_0 = { dp_mon_filter_reset_rx_pktlog_cbf_2_0, #endif .mon_filter_update = dp_mon_filter_update_2_0, - .mon_rings_alloc = dp_pdev_mon_rings_alloc, - .mon_rings_free = dp_pdev_mon_rings_free, - .mon_rings_init = dp_pdev_mon_rings_init, - .mon_rings_deinit = dp_pdev_mon_rings_deinit, + .mon_rings_alloc = dp_pdev_mon_rings_alloc_2_0, + .mon_rings_free = dp_pdev_mon_rings_free_2_0, + .mon_rings_init = dp_pdev_mon_rings_init_2_0, + .mon_rings_deinit = dp_pdev_mon_rings_deinit_2_0, .rx_mon_desc_pool_init = NULL, .rx_mon_desc_pool_deinit = NULL, .rx_mon_desc_pool_alloc = NULL, diff --git a/dp/wifi3.0/monitor/dp_mon.c b/dp/wifi3.0/monitor/dp_mon.c index 26afccadc4..74c2f79524 100644 --- a/dp/wifi3.0/monitor/dp_mon.c +++ b/dp/wifi3.0/monitor/dp_mon.c @@ -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(soc, pdev)) { + if (mon_ops->mon_rings_alloc(pdev)) { dp_mon_err("%pK: MONITOR rings setup failed", pdev); 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(soc, pdev)) { + if (mon_ops->mon_rings_init(pdev)) { dp_mon_err("%pK: MONITOR rings setup failed", pdev); goto fail1; } diff --git a/dp/wifi3.0/monitor/dp_mon.h b/dp/wifi3.0/monitor/dp_mon.h index 42da2a0df4..9207b523f6 100644 --- a/dp/wifi3.0/monitor/dp_mon.h +++ b/dp/wifi3.0/monitor/dp_mon.h @@ -496,9 +496,9 @@ struct dp_mon_ops { #endif 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); - 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); QDF_STATUS (*rx_mon_buffers_alloc)(struct dp_pdev *pdev); diff --git a/wlan_cfg/cfg_dp.h b/wlan_cfg/cfg_dp.h index 08ad8716c0..4a6a6374e4 100644 --- a/wlan_cfg/cfg_dp.h +++ b/wlan_cfg/cfg_dp.h @@ -332,10 +332,18 @@ #define WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE_MIN 16 #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_MIN 48 #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_MIN 16 #define WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MAX 8192 @@ -888,6 +896,13 @@ WLAN_CFG_RXDMA_MONITOR_BUF_RING_SIZE, \ 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 \ CFG_INI_UINT("dp_rxdma_monitor_dst_ring", \ WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE_MIN, \ @@ -895,6 +910,13 @@ WLAN_CFG_RXDMA_MONITOR_DST_RING_SIZE, \ 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 \ CFG_INI_UINT("dp_rxdma_monitor_status_ring", \ WLAN_CFG_RXDMA_MONITOR_STATUS_RING_SIZE_MIN, \ @@ -1427,6 +1449,8 @@ CFG(CFG_DP_HW_CC_ENABLE) \ CFG(CFG_FORCE_RX_64_BA) \ 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_PPE_CONFIG \ CFG_DP_IPA_TX_ALT_RING_CFG diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index d0a7fb9a38..880a46e2b4 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -1804,6 +1804,10 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc) cfg_get(psoc, CFG_DP_WOW_CHECK_RX_PENDING); wlan_cfg_ctx->delay_mon_replenish = cfg_get(psoc, 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_hw_cc_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); wlan_cfg_ctx->dma_mon_buf_ring_size = cfg_get(psoc, 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); + 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, CFG_DP_RXDMA_MONITOR_STATUS_RING); 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); -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) { @@ -2854,3 +2867,19 @@ uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg) return cfg->pkt_capture_mode; } #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); diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index 8e047689cf..c9418258d0 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -227,6 +227,8 @@ struct wlan_srng_cfg { * @hw_cc_conv_enabled: cookie conversion enabled * @tcl_wbm_map_array: TCL-WBM map array * @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 { int num_int_ctxts; @@ -370,24 +372,30 @@ struct wlan_cfg_dp_soc_ctxt { #ifdef WLAN_FEATURE_PKT_CAPTURE_V2 uint32_t pkt_capture_mode; #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) * @rx_dma_buf_ring_size - Size of RxDMA 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 * @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 { int rx_dma_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 rxdma_monitor_desc_ring; int num_mac_rings; 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( 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_pdev_ctx @@ -1858,4 +1856,38 @@ uint32_t wlan_cfg_get_pkt_capture_mode(struct wlan_cfg_dp_soc_ctxt *cfg) return 0; } #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 diff --git a/wlan_cfg/wlan_init_cfg.h b/wlan_cfg/wlan_init_cfg.h index fa79692119..55a69bee5a 100644 --- a/wlan_cfg/wlan_init_cfg.h +++ b/wlan_cfg/wlan_init_cfg.h @@ -47,6 +47,8 @@ #define NUM_RXDMA_RINGS_PER_PDEV 2 +#define DP_NUM_MACS_PER_PDEV 2 + /*Maximum Number of LMAC instances*/ #define MAX_NUM_LMAC_HW 2 #else @@ -60,6 +62,7 @@ #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11 #define NUM_RXDMA_RINGS_PER_PDEV 1 #define MAX_NUM_LMAC_HW 3 +#define DP_NUM_MACS_PER_PDEV 1 #endif