diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index d1670136fe..f423ffbba4 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -142,22 +142,6 @@ A_target_id_t hif_get_target_id(struct hif_softc *scn) return scn->mem; } -/** - * hif_set_target_sleep(): hif_set_target_sleep - * @scn: scn - * @sleep_ok: sleep_ok - * @wait_for_it: wait - * - * Return: void - */ -void hif_set_target_sleep(struct hif_opaque_softc *hif_ctx, - bool sleep_ok, bool wait_for_it) -{ - struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); - hif_target_sleep_state_adjust(scn, - sleep_ok, wait_for_it); -} - /** * hif_target_forced_awake(): hif_target_forced_awake * @scn: scn diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index db1ba6967e..8a6e780b24 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -1205,6 +1205,13 @@ void hif_enable_power_management(struct hif_opaque_softc *hif_ctx, if (!is_packet_log_enabled) hif_enable_power_gating(hif_ctx); + + if (!CONFIG_ATH_PCIE_MAX_PERF && + CONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD) { + if (hif_target_sleep_state_adjust(hif_sc, true, false) < 0) + HIF_ERROR("%s, failed to set target to sleep", + __func__); + } } /** diff --git a/htc/htc.c b/htc/htc.c index 07fe5e10ab..365f3aa88e 100644 --- a/htc/htc.c +++ b/htc/htc.c @@ -828,19 +828,6 @@ void *htc_get_targetdef(HTC_HANDLE htc_handle) return hif_get_targetdef(target->hif_dev); } -/** - * htc_set_target_to_sleep() - set target to sleep - * @context: hif_opaque_softc context - * - * Return: none - */ -void htc_set_target_to_sleep(void *context) -{ - struct hif_opaque_softc *scn = (struct hif_opaque_softc *)context; - - hif_set_target_sleep(scn, true, false); -} - /** * htc_cancel_deferred_target_sleep() - cancel deferred target sleep * @context: hif_opaque_softc context diff --git a/htc/htc_api.h b/htc/htc_api.h index 3c282a7bed..f44cd5b6eb 100644 --- a/htc/htc_api.h +++ b/htc/htc_api.h @@ -703,7 +703,6 @@ do { \ void htc_get_control_endpoint_tx_host_credits(HTC_HANDLE HTCHandle, int *credit); void htc_dump_counter_info(HTC_HANDLE HTCHandle); void *htc_get_targetdef(HTC_HANDLE htc_handle); -void htc_set_target_to_sleep(void *context); void htc_cancel_deferred_target_sleep(void *context); int htc_runtime_suspend(void); int htc_runtime_resume(void);