From 4d8b60a777709adc3684f88fa4e18578fa1e6cf2 Mon Sep 17 00:00:00 2001 From: Yun Park Date: Thu, 22 Oct 2015 13:59:32 -0700 Subject: [PATCH] qcacld-3.0: IPA uC: Return EPERM for RM CONS REQ only during unloading qcacld-2.0 to qcacld-3.0 propagation Change to return -EINPROGRESS if WLAN unable to grant IPA CONS resource due to IPA resource loading is in progress. Return -EPERM only if WLAN unable to grant IPA CONS resource due to IPA resource unloading is in progress. Change-Id: Iea4d804d3f81b086e723230fb8eddc7d9561d7d1 CRs-Fixed: 926880 --- core/hdd/src/wlan_hdd_ipa.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 10d1acb16bde..ee5fb7afd81c 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -2100,14 +2100,23 @@ static int hdd_ipa_rm_cons_release(void) */ static int hdd_ipa_rm_cons_request(void) { - if ((ghdd_ipa->resource_loading) || (ghdd_ipa->resource_unloading)) { + int ret = 0; + + if (ghdd_ipa->resource_loading) { HDD_IPA_LOG(CDF_TRACE_LEVEL_FATAL, - "%s: ipa resource loading/unloading in progress", + "%s: IPA resource loading in progress", __func__); ghdd_ipa->pending_cons_req = true; - return -EPERM; + ret = -EINPROGRESS; + } else if (ghdd_ipa->resource_unloading) { + HDD_IPA_LOG(CDF_TRACE_LEVEL_FATAL, + "%s: IPA resource unloading in progress", + __func__); + ghdd_ipa->pending_cons_req = true; + ret = -EPERM; } - return 0; + + return ret; } /**