From ea4b2e080af7d7634773b51bb9b4a777190e93a6 Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Thu, 19 Nov 2015 18:21:15 +0530 Subject: [PATCH] qcacld-3.0: Do not lock to free all packets to avoid watchdog bark Propagation from qcacld-2.0 to qcacld-3.0 Do not take single lock to free all TLSHIM packets to avoid watchdog bark during driver unload. CRs-Fixed: 934555 Change-Id: Iebfb449bd8174bc27207d33073c84a8f11d6e490 --- core/cds/src/cds_sched.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index 873555d5d21c..9e6d746f8f33 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -600,11 +600,12 @@ static int cds_mc_thread(void *Arg) */ void cds_free_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext) { - struct cds_ol_rx_pkt *pkt, *tmp; + struct cds_ol_rx_pkt *pkt; spin_lock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); - list_for_each_entry_safe(pkt, tmp, &pSchedContext->cds_ol_rx_pkt_freeq, - list) { + while (!list_empty(&pSchedContext->cds_ol_rx_pkt_freeq)) { + pkt = list_entry((&pSchedContext->cds_ol_rx_pkt_freeq)->next, + typeof(*pkt), list); list_del(&pkt->list); spin_unlock_bh(&pSchedContext->cds_ol_rx_pkt_freeq_lock); cdf_mem_free(pkt);