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:
@@ -187,6 +187,8 @@ static void htc_cleanup(HTC_TARGET *target)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
htc_flush_endpoint_txlookupQ(target, ENDPOINT_0);
|
||||||
|
|
||||||
qdf_spinlock_destroy(&target->HTCLock);
|
qdf_spinlock_destroy(&target->HTCLock);
|
||||||
qdf_spinlock_destroy(&target->HTCRxLock);
|
qdf_spinlock_destroy(&target->HTCRxLock);
|
||||||
qdf_spinlock_destroy(&target->HTCTxLock);
|
qdf_spinlock_destroy(&target->HTCTxLock);
|
||||||
|
@@ -296,6 +296,9 @@ void free_htc_packet_container(HTC_TARGET *target, HTC_PACKET *pPacket);
|
|||||||
void htc_flush_rx_hold_queue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint);
|
void htc_flush_rx_hold_queue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint);
|
||||||
void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
|
void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
|
||||||
HTC_TX_TAG Tag);
|
HTC_TX_TAG Tag);
|
||||||
|
void htc_flush_endpoint_txlookupQ(HTC_TARGET *target,
|
||||||
|
HTC_ENDPOINT_ID endpoint_id);
|
||||||
|
|
||||||
void htc_recv_init(HTC_TARGET *target);
|
void htc_recv_init(HTC_TARGET *target);
|
||||||
QDF_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target);
|
QDF_STATUS htc_wait_recv_ctrl_message(HTC_TARGET *target);
|
||||||
void htc_free_control_tx_packet(HTC_TARGET *target, HTC_PACKET *pPacket);
|
void htc_free_control_tx_packet(HTC_TARGET *target, HTC_PACKET *pPacket);
|
||||||
|
@@ -2058,6 +2058,28 @@ void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
|
|||||||
UNLOCK_HTC_TX(target);
|
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*/
|
/* HTC API to flush an endpoint's TX queue*/
|
||||||
void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
|
void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
|
||||||
HTC_TX_TAG Tag)
|
HTC_TX_TAG Tag)
|
||||||
|
Reference in New Issue
Block a user