mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
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:
parent
8868bafb8c
commit
cb30062355
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue