qcacmn: Update ipa_enabled config during cfg_soc_attach

ipa_enabled cfg parameter is updated in DP post soc_attach
and soc_init and the default value of ipa_enabled in soc
cfg context is 0. ipa_enabled cfg is used in soc_attach
and soc_init for tx and tx completion ring configurations
and could potentially cause issues when ipa is enabled.

Fix is to update ipa_enabled config as part of dp soc
ipa_config_attach.

Change-Id: Ia797d8feed8aff619b0f7f63ba7ec5823c82458c
CRs-Fixed: 3075076
This commit is contained in:
Yeshwanth Sriram Guntuka
2021-11-15 13:03:49 +05:30
committed by Madan Koyyalamudi
parent eaf287ec84
commit adb3b9f91d

View File

@@ -1596,6 +1596,8 @@ void wlan_cfg_fill_interrupt_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
#endif
#ifdef IPA_OFFLOAD
#define WLAN_CFG_IPA_ENABLE_MASK BIT(0)
#ifdef IPA_WDI3_TX_TWO_PIPES
/**
* wlan_soc_ipa_cfg_attach() - Update ipa tx and tx alt config
@@ -1609,6 +1611,8 @@ static void
wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
{
wlan_cfg_ctx->ipa_enabled = (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
WLAN_CFG_IPA_ENABLE_MASK);
wlan_cfg_ctx->ipa_tx_ring_size =
cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
wlan_cfg_ctx->ipa_tx_comp_ring_size =
@@ -1631,6 +1635,8 @@ static void
wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx)
{
wlan_cfg_ctx->ipa_enabled = (cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
WLAN_CFG_IPA_ENABLE_MASK);
wlan_cfg_ctx->ipa_tx_ring_size =
cfg_get(psoc, CFG_DP_IPA_TX_RING_SIZE);
wlan_cfg_ctx->ipa_tx_comp_ring_size =
@@ -2232,7 +2238,7 @@ int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
{
if (!cfg->ipa_enabled)
return cfg->num_tcl_data_rings;
return cfg->num_nss_tcl_data_rings;
return 1;
}