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
This commit is contained in:
@@ -526,8 +526,7 @@ static void reset_endpoint_states(HTC_TARGET *target)
|
|||||||
INIT_HTC_PACKET_QUEUE(&pEndpoint->TxLookupQueue);
|
INIT_HTC_PACKET_QUEUE(&pEndpoint->TxLookupQueue);
|
||||||
INIT_HTC_PACKET_QUEUE(&pEndpoint->RxBufferHoldQueue);
|
INIT_HTC_PACKET_QUEUE(&pEndpoint->RxBufferHoldQueue);
|
||||||
pEndpoint->target = target;
|
pEndpoint->target = target;
|
||||||
/* pEndpoint->TxCreditFlowEnabled = (A_BOOL)htc_credit_flow; */
|
pEndpoint->TxCreditFlowEnabled = (A_BOOL)htc_credit_flow;
|
||||||
pEndpoint->TxCreditFlowEnabled = (A_BOOL) 1;
|
|
||||||
qdf_atomic_init(&pEndpoint->TxProcessCount);
|
qdf_atomic_init(&pEndpoint->TxProcessCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -126,17 +126,11 @@ A_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
|
|||||||
HTC_CONNECT_FLAGS_DISABLE_CREDIT_FLOW_CTRL) {
|
HTC_CONNECT_FLAGS_DISABLE_CREDIT_FLOW_CTRL) {
|
||||||
disableCreditFlowCtrl = true;
|
disableCreditFlowCtrl = true;
|
||||||
}
|
}
|
||||||
#if defined(HIF_USB)
|
|
||||||
if (!htc_credit_flow) {
|
if (!htc_credit_flow) {
|
||||||
disableCreditFlowCtrl = true;
|
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 */
|
/* check caller if it wants to transfer meta data */
|
||||||
if ((pConnectReq->pMetaData != NULL) &&
|
if ((pConnectReq->pMetaData != NULL) &&
|
||||||
(pConnectReq->MetaDataLength <=
|
(pConnectReq->MetaDataLength <=
|
||||||
|
Reference in New Issue
Block a user