|
@@ -1021,6 +1021,11 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|
hal_soc_handle_t hal_soc = soc->hal_soc;
|
|
hal_soc_handle_t hal_soc = soc->hal_soc;
|
|
hal_ring_handle_t hal_ring_hdl =
|
|
hal_ring_handle_t hal_ring_hdl =
|
|
be_soc->ppeds_wbm_release_ring.hal_srng;
|
|
be_soc->ppeds_wbm_release_ring.hal_srng;
|
|
|
|
+ struct dp_txrx_peer *txrx_peer = NULL;
|
|
|
|
+ uint16_t peer_id = CDP_INVALID_PEER;
|
|
|
|
+ dp_txrx_ref_handle txrx_ref_handle = NULL;
|
|
|
|
+ struct dp_vdev *vdev = NULL;
|
|
|
|
+ struct dp_pdev *pdev = NULL;
|
|
|
|
|
|
if (qdf_unlikely(dp_srng_access_start(NULL, soc, hal_ring_hdl))) {
|
|
if (qdf_unlikely(dp_srng_access_start(NULL, soc, hal_ring_hdl))) {
|
|
dp_err("HAL RING Access Failed -- %pK", hal_ring_hdl);
|
|
dp_err("HAL RING Access Failed -- %pK", hal_ring_hdl);
|
|
@@ -1081,6 +1086,50 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|
tx_desc->tx_status =
|
|
tx_desc->tx_status =
|
|
hal_tx_comp_get_tx_status(tx_comp_hal_desc);
|
|
hal_tx_comp_get_tx_status(tx_comp_hal_desc);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Add desc sync to account for extended statistics
|
|
|
|
+ * during Tx completion.
|
|
|
|
+ */
|
|
|
|
+ if (peer_id != tx_desc->peer_id) {
|
|
|
|
+ if (txrx_peer) {
|
|
|
|
+ dp_txrx_peer_unref_delete(txrx_ref_handle,
|
|
|
|
+ DP_MOD_ID_TX_COMP);
|
|
|
|
+ txrx_peer = NULL;
|
|
|
|
+ vdev = NULL;
|
|
|
|
+ pdev = NULL;
|
|
|
|
+ }
|
|
|
|
+ peer_id = tx_desc->peer_id;
|
|
|
|
+ txrx_peer =
|
|
|
|
+ dp_txrx_peer_get_ref_by_id(soc, peer_id,
|
|
|
|
+ &txrx_ref_handle,
|
|
|
|
+ DP_MOD_ID_TX_COMP);
|
|
|
|
+ if (txrx_peer) {
|
|
|
|
+ vdev = txrx_peer->vdev;
|
|
|
|
+ if (!vdev)
|
|
|
|
+ goto next_desc;
|
|
|
|
+
|
|
|
|
+ pdev = vdev->pdev;
|
|
|
|
+ if (!pdev)
|
|
|
|
+ goto next_desc;
|
|
|
|
+
|
|
|
|
+ dp_tx_desc_update_fast_comp_flag(soc,
|
|
|
|
+ tx_desc,
|
|
|
|
+ !pdev->enhanced_stats_en);
|
|
|
|
+ if (pdev->enhanced_stats_en) {
|
|
|
|
+ hal_tx_comp_desc_sync(tx_comp_hal_desc,
|
|
|
|
+ &tx_desc->comp, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else if (txrx_peer && vdev && pdev) {
|
|
|
|
+ dp_tx_desc_update_fast_comp_flag(soc,
|
|
|
|
+ tx_desc,
|
|
|
|
+ !pdev->enhanced_stats_en);
|
|
|
|
+ if (pdev->enhanced_stats_en) {
|
|
|
|
+ hal_tx_comp_desc_sync(tx_comp_hal_desc,
|
|
|
|
+ &tx_desc->comp, 1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+next_desc:
|
|
if (!head_desc) {
|
|
if (!head_desc) {
|
|
head_desc = tx_desc;
|
|
head_desc = tx_desc;
|
|
tail_desc = tx_desc;
|
|
tail_desc = tx_desc;
|
|
@@ -1102,6 +1151,9 @@ int dp_ppeds_tx_comp_handler(struct dp_soc_be *be_soc, uint32_t quota)
|
|
|
|
|
|
dp_srng_access_end(NULL, soc, hal_ring_hdl);
|
|
dp_srng_access_end(NULL, soc, hal_ring_hdl);
|
|
|
|
|
|
|
|
+ if (txrx_peer)
|
|
|
|
+ dp_txrx_peer_unref_delete(txrx_ref_handle,
|
|
|
|
+ DP_MOD_ID_TX_COMP);
|
|
if (head_desc)
|
|
if (head_desc)
|
|
dp_tx_comp_process_desc_list(soc, head_desc,
|
|
dp_tx_comp_process_desc_list(soc, head_desc,
|
|
CDP_MAX_TX_COMP_PPE_RING);
|
|
CDP_MAX_TX_COMP_PPE_RING);
|