diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index ab363d7e35..ffcb1bd344 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -3048,6 +3048,22 @@ void dp_tx_nawds_handler(struct dp_soc *soc, struct dp_vdev *vdev, qdf_spin_unlock_bh(&vdev->peer_list_lock); } +#ifdef QCA_DP_TX_NBUF_AND_NBUF_DATA_PREFETCH +static inline +void dp_tx_prefetch_nbuf_data(qdf_nbuf_t nbuf) +{ + if (nbuf) { + qdf_prefetch(&nbuf->len); + qdf_prefetch(&nbuf->data); + } +} +#else +static inline +void dp_tx_prefetch_nbuf_data(qdf_nbuf_t nbuf) +{ +} +#endif + /** * dp_tx_send() - Transmit a frame on a given VAP * @soc: DP soc handle @@ -3200,6 +3216,7 @@ qdf_nbuf_t dp_tx_send(struct cdp_soc_t *soc_hdl, uint8_t vdev_id, * prepare direct-buffer type TCL descriptor and enqueue to TCL * SRNG. There is no need to setup a MSDU extension descriptor. */ + dp_tx_prefetch_nbuf_data(nbuf); nbuf = dp_tx_send_msdu_single(vdev, nbuf, &msdu_info, peer_id, NULL); return nbuf; diff --git a/dp/wifi3.0/dp_tx_desc.h b/dp/wifi3.0/dp_tx_desc.h index 1eaf8d506a..80da59c87b 100644 --- a/dp/wifi3.0/dp_tx_desc.h +++ b/dp/wifi3.0/dp_tx_desc.h @@ -637,6 +637,20 @@ static inline void dp_tx_flow_pool_unmap_handler(struct dp_pdev *pdev, { } +#ifdef QCA_DP_TX_HW_SW_NBUF_DESC_PREFETCH +static inline +void dp_tx_prefetch_desc(struct dp_tx_desc_s *tx_desc) +{ + if (tx_desc) + prefetch(tx_desc); +} +#else +static inline +void dp_tx_prefetch_desc(struct dp_tx_desc_s *tx_desc) +{ +} +#endif + /** * dp_tx_desc_alloc() - Allocate a Software Tx Descriptor from given pool * @@ -664,6 +678,7 @@ static inline struct dp_tx_desc_s *dp_tx_desc_alloc(struct dp_soc *soc, pool->freelist = pool->freelist->next; pool->num_allocated++; pool->num_free--; + dp_tx_prefetch_desc(pool->freelist); tx_desc->flags = DP_TX_DESC_FLAG_ALLOCATED;