summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Kumar M <rpavan@codeaurora.org>2017-12-18 21:15:48 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-22 01:07:38 -0800
commita1c8e02b9bbeeda866c40b4895b28ef08e100f05 (patch)
tree5f2bfc6d55a856ea0c7b95168dc49d13bb84e3bf
parent1909af97ca19f4327d8ff24b1ac012e5161bbb9d (diff)
downloadipacfg-mgr-a1c8e02b9bbeeda866c40b4895b28ef08e100f05.tar.gz
Translate TRY_AGAIN error for SetQuota() to success inline with HAL definition
In sequence of events where interface is down on modem side and framework is not aware of this, FW tries to setQuota on interface which is already down. Q6 returns failure in this situation and framework stops IPA OFFLOAD on failure. Until tethering is switched off and on again, packets take SW path. To avoid this, IPACM sends TRY_AGAIN to HAL and HAL forward the success message to framework. Once upstream come up again, setQuota will be trigerred again with proper paramaters. Change-Id: I73e5ddbdedbc2ec006350a59d5795056dc1271b0 CRs-Fixed: 2142519
-rw-r--r--hal/src/HAL.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/hal/src/HAL.cpp b/hal/src/HAL.cpp
index f85df35..d72d274 100644
--- a/hal/src/HAL.cpp
+++ b/hal/src/HAL.cpp
@@ -471,6 +471,9 @@ Return<void> HAL::setDataLimit
fl.setResult(res.success, res.errMsg);
} else {
RET ipaReturn = mIPA->setQuota(upstream.c_str(), limit);
+ if(ipaReturn == RET::FAIL_TRY_AGAIN) {
+ ipaReturn = RET::SUCCESS;
+ }
BoolResult res = ipaResultToBoolResult(ipaReturn);
hidl_cb(res.success, res.errMsg);
fl.setResult(res.success, res.errMsg);