diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 5a98aa25ba..6224d11c9e 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1520,7 +1520,11 @@ dp_tx_check_and_flush_hp(struct dp_soc *soc, #ifdef FEATURE_RUNTIME_PM static inline int dp_get_rtpm_tput_policy_requirement(struct dp_soc *soc) { - return qdf_atomic_read(&soc->rtpm_high_tput_flag); + int ret; + + ret = qdf_atomic_read(&soc->rtpm_high_tput_flag) && + (hif_rtpm_get_state() <= HIF_RTPM_STATE_ON); + return ret; } /** * dp_tx_ring_access_end_wrapper() - Wrapper for ring access end diff --git a/hif/inc/hif.h b/hif/inc/hif.h index dfca7f0986..5168d6932d 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -1516,6 +1516,13 @@ int hif_runtime_resume(struct hif_opaque_softc *hif_ctx); * fastpath only applicable to legacy copy engine */ void hif_fastpath_resume(struct hif_opaque_softc *hif_ctx); + +/** + * hif_rtpm_get_state(): get rtpm link state + * + * Return: state + */ +int hif_rtpm_get_state(void); #else static inline QDF_STATUS hif_rtpm_register(uint32_t id, void (*hif_rpm_cbk)(void)) diff --git a/hif/src/hif_runtime_pm.c b/hif/src/hif_runtime_pm.c index d633187c1e..0c78863964 100644 --- a/hif/src/hif_runtime_pm.c +++ b/hif/src/hif_runtime_pm.c @@ -1025,6 +1025,11 @@ void hif_rtpm_set_state(enum hif_rtpm_state state) qdf_atomic_set(&gp_hif_rtpm_ctx->pm_state, state); } +int hif_rtpm_get_state(void) +{ + return qdf_atomic_read(&gp_hif_rtpm_ctx->pm_state); +} + int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx) { if (!hif_can_suspend_link(hif_ctx)) {