int ath10k_core_target_suspend(struct ath10k *ar) { int ret; ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__); ret = ath10k_wmi_pdev_suspend_target(ar); if (ret) ath10k_warn("could not suspend target (%d)\n", ret); return ret; }
int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt) { int ret; reinit_completion(&ar->target_suspend); ret = ath10k_wmi_pdev_suspend_target(ar, suspend_opt); if (ret) { ath10k_warn(ar, "could not suspend target (%d)\n", ret); return ret; } ret = wait_for_completion_timeout(&ar->target_suspend, 1 * HZ); if (ret == 0) { ath10k_warn(ar, "suspend timed out - target pause event never came\n"); return -ETIMEDOUT; } return 0; }