summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCNSS_WLAN Service <cnssbldsw@qualcomm.com>2017-06-08 04:18:54 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-08 04:18:54 -0700
commitd2da90a7f1b41930f45643b03cd84efb5d1a7340 (patch)
tree2a9b3dcf6f2442d7217a577838257d8816d7a842
parent3009d5eedd831dfd28e83f63bc9b4e03019376b7 (diff)
parented268b7b2407c396850251f4dc989c58deeebec9 (diff)
Merge "qcacld-2.0: Fix the TX packet drop after doing the TX bundle" into wlan-cld2.driver.lnx.1.0-dev
-rw-r--r--CORE/SERVICES/HTC/htc_send.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/CORE/SERVICES/HTC/htc_send.c b/CORE/SERVICES/HTC/htc_send.c
index 508e4f43d3ab..f416f6bdd95f 100644
--- a/CORE/SERVICES/HTC/htc_send.c
+++ b/CORE/SERVICES/HTC/htc_send.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -482,13 +482,18 @@ static void HTCIssuePacketsBundle(HTC_TARGET *target,
/* send out previous buffer */
HTCSendBundledNetbuf(target, pEndpoint,
pBundleBuffer - last_creditPad, pPacketTx);
- if (HTC_PACKET_QUEUE_DEPTH(pPktQueue) < HTC_MIN_MSG_PER_BUNDLE){
+ /* One packet has been dequeued from sending queue when enter
+ * this loop, so need to add 1 back for this checking.
+ */
+ if ((HTC_PACKET_QUEUE_DEPTH(pPktQueue) + 1) < HTC_MIN_MSG_PER_BUNDLE){
+ HTC_PACKET_ENQUEUE_TO_HEAD(pPktQueue, pPacket);
return;
}
bundlesSpaceRemaining = HTC_MAX_MSG_PER_BUNDLE_TX * pEndpoint->TxCreditSize;
pPacketTx = AllocateHTCBundleTxPacket(target);
if (!pPacketTx)
{
+ HTC_PACKET_ENQUEUE_TO_HEAD(pPktQueue, pPacket);
//good time to panic
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AllocateHTCBundleTxPacket failed \n"));
AR_DEBUG_ASSERT(FALSE);