Explorar o código

qcacmn: Set FIXUP_NBUF flag only on successful nbuf map

In the scenario where nbuf_map fails during packet
send in htc_issue_packets, restore_tx_packet done
as part of cleanup, does nbuf unmap even though map
failed.

Fix is to set the fixup_netbuf flag only if nbuf map
is successful.

Change-Id: I642eff15792a7e374434e5a7a05ad546af376b3a
CRs-Fixed: 2625765
Yeshwanth Sriram Guntuka %!s(int64=5) %!d(string=hai) anos
pai
achega
e71aeae1bd
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      htc/htc_send.c

+ 2 - 3
htc/htc_send.c

@@ -795,9 +795,6 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
 			 * frames, since data frames were already mapped as they
 			 * entered into the driver.
 			 */
-			pPacket->PktInfo.AsTx.Flags |=
-				HTC_TX_PACKET_FLAG_FIXUP_NETBUF;
-
 			ret = qdf_nbuf_map(target->osdev,
 				GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket),
 				QDF_DMA_TO_DEVICE);
@@ -809,6 +806,8 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
 				status = QDF_STATUS_E_FAILURE;
 				break;
 			}
+			pPacket->PktInfo.AsTx.Flags |=
+				HTC_TX_PACKET_FLAG_FIXUP_NETBUF;
 		}
 
 		if (!pEndpoint->async_update) {