summaryrefslogtreecommitdiff
path: root/htc
diff options
context:
space:
mode:
authorYue Ma <yuem@codeaurora.org>2016-03-08 17:40:42 -0800
committerYue Ma <yuem@codeaurora.org>2016-04-01 11:53:21 -0700
commit9be730f61b2dcd9659ed1e4a63fae94e7234da64 (patch)
tree015fbe97f12d6620a534e48d94426da3f99604c4 /htc
parente8e3b1293975e7c098acb4e9515c83dbca1b18d5 (diff)
qcacmn: Update credit flow control enable/disable in HTC
There are two ways to enable/disable HTC credit flow control. One is in HTC itself with a static variable. The other is from the modules who want to establish HTC service (e.g. WMI or HTT) by sending the request. Make sure credit flow control enable/disable can be safely done by other modules so that HTC layer can be converged. Change-Id: I169c1ac7b410a7c9e7203c174bf1f1ec8a07ca06 CRs-fixed: 982024
Diffstat (limited to 'htc')
-rw-r--r--htc/htc.c3
-rw-r--r--htc/htc_services.c10
2 files changed, 3 insertions, 10 deletions
diff --git a/htc/htc.c b/htc/htc.c
index c955433b9be5..8d07d218fb99 100644
--- a/htc/htc.c
+++ b/htc/htc.c
@@ -526,8 +526,7 @@ static void reset_endpoint_states(HTC_TARGET *target)
INIT_HTC_PACKET_QUEUE(&pEndpoint->TxLookupQueue);
INIT_HTC_PACKET_QUEUE(&pEndpoint->RxBufferHoldQueue);
pEndpoint->target = target;
- /* pEndpoint->TxCreditFlowEnabled = (A_BOOL)htc_credit_flow; */
- pEndpoint->TxCreditFlowEnabled = (A_BOOL) 1;
+ pEndpoint->TxCreditFlowEnabled = (A_BOOL)htc_credit_flow;
qdf_atomic_init(&pEndpoint->TxProcessCount);
}
}
diff --git a/htc/htc_services.c b/htc/htc_services.c
index 463e948e7dd3..2b29b1a85ca3 100644
--- a/htc/htc_services.c
+++ b/htc/htc_services.c
@@ -126,17 +126,11 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
HTC_CONNECT_FLAGS_DISABLE_CREDIT_FLOW_CTRL) {
disableCreditFlowCtrl = true;
}
-#if defined(HIF_USB)
+
if (!htc_credit_flow) {
disableCreditFlowCtrl = true;
}
-#else
- /* Only enable credit for WMI service */
- if (!htc_credit_flow
- && pConnectReq->service_id != WMI_CONTROL_SVC) {
- disableCreditFlowCtrl = true;
- }
-#endif
+
/* check caller if it wants to transfer meta data */
if ((pConnectReq->pMetaData != NULL) &&
(pConnectReq->MetaDataLength <=