From 8f4ead471fe8bdf47aa19beb7f72ed0a32ce496b Mon Sep 17 00:00:00 2001 From: Karthik Kantamneni Date: Fri, 28 May 2021 18:42:10 +0530 Subject: [PATCH] qcacld-3.0: Handle ipa pipes setup failure in wlan_ipa_uc_ol_init When ipa setup pipes fails in wlan_ipa_uc_ol_init API, tx buff mapping is not done but during deinit path tx buff unmapping is called without mapping. Fix this by resetting uc_loaded flag to false when ipa pipes setup failure is encountered. Change-Id: Ic34320e56cee9e60381d9203dd95e268d0ef392b CRs-Fixed: 2957612 --- components/ipa/core/src/wlan_ipa_core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index 2fd884a65047..ec233675f2ef 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -3855,6 +3855,13 @@ QDF_STATUS wlan_ipa_uc_ol_init(struct wlan_ipa_priv *ipa_ctx, ipa_err("Failure to setup IPA pipes (status=%d)", status); status = QDF_STATUS_E_FAILURE; + + if (wlan_ipa_uc_sta_is_enabled(ipa_ctx->config)) { + qdf_cancel_work(&ipa_ctx->mcc_work); + wlan_ipa_teardown_sys_pipe(ipa_ctx); + } + ipa_ctx->uc_loaded = false; + goto fail_return; }