qcacmn: Record few more ce desc event during post_recv_buffers

CE events are not recorded during nbuf allocation and
nbuf map done in hif_post_recv_buffers_for_pipe.

Add few more events to be recorded to know the exact
time when nbuf allocation and map is done with respect
to rx_desc_completion and rx_post_desc events.

Change-Id: Ia2a3ea61dc99dd21d06b442ef00cd25550f4cb5a
CRs-Fixed: 2541986
This commit is contained in:
Yeshwanth Sriram Guntuka
2019-10-16 15:29:28 +05:30
committed by nshrivas
parent 87f0d59b90
commit 2a7ed0abd3
2 changed files with 18 additions and 1 deletions

View File

@@ -2410,6 +2410,7 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
struct hif_softc *scn = HIF_GET_SOFTC(pipe_info->HIF_CE_state);
QDF_STATUS status;
uint32_t bufs_posted = 0;
unsigned int ce_id;
buf_sz = pipe_info->buf_sz;
if (buf_sz == 0) {
@@ -2418,6 +2419,7 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
}
ce_hdl = pipe_info->ce_hdl;
ce_id = ((struct CE_state *)ce_hdl)->id;
qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock);
while (atomic_read(&pipe_info->recv_bufs_needed) > 0) {
@@ -2427,6 +2429,9 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
atomic_dec(&pipe_info->recv_bufs_needed);
qdf_spin_unlock_bh(&pipe_info->recv_bufs_needed_lock);
hif_record_ce_desc_event(scn, ce_id,
HIF_RX_DESC_PRE_NBUF_ALLOC, NULL, NULL,
0, 0);
nbuf = qdf_nbuf_alloc(scn->qdf_dev, buf_sz, 0, 4, false);
if (!nbuf) {
hif_post_recv_buffers_failure(pipe_info, nbuf,
@@ -2436,6 +2441,9 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
return QDF_STATUS_E_NOMEM;
}
hif_record_ce_desc_event(scn, ce_id,
HIF_RX_DESC_PRE_NBUF_MAP, NULL, nbuf,
0, 0);
/*
* qdf_nbuf_peek_header(nbuf, &data, &unused);
* CE_data = dma_map_single(dev, data, buf_sz, );
@@ -2454,7 +2462,9 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info)
}
CE_data = qdf_nbuf_get_frag_paddr(nbuf, 0);
hif_record_ce_desc_event(scn, ce_id,
HIF_RX_DESC_POST_NBUF_MAP, NULL, nbuf,
0, 0);
qdf_mem_dma_sync_single_for_device(scn->qdf_dev, CE_data,
buf_sz, DMA_FROM_DEVICE);
status = ce_recv_buf_enqueue(ce_hdl, (void *)nbuf, CE_data);