summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--htc/htc.c2
-rw-r--r--htc/htc_internal.h2
-rw-r--r--htc/htc_send.c24
3 files changed, 28 insertions, 0 deletions
diff --git a/htc/htc.c b/htc/htc.c
index 178c530913d5..ef4ce830853d 100644
--- a/htc/htc.c
+++ b/htc/htc.c
@@ -179,6 +179,8 @@ static void htc_cleanup(HTC_TARGET *target)
}
#endif
+ htc_flush_endpoint_txlookupQ(target);
+
qdf_spinlock_destroy(&target->HTCLock);
qdf_spinlock_destroy(&target->HTCRxLock);
qdf_spinlock_destroy(&target->HTCTxLock);
diff --git a/htc/htc_internal.h b/htc/htc_internal.h
index 35f8af1bc38d..a5473e0e5324 100644
--- a/htc/htc_internal.h
+++ b/htc/htc_internal.h
@@ -295,6 +295,8 @@ 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_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
HTC_TX_TAG Tag);
+void htc_flush_endpoint_txlookupQ(HTC_TARGET *target);
+
void htc_recv_init(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);
diff --git a/htc/htc_send.c b/htc/htc_send.c
index c6d80c0949ac..826a38ba4664 100644
--- a/htc/htc_send.c
+++ b/htc/htc_send.c
@@ -2089,6 +2089,30 @@ void htc_flush_endpoint_tx(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint,
UNLOCK_HTC_TX(target);
}
+/* flush endpoint TX Lookup queue */
+void htc_flush_endpoint_txlookupQ(HTC_TARGET *target)
+{
+ int i;
+ HTC_PACKET *pPacket;
+ HTC_ENDPOINT *pEndpoint;
+
+ for (i = 0; i < ENDPOINT_MAX; i++) {
+ pEndpoint = &target->endpoint[i];
+
+ if (!pEndpoint && pEndpoint->service_id == 0)
+ continue;
+
+ while (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxLookupQueue)) {
+ pPacket = htc_packet_dequeue(&pEndpoint->TxLookupQueue);
+
+ if (pPacket) {
+ pPacket->Status = QDF_STATUS_E_CANCELED;
+ send_packet_completion(target, pPacket);
+ }
+ }
+ }
+}
+
/* HTC API to flush an endpoint's TX queue*/
void htc_flush_endpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint,
HTC_TX_TAG Tag)