qcacmn: enqueue back dequeued packet if mmap fails

In htc_issue_packet takecare to enqueue back the dequeued packet.
Otherwise we will be leaking the packet.
Also takecare to unmap the mapped netbuf if we fail to send.

Change-Id: I48dbe537ae5b0fe89785f4309325c7089b2ace56
CRs-Fixed: 2151122
diff --git a/htc/htc_send.c b/htc/htc_send.c
index ff3dc3d..2f3470d 100644
--- a/htc/htc_send.c
+++ b/htc/htc_send.c
@@ -660,6 +660,8 @@
 					AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
 						("%s nbuf Map Fail Endpnt %pK\n",
 						__func__, pEndpoint));
+					HTC_PACKET_ENQUEUE_TO_HEAD(pPktQueue,
+								   pPacket);
 					status = QDF_STATUS_E_FAILURE;
 					break;
 				}
@@ -706,6 +708,9 @@
 						("hif_send Failed status:%d\n",
 						 status));
 			}
+			qdf_nbuf_unmap(target->osdev,
+				GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket),
+				QDF_DMA_TO_DEVICE);
 			if (!pEndpoint->async_update) {
 				LOCK_HTC_TX(target);
 			}