|
@@ -2983,6 +2983,9 @@ QDF_STATUS wma_resume_req(tp_wma_handle wma, enum qdf_suspend_type type)
|
|
|
|
|
|
wmi_set_runtime_pm_inprogress(wma->wmi_handle, false);
|
|
|
|
|
|
+ if (type == QDF_RUNTIME_SUSPEND)
|
|
|
+ qdf_runtime_pm_allow_suspend(wma->wma_runtime_resume_lock);
|
|
|
+
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -4881,10 +4884,22 @@ void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G,
|
|
|
static QDF_STATUS wma_post_runtime_resume_msg(WMA_HANDLE handle)
|
|
|
{
|
|
|
cds_msg_t resume_msg;
|
|
|
+ QDF_STATUS status;
|
|
|
+ tp_wma_handle wma = (tp_wma_handle) handle;
|
|
|
+
|
|
|
+ qdf_runtime_pm_prevent_suspend(wma->wma_runtime_resume_lock);
|
|
|
|
|
|
resume_msg.bodyptr = NULL;
|
|
|
resume_msg.type = WMA_RUNTIME_PM_RESUME_IND;
|
|
|
- return cds_mq_post_message(QDF_MODULE_ID_WMA, &resume_msg);
|
|
|
+
|
|
|
+ status = cds_mq_post_message(QDF_MODULE_ID_WMA, &resume_msg);
|
|
|
+
|
|
|
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
+ WMA_LOGE("Failed to post Runtime PM Resume IND to VOS");
|
|
|
+ qdf_runtime_pm_allow_suspend(wma->wma_runtime_resume_lock);
|
|
|
+ }
|
|
|
+
|
|
|
+ return status;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -4915,11 +4930,13 @@ static QDF_STATUS wma_post_runtime_suspend_msg(WMA_HANDLE handle)
|
|
|
WMA_TGT_SUSPEND_COMPLETE_TIMEOUT) !=
|
|
|
QDF_STATUS_SUCCESS) {
|
|
|
WMA_LOGE("Failed to get runtime suspend event");
|
|
|
- goto failure;
|
|
|
+ goto msg_timed_out;
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
|
|
|
+msg_timed_out:
|
|
|
+ wma_post_runtime_resume_msg(wma);
|
|
|
failure:
|
|
|
return QDF_STATUS_E_AGAIN;
|
|
|
}
|