From da34c57e5d2c8ca53648b9c06100884fd3c1b130 Mon Sep 17 00:00:00 2001 From: jiad Date: Fri, 2 Mar 2018 15:31:43 +0800 Subject: [PATCH] qcacld-3.0: Fix wlan load failure when IPA uc not ready In IPA offload case, if wlan driver is loaded before IPA uC is ready, error is returned in hdd_ipa_init, which leads to whole driver load failure. This is not the case since IPA driver provides wlan driver a notify callback where IPA will invoke this callback when IPA uC is ready. Fix is to not return error if IPA uC is not ready during wlan loading phase. Change-Id: I98382abbb3bb3b1176f3be41228ac260c1017c24 CRs-Fixed: 2198998 --- core/hdd/src/wlan_hdd_ipa.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 2d77c50f33d6..198ae0d30673 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -6189,9 +6189,12 @@ static QDF_STATUS __hdd_ipa_init(struct hdd_context *hdd_ctx) if (ret) { HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "IPA WDI init failed: ret=%d", ret); - if (ret == -EACCES) - ret = hdd_ipa_uc_send_wdi_control_msg(false); - goto fail_create_sys_pipe; + if (ret == -EACCES) { + if (hdd_ipa_uc_send_wdi_control_msg(false)) + goto fail_create_sys_pipe; + } else { + goto fail_create_sys_pipe; + } } } else { ret = hdd_ipa_setup_sys_pipe(hdd_ipa);