qcacmn: Fix WMI command tx failure

qcacld-2.0 to qcacmn propagation

In USB solution, one WMI command will consume
one "resource". So, for WMI endpoint, the
"resource" number of one bundle is
HTC_MAX_MSG_PER_BUNDLE_TX rather than 2 *
HTC_MAX_MSG_PER_BUNDLE_TX.

Change-Id: Ia60e49a403a0d689d1ba8397f7c796cd911ab918
CRs-Fixed: 1013006
This commit is contained in:
Liangwei Dong
2016-09-29 03:35:59 -04:00
committed by qcabuildsw
父節點 6dae88454c
當前提交 2c73be828a

查看文件

@@ -1187,13 +1187,20 @@ static HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
/*
* Header and payload belongs to the different fragments and
* consume 2 resource for one HTC package but USB combine into
* one transfer.
* one transfer.And one WMI message only consumes one single
* resource.
*/
if (HTC_TX_BUNDLE_ENABLED(target) && tx_resources &&
hif_get_bus_type(target->hif_dev) ==
QDF_BUS_TYPE_USB)
tx_resources = (HTC_MAX_MSG_PER_BUNDLE_TX * 2);
if (HTC_TX_BUNDLE_ENABLED(target) && tx_resources &&
hif_get_bus_type(target->hif_dev) ==
QDF_BUS_TYPE_USB) {
if (pEndpoint->service_id ==
WMI_CONTROL_SVC)
tx_resources =
HTC_MAX_MSG_PER_BUNDLE_TX;
else
tx_resources =
(HTC_MAX_MSG_PER_BUNDLE_TX * 2);
}
/* get all the packets for this endpoint that we can for this pass */
get_htc_send_packets(target, pEndpoint, &sendQueue,
tx_resources);