Przeglądaj źródła

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
Devender Kumar 3 lat temu
rodzic
commit
b64b200ff8
1 zmienionych plików z 8 dodań i 6 usunięć
  1. 8 6
      ipa/core/src/wlan_ipa_main.c

+ 8 - 6
ipa/core/src/wlan_ipa_main.c

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