From 5e2539c08734a308018d8d5506240518090cabb9 Mon Sep 17 00:00:00 2001 From: Debasis Das Date: Fri, 16 Nov 2018 14:43:26 +0530 Subject: [PATCH] qcacmn: Protect TxLookupqueue while flushing The htc TxLookupQueue needs to be protected with relevant lock while flushing. Change-Id: Ib6c8878c024ef623dfb63ca0745d41b140f2b1c3 --- htc/htc_send.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htc/htc_send.c b/htc/htc_send.c index f2930bbd72f3..a1c41b9822c3 100644 --- a/htc/htc_send.c +++ b/htc/htc_send.c @@ -2080,6 +2080,7 @@ void htc_flush_endpoint_txlookupQ(HTC_TARGET *target, if (!endpoint && endpoint->service_id == 0) return; + LOCK_HTC_TX(target); while (HTC_PACKET_QUEUE_DEPTH(&endpoint->TxLookupQueue)) { packet = htc_packet_dequeue(&endpoint->TxLookupQueue); @@ -2092,6 +2093,7 @@ void htc_flush_endpoint_txlookupQ(HTC_TARGET *target, } } } + UNLOCK_HTC_TX(target); } /* HTC API to flush an endpoint's TX queue*/