diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 997ca1b1df..c5203cfc35 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -2791,6 +2791,35 @@ bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap1, uint32_t *remap2) return true; } + +/** + * dp_ipa_get_tx_ring_size() - Get Tx ring size for IPA + * + * @tx_ring_num: Tx ring number + * @tx_ipa_ring_sz: Return param only updated for IPA. + * + * Return: None + */ +static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz) +{ + if (tx_ring_num == IPA_TCL_DATA_RING_IDX) + *tx_ipa_ring_sz = WLAN_CFG_IPA_TX_RING_SIZE; +} + +/** + * dp_ipa_get_tx_comp_ring_size() - Get Tx comp ring size for IPA + * + * @tx_comp_ring_num: Tx comp ring number + * @tx_comp_ipa_ring_sz: Return param only updated for IPA. + * + * Return: None + */ +static void dp_ipa_get_tx_comp_ring_size(int tx_comp_ring_num, + int *tx_comp_ipa_ring_sz) +{ + if (tx_comp_ring_num == IPA_TCL_DATA_RING_IDX) + *tx_comp_ipa_ring_sz = WLAN_CFG_IPA_TX_COMP_RING_SIZE; +} #else static bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap1, @@ -2870,6 +2899,15 @@ static bool dp_reo_remap_config(struct dp_soc *soc, *remap1, *remap2, offload_radio); return true; } + +static void dp_ipa_get_tx_ring_size(int ring_num, int *tx_ipa_ring_sz) +{ +} + +static void dp_ipa_get_tx_comp_ring_size(int tx_comp_ring_num, + int *tx_comp_ipa_ring_sz) +{ +} #endif /* IPA_OFFLOAD */ /* @@ -2955,6 +2993,8 @@ QDF_STATUS dp_setup_tx_ring_pair_by_index(struct dp_soc *soc, uint8_t index) int cached; tx_ring_size = wlan_cfg_tx_ring_size(soc_cfg_ctx); + dp_ipa_get_tx_ring_size(index, &tx_ring_size); + if (dp_srng_setup(soc, &soc->tcl_data_ring[index], TCL_DATA, index, 0, tx_ring_size, 0)) { dp_err("dp_srng_setup failed for tcl_data_ring"); @@ -2967,6 +3007,7 @@ QDF_STATUS dp_setup_tx_ring_pair_by_index(struct dp_soc *soc, uint8_t index) "tcl_data_ring"); tx_comp_ring_size = wlan_cfg_tx_comp_ring_size(soc_cfg_ctx); + dp_ipa_get_tx_comp_ring_size(index, &tx_comp_ring_size); /* Disable cached desc if NSS offload is enabled */ cached = WLAN_CFG_DST_RING_CACHED_DESC; if (wlan_cfg_get_dp_soc_nss_cfg(soc_cfg_ctx)) diff --git a/wlan_cfg/cfg_dp.h b/wlan_cfg/cfg_dp.h index fa2a6f6474..1078c61800 100644 --- a/wlan_cfg/cfg_dp.h +++ b/wlan_cfg/cfg_dp.h @@ -62,6 +62,10 @@ #else #define WLAN_CFG_TX_RING_SIZE 1024 #endif + +#define WLAN_CFG_IPA_TX_RING_SIZE 1024 +#define WLAN_CFG_IPA_TX_COMP_RING_SIZE 1024 + #define WLAN_CFG_PER_PDEV_TX_RING 0 #define WLAN_CFG_IPA_UC_TX_BUF_SIZE 2048 #define WLAN_CFG_IPA_UC_TX_PARTITION_BASE 3000