Parcourir la source

qcacmn: Do not call get_htc_send_packets if no TX resource

For USB, do not call get_htc_send_packets() in htc_send_data_pkt()
if no TX resource is available.

Change-Id: I17a3dd54c2582620ab2be1e0f6c156904dc52d30
CRs-Fixed: 2412376
Ajit Pal Singh il y a 6 ans
Parent
commit
3fcc082eac
1 fichiers modifiés avec 15 ajouts et 15 suppressions
  1. 15 15
      htc/htc_send.c

+ 15 - 15
htc/htc_send.c

@@ -1704,23 +1704,23 @@ QDF_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket,
 	}
 
 	else if (HTC_TX_BUNDLE_ENABLED(target)) {
-
-		if ((hif_get_bus_type(target->hif_dev) == QDF_BUS_TYPE_USB) &&
-			hif_get_free_queue_number(target->hif_dev,
-						pEndpoint->UL_PipeID)) {
-			/*
-			 * Header and payload belongs to the different fragments
-			 * and consume 2 resource for one HTC package but USB
-			 * combine into one transfer.
-			 */
-			get_htc_send_packets(target, pEndpoint, &sendQueue,
-				(HTC_MAX_MSG_PER_BUNDLE_TX * 2));
+		if (hif_get_bus_type(target->hif_dev) == QDF_BUS_TYPE_USB) {
+			if (hif_get_free_queue_number(target->hif_dev,
+						      pEndpoint->UL_PipeID))
+				/*
+				 * Header and payload belongs to the different
+				 * fragments and consume 2 resource for one HTC
+				 * package but USB combine into one transfer.
+				 */
+				get_htc_send_packets(target, pEndpoint,
+						     &sendQueue,
+						     HTC_MAX_MSG_PER_BUNDLE_TX
+						     * 2);
 		} else {
-		/* Dequeue max packets from endpoint tx queue */
-		get_htc_send_packets(target, pEndpoint, &sendQueue,
-				     HTC_MAX_TX_BUNDLE_SEND_LIMIT);
+			/* Dequeue max packets from endpoint tx queue */
+			get_htc_send_packets(target, pEndpoint, &sendQueue,
+					     HTC_MAX_TX_BUNDLE_SEND_LIMIT);
 		}
-
 		UNLOCK_HTC_TX(target);
 	} else {
 		/*