diff options
| author | Houston Hoffman <hhoffman@codeaurora.org> | 2017-05-03 15:43:36 -0700 |
|---|---|---|
| committer | Houston Hoffman <hhoffman@codeaurora.org> | 2017-05-03 17:27:28 -0700 |
| commit | 68cf2a193cd1ab56cd959b0dec2bdb5d6b3cec77 (patch) | |
| tree | b65542599663715226ae872d8a8b9a8d20acbb8b | |
| parent | 134ba465ac8d61719d9119a5000cb36686fa1609 (diff) | |
qcacmn: Ensure ce_write_index update is protected in ce_send_fast
If the index writes go out of sequence, hw thinks the whole ring
is posted. Need to protect the register write with the ce_index_lock
to ensure proper ordering.
Change-Id: I43a0cefe47af4fd1a3cc61092db849e5fe077588
CRs-Fixed: 2042167
| -rw-r--r-- | hif/src/ce/ce_service.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c index 4a04b4266776..1c3da6605d22 100644 --- a/hif/src/ce/ce_service.c +++ b/hif/src/ce/ce_service.c @@ -722,13 +722,6 @@ int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t msdu, } src_ring->write_index = write_index; - qdf_spin_unlock_bh(&ce_state->ce_index_lock); - - DPTRACE(qdf_dp_trace(msdu, - QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD, - qdf_nbuf_data_addr(msdu), - sizeof(qdf_nbuf_data(msdu)), QDF_TX)); - if (hif_pm_runtime_get(hif_hdl) == 0) { if (qdf_likely(ce_state->state == CE_RUNNING)) { type = FAST_TX_WRITE_INDEX_UPDATE; @@ -738,6 +731,14 @@ int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t msdu, ce_state->state = CE_PENDING; hif_pm_runtime_put(hif_hdl); } + qdf_spin_unlock_bh(&ce_state->ce_index_lock); + + DPTRACE(qdf_dp_trace(msdu, + QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD, + qdf_nbuf_data_addr(msdu), + sizeof(qdf_nbuf_data(msdu)), QDF_TX)); + + hif_record_ce_desc_event(scn, ce_state->id, type, NULL, NULL, write_index); |
