Browse Source

qcacmn: Fix pipes_down flag in IPA offload

Currently pipes_down flag is not set to false
during wlan_ipa_uc_enable_pipes() because
autonomy is disabled for optional wifi dp
feature. This causes a crash while trying
to disable pipes during teardown.
This change will update the check and
set pipes_down flag to false during pipe enable.

Change-Id: I41f7e6fc942764c5ab5d3437185af9f90fb39280
CRs-Fixed: 3436012
Namita Nair 2 years ago
parent
commit
c016d7b5d9
1 changed files with 5 additions and 1 deletions
  1. 5 1
      ipa/core/src/wlan_ipa_core.c

+ 5 - 1
ipa/core/src/wlan_ipa_core.c

@@ -1747,7 +1747,8 @@ QDF_STATUS wlan_ipa_uc_enable_pipes(struct wlan_ipa_priv *ipa_ctx)
 	}
 end:
 	qdf_spin_lock_bh(&ipa_ctx->enable_disable_lock);
-	if (!qdf_atomic_read(&ipa_ctx->autonomy_disabled) &&
+	if (((!qdf_atomic_read(&ipa_ctx->autonomy_disabled)) ||
+	     ipa_ctx->opt_wifi_datapath) &&
 	    !qdf_atomic_read(&ipa_ctx->pipes_disabled))
 		ipa_ctx->ipa_pipes_down = false;
 
@@ -1772,6 +1773,9 @@ wlan_ipa_uc_disable_pipes(struct wlan_ipa_priv *ipa_ctx, bool force_disable)
 	if (ipa_ctx->ipa_pipes_down || ipa_ctx->pipes_down_in_progress) {
 		qdf_spin_unlock_bh(&ipa_ctx->enable_disable_lock);
 		ipa_info("IPA WDI Pipes are already deactivated");
+		ipa_info("pipes_down %d, pipes_down_in_progress %d",
+			 ipa_ctx->ipa_pipes_down,
+			 ipa_ctx->pipes_down_in_progress);
 		return QDF_STATUS_E_ALREADY;
 	}
 	ipa_ctx->pipes_down_in_progress = true;