qcacmn: Fix for early free of IPA global varible

With multiple radio supporting IPA offload path, the g_ipa_config
is getting free when doing wifi unload for single radio, which is
leading to an issue of early free of g_ipa_config variable.
Fix is check if all the soc are down and then only free the
global struct for IPA.

Change-Id: If8fbc7a72c91a26e6f9e680711cd58429f8a1e99
CRs-Fixed: 3137091
This commit is contained in:
Devender Kumar
2022-02-22 19:07:09 +05:30
committed by Madan Koyyalamudi
parent edbfac7e2e
commit b64b200ff8

View File

@@ -59,13 +59,15 @@ QDF_STATUS ipa_config_mem_alloc(void)
void ipa_config_mem_free(void) void ipa_config_mem_free(void)
{ {
if (!g_ipa_config) { if (!g_instances_added) {
ipa_err("IPA config already freed"); if (!g_ipa_config) {
return; ipa_err("IPA config already freed");
} return;
}
qdf_mem_free(g_ipa_config); qdf_mem_free(g_ipa_config);
g_ipa_config = NULL; g_ipa_config = NULL;
}
} }
bool ipa_is_hw_support(void) bool ipa_is_hw_support(void)