qcacmn: Handle CE send completions in polling mode

When polling mode is enabled, send completions for a
CE(host->target, ULpipe) for a particular service(WMI/HTC/HTT) are handled
only when recv happens in CE(target->host, DLpipe) for the same service.

Since for services like WMI there are multiple ULpipes(Eg. CE3 for
WMI<WMAC1> and CE7 for WMI<WMAC2>) and single DLpipe(CE2). Receive on a
DLpipe is the right time to poll for send completions on all ULpipes for
that service.

Change-Id: Ie2ac30d3db1bc85c888d714b782a894539e399ff
This commit is contained in:
Padma Raghunathan
2019-02-19 09:50:03 +05:30
gecommit door nshrivas
bovenliggende c572f5f517
commit 2d61d53e44

Bestand weergeven

@@ -241,11 +241,12 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
HTC_TARGET *target = (HTC_TARGET *) Context;
uint8_t *netdata;
uint32_t netlen;
HTC_ENDPOINT *pEndpoint;
HTC_ENDPOINT *pEndpoint, *currendpoint;
HTC_PACKET *pPacket;
uint16_t payloadLen;
uint32_t trailerlen = 0;
uint8_t htc_ep_id;
int i;
#ifdef HTC_MSG_WAKEUP_FROM_SUSPEND_ID
struct htc_init_info *info;
#endif
@@ -305,8 +306,17 @@ QDF_STATUS htc_rx_completion_handler(void *Context, qdf_nbuf_t netbuf,
* than interrupt driven, this is a good point to ask HIF to
* check whether it has any completed sends to handle.
*/
if (pEndpoint->ul_is_polled)
htc_send_complete_check(pEndpoint, 1);
if (pEndpoint->ul_is_polled) {
for (i = 0; i < ENDPOINT_MAX; i++) {
currendpoint = &target->endpoint[i];
if ((currendpoint->DL_PipeID ==
pEndpoint->DL_PipeID) &&
currendpoint->ul_is_polled) {
htc_send_complete_check(currendpoint,
1);
}
}
}
payloadLen = HTC_GET_FIELD(HtcHdr, HTC_FRAME_HDR, PAYLOADLEN);