summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Khanna <mkhannaqca@codeaurora.org>2017-04-17 16:24:05 -0700
committerSandeep Puligilla <spuligil@codeaurora.org>2017-04-20 14:40:36 -0700
commit5d01acdc6e4fba4a4a2a5bdfa6312461dd473b59 (patch)
tree352ddc1d2403c7f5ac7481e7703a436d72352462
parent02b6a26902faa0ba1671bc2ad8ea3204478d7e97 (diff)
qcacmn: Fix core_ctl_set_boost "off" ref count
In current implementation, we may call core_ctl_set_boost(false) even if its already been turned off an a previous occasion. This leads to excessive prints in the kmsg "Error turning off boost. Boost already turned off" Fix the ref_count such that we donot call the API to turn core_ctl_set_boost "off", if it is already off. CRs-Fixed: 2034738 Change-Id: I6e0760c9e6778087f8de6e5329bcaf110c7b264b
-rw-r--r--hif/src/hif_napi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c
index 1b2a91312c01..03699b625715 100644
--- a/hif/src/hif_napi.c
+++ b/hif/src/hif_napi.c
@@ -1626,14 +1626,15 @@ int hif_napi_cpu_blacklist(struct qca_napi_data *napid,
}
break;
case BLACKLIST_OFF:
- if (ref_count)
+ if (ref_count) {
ref_count--;
- rc = 0;
- if (ref_count == 0) {
- rc = hif_napi_core_ctl_set_boost(false);
- NAPI_DEBUG("boost_off() returns %d - refcnt=%d",
- rc, ref_count);
- hif_napi_bl_irq(napid, false);
+ rc = 0;
+ if (ref_count == 0) {
+ rc = hif_napi_core_ctl_set_boost(false);
+ NAPI_DEBUG("boost_off() returns %d - refcnt=%d",
+ rc, ref_count);
+ hif_napi_bl_irq(napid, false);
+ }
}
break;
default: