qcacmn: Add TX credits after WMI logging

While processing a host-to-target credit report, the number of available
credits is incremented before recording the credit report event in the
WMI history log. This can lead to tricky debug scenarios where there is
an available credit, but the WMI history log does not show that a credit
report has been processed. In htc_process_credit_rpt, log the credit
report in the WMI history log before incrementing the available credits
field.

Change-Id: Id8632c85348bec38b6c46549a68f613d102b2ae5
CRs-Fixed: 2204248
This commit is contained in:
Dustin Brown
2018-03-12 14:22:51 -07:00
committed by nshrivas
parent 6b6bf629d2
commit f74576cb84

View File

@@ -2154,13 +2154,15 @@ void htc_process_credit_rpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt,
#endif #endif
pEndpoint->TxCredits += rpt_credits;
if (pEndpoint->service_id == WMI_CONTROL_SVC) { if (pEndpoint->service_id == WMI_CONTROL_SVC) {
htc_credit_record(HTC_PROCESS_CREDIT_REPORT, htc_credit_record(HTC_PROCESS_CREDIT_REPORT,
pEndpoint->TxCredits, pEndpoint->TxCredits + rpt_credits,
HTC_PACKET_QUEUE_DEPTH(&pEndpoint-> HTC_PACKET_QUEUE_DEPTH(&pEndpoint->
TxQueue)); TxQueue));
} }
pEndpoint->TxCredits += rpt_credits;
if (pEndpoint->TxCredits if (pEndpoint->TxCredits
&& HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)) { && HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue)) {
UNLOCK_HTC_TX(target); UNLOCK_HTC_TX(target);