diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 5c65ee6c96..7420e8c2cb 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1205,7 +1205,7 @@ static QDF_STATUS dp_tx_hw_enqueue(struct dp_soc *soc, struct dp_vdev *vdev, hal_ring_hdl = dp_tx_get_hal_ring_hdl(soc, ring_id); - if (qdf_unlikely(hal_srng_access_start(soc->hal_soc, hal_ring_hdl))) { + if (qdf_unlikely(dp_tx_hal_ring_access_start(soc, hal_ring_hdl))) { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, "%s %d : HAL RING Access Failed -- %pK", __func__, __LINE__, hal_ring_hdl); @@ -1233,11 +1233,11 @@ static QDF_STATUS dp_tx_hw_enqueue(struct dp_soc *soc, struct dp_vdev *vdev, ring_access_fail: if (hif_pm_runtime_get(soc->hif_handle, RTPM_ID_DW_TX_HW_ENQUEUE) == 0) { - hal_srng_access_end(soc->hal_soc, hal_ring_hdl); + dp_tx_hal_ring_access_end(soc, hal_ring_hdl); hif_pm_runtime_put(soc->hif_handle, RTPM_ID_DW_TX_HW_ENQUEUE); } else { - hal_srng_access_end_reap(soc->hal_soc, hal_ring_hdl); + dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl); } return status; diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index 8d769f01f7..1850ec624b 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -378,6 +378,68 @@ static inline uint8_t dp_tx_get_rbm_id(struct dp_soc *soc, return (ring_id + HAL_WBM_SW0_BM_ID); } #endif + +#ifdef QCA_OL_TX_LOCK_LESS_ACCESS +/* + * dp_tx_hal_ring_access_start()- hal_tx_ring access for data transmission + * @dp_soc - DP soc structure pointer + * @hal_ring_hdl - HAL ring handle + * + * Return - None + */ +static inline int dp_tx_hal_ring_access_start(struct dp_soc *soc, + hal_ring_handle_t hal_ring_hdl) +{ + return hal_srng_access_start_unlocked(soc->hal_soc, hal_ring_hdl); +} + +/* + * dp_tx_hal_ring_access_end()- hal_tx_ring access for data transmission + * @dp_soc - DP soc structure pointer + * @hal_ring_hdl - HAL ring handle + * + * Return - None + */ +static inline void dp_tx_hal_ring_access_end(struct dp_soc *soc, + hal_ring_handle_t hal_ring_hdl) +{ + hal_srng_access_end_unlocked(soc->hal_soc, hal_ring_hdl); +} + +/* + * dp_tx_hal_ring_access_reap()- hal_tx_ring access for data transmission + * @dp_soc - DP soc structure pointer + * @hal_ring_hdl - HAL ring handle + * + * Return - None + */ +static inline void dp_tx_hal_ring_access_end_reap(struct dp_soc *soc, + hal_ring_handle_t + hal_ring_hdl) +{ +} + +#else +static inline int dp_tx_hal_ring_access_start(struct dp_soc *soc, + hal_ring_handle_t hal_ring_hdl) +{ + return hal_srng_access_start(soc->hal_soc, hal_ring_hdl); +} + +static inline void dp_tx_hal_ring_access_end(struct dp_soc *soc, + hal_ring_handle_t hal_ring_hdl) +{ + hal_srng_access_end(soc->hal_soc, hal_ring_hdl); +} + +static inline void dp_tx_hal_ring_access_end_reap(struct dp_soc *soc, + hal_ring_handle_t + hal_ring_hdl) +{ + hal_srng_access_end_reap(soc->hal_soc, hal_ring_hdl); +} +#endif + #ifdef FEATURE_PERPKT_INFO QDF_STATUS dp_get_completion_indication_for_stack(struct dp_soc *soc,