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
This commit is contained in:
Manjunathappa Prakash
2017-11-30 18:19:32 -08:00
committed by snandini
vanhempi 8868bafb8c
commit cb30062355

Näytä tiedosto

@@ -660,6 +660,8 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
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 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
("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);
}