summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYun Park <yunp@qca.qualcomm.com>2015-10-19 15:28:03 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-10-20 17:01:55 +0530
commit00bdab1c2be2ea8efd5582d566c940fa170365ec (patch)
tree5d0bb75f509649a5aa3973796ea6d308af08afe8
parent95713ef76a741af5302f37e131c7e6756344aea9 (diff)
qcacld: IPA uC: return EPERM for IPA RM CONS REQ only during unloading
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
-rw-r--r--CORE/HDD/src/wlan_hdd_ipa.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c
index 1008af4c3f26..705cb23b6413 100644
--- a/CORE/HDD/src/wlan_hdd_ipa.c
+++ b/CORE/HDD/src/wlan_hdd_ipa.c
@@ -2240,16 +2240,24 @@ static int hdd_ipa_rm_cons_release(void)
static int hdd_ipa_rm_cons_request(void)
{
+ int ret = 0;
+
#ifdef IPA_UC_OFFLOAD
- if ((ghdd_ipa->resource_loading) || (ghdd_ipa->resource_unloading)) {
+ if (ghdd_ipa->resource_loading) {
HDD_IPA_LOG(VOS_TRACE_LEVEL_FATAL,
- "%s: ipa resource loading/unloading in progress",
+ "%s: ipa resource loading in progress",
__func__);
ghdd_ipa->pending_cons_req = VOS_TRUE;
- return -EPERM;
+ ret= -EINPROGRESS;
+ } else if (ghdd_ipa->resource_unloading) {
+ HDD_IPA_LOG(VOS_TRACE_LEVEL_FATAL,
+ "%s: ipa resource unloading in progress",
+ __func__);
+ ghdd_ipa->pending_cons_req = VOS_TRUE;
+ ret = -EPERM;
}
#endif /* IPA_UC_OFFLOAD */
- return 0;
+ return ret;
}
int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx, uint64_t tx_packets,