qcacmn: Flush TxLookupQueue for ENDPOINT_0 during htc_cleanup

When driver unload is triggered, check_for_leaks complains,
saying it finds pending entries in TxLookupQueue of ENDPOINT_0.

Flush pending entries in TxLookupQueue for ENDPOINT_0 during htc_cleanup.

Change-Id: Ica661453d5cef283526cfa1e7267d5349b5e2310
CRs-Fixed: 2249980
This commit is contained in:
Alok Kumar
2018-05-30 13:07:13 +05:30
committato da nshrivas
parent 09ec6f98d0
commit 9bd8152057
3 ha cambiato i file con 27 aggiunte e 0 eliminazioni

Vedi File

@@ -2058,6 +2058,28 @@ void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
UNLOCK_HTC_TX(target);
}
/* flush pending entries in endpoint TX Lookup queue */
void htc_flush_endpoint_txlookupQ(HTC_TARGET *target,
HTC_ENDPOINT_ID endpoint_id)
{
HTC_PACKET *packet;
HTC_ENDPOINT *endpoint;
endpoint = &target->endpoint[endpoint_id];
if (!endpoint && endpoint->service_id == 0)
return;
while (HTC_PACKET_QUEUE_DEPTH(&endpoint->TxLookupQueue)) {
packet = htc_packet_dequeue(&endpoint->TxLookupQueue);
if (packet) {
packet->Status = QDF_STATUS_E_CANCELED;
send_packet_completion(target, packet);
}
}
}
/* HTC API to flush an endpoint's TX queue*/
void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
HTC_TX_TAG Tag)