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:
@@ -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)
|
||||
|
Fai riferimento in un nuovo problema
Block a user