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:

committed by
snandini

parent
8868bafb8c
commit
cb30062355
@@ -660,6 +660,8 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
|
|||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
|
||||||
("%s nbuf Map Fail Endpnt %pK\n",
|
("%s nbuf Map Fail Endpnt %pK\n",
|
||||||
__func__, pEndpoint));
|
__func__, pEndpoint));
|
||||||
|
HTC_PACKET_ENQUEUE_TO_HEAD(pPktQueue,
|
||||||
|
pPacket);
|
||||||
status = QDF_STATUS_E_FAILURE;
|
status = QDF_STATUS_E_FAILURE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -706,6 +708,9 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
|
|||||||
("hif_send Failed status:%d\n",
|
("hif_send Failed status:%d\n",
|
||||||
status));
|
status));
|
||||||
}
|
}
|
||||||
|
qdf_nbuf_unmap(target->osdev,
|
||||||
|
GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket),
|
||||||
|
QDF_DMA_TO_DEVICE);
|
||||||
if (!pEndpoint->async_update) {
|
if (!pEndpoint->async_update) {
|
||||||
LOCK_HTC_TX(target);
|
LOCK_HTC_TX(target);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user