mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Add support for silent recovery in cds_trigger_recovery()
qcacld-2.0 to qcacld-3.0 propagation Currently, cds_trigger_recovery does not support silent recovery instead host send WMI_FORCE_FW_HANG_CMDID and wait for timeout. In cases where wmi cmd cannot be sent to firmware, host needs silent recovery. As a part of this fix, Parameterize the cds_trigger_recovery function for silent recovery. Change-Id: I9bb631f7346a267a10348037c49606af43c6be4f CRs-Fixed: 1053303
This commit is contained in:
parent
ec402065db
commit
b7b575b41b
5 changed files with 40 additions and 21 deletions
|
|
@ -239,7 +239,7 @@ bool cds_is_packet_log_enabled(void);
|
|||
|
||||
uint64_t cds_get_monotonic_boottime(void);
|
||||
|
||||
void cds_trigger_recovery(void);
|
||||
void cds_trigger_recovery(bool);
|
||||
|
||||
void cds_set_wakelock_logging(bool value);
|
||||
bool cds_is_wakelock_enabled(void);
|
||||
|
|
|
|||
|
|
@ -1547,11 +1547,32 @@ bool cds_is_packet_log_enabled(void)
|
|||
}
|
||||
|
||||
/**
|
||||
* cds_trigger_recovery() - trigger self recovery
|
||||
* cds_config_recovery_work() - configure self recovery
|
||||
* @qdf_ctx: pointer of qdf context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void cds_trigger_recovery(void)
|
||||
|
||||
void cds_config_recovery_work(qdf_device_t qdf_ctx)
|
||||
{
|
||||
if (cds_is_driver_recovering()) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"Recovery is in progress, ignore!");
|
||||
} else {
|
||||
cds_set_recovery_in_progress(true);
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"schedule recovery work!");
|
||||
pld_schedule_recovery_work(qdf_ctx->dev);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* cds_trigger_recovery() - trigger self recovery
|
||||
* @skip_crash_inject: Boolean value to skip to send crash inject cmd
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void cds_trigger_recovery(bool skip_crash_inject)
|
||||
{
|
||||
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
|
@ -1573,21 +1594,19 @@ void cds_trigger_recovery(void)
|
|||
|
||||
qdf_runtime_pm_prevent_suspend(recovery_lock);
|
||||
|
||||
wma_crash_inject(wma_handle, RECOVERY_SIM_SELF_RECOVERY, 0);
|
||||
if (!skip_crash_inject) {
|
||||
|
||||
status = qdf_wait_single_event(&wma_handle->recovery_event,
|
||||
WMA_CRASH_INJECT_TIMEOUT);
|
||||
wma_crash_inject(wma_handle, RECOVERY_SIM_SELF_RECOVERY, 0);
|
||||
status = qdf_wait_single_event(&wma_handle->recovery_event,
|
||||
WMA_CRASH_INJECT_TIMEOUT);
|
||||
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"CRASH_INJECT command is timed out!");
|
||||
if (cds_is_driver_recovering()) {
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
|
||||
"Recovery is in progress, ignore!");
|
||||
} else {
|
||||
cds_set_recovery_in_progress(true);
|
||||
pld_schedule_recovery_work(qdf_ctx->dev);
|
||||
"CRASH_INJECT command is timed out!");
|
||||
cds_config_recovery_work(qdf_ctx);
|
||||
}
|
||||
} else {
|
||||
cds_config_recovery_work(qdf_ctx);
|
||||
}
|
||||
|
||||
qdf_runtime_pm_allow_suspend(recovery_lock);
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac)
|
|||
false,
|
||||
pMac->sme.enableSelfRecovery ? true : false);
|
||||
else if (pMac->sme.enableSelfRecovery)
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
else
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
|
@ -11830,7 +11830,7 @@ void active_list_cmd_timeout_handle(void *userData)
|
|||
|
||||
if (mac_ctx->sme.enableSelfRecovery) {
|
||||
sme_save_active_cmd_stats(hal);
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
} else {
|
||||
if (!mac_ctx->roam.configParam.enable_fatal_event &&
|
||||
!(cds_is_load_or_unload_in_progress() ||
|
||||
|
|
|
|||
|
|
@ -726,7 +726,7 @@ void send_flush_completion_to_user(void)
|
|||
wlan_report_log_completion(is_fatal, indicator, reason_code);
|
||||
|
||||
if (recovery_needed)
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3888,7 +3888,7 @@ QDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle)
|
|||
wmi_set_target_suspend(wma->wmi_handle, false);
|
||||
if (!cds_is_driver_recovering()) {
|
||||
if (pMac->sme.enableSelfRecovery) {
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
} else {
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
|
@ -4613,7 +4613,7 @@ static QDF_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
|
|||
wmi_get_host_credits(wma->wmi_handle));
|
||||
if (!cds_is_driver_recovering()) {
|
||||
if (pMac->sme.enableSelfRecovery) {
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
} else {
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
|
@ -6552,7 +6552,7 @@ static inline void wma_suspend_target_timeout(bool is_self_recovery_enabled)
|
|||
WMA_LOGE("%s: recovery is in progress, ignore!", __func__);
|
||||
} else {
|
||||
if (is_self_recovery_enabled) {
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
} else {
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
|
@ -6566,7 +6566,7 @@ static inline void wma_suspend_target_timeout(bool is_self_recovery_enabled)
|
|||
__func__);
|
||||
} else {
|
||||
if (is_self_recovery_enabled) {
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
} else {
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
|
@ -6742,7 +6742,7 @@ QDF_STATUS wma_resume_target(WMA_HANDLE handle)
|
|||
wmi_get_host_credits(wma->wmi_handle));
|
||||
if (!cds_is_driver_recovering()) {
|
||||
if (pMac->sme.enableSelfRecovery) {
|
||||
cds_trigger_recovery();
|
||||
cds_trigger_recovery(false);
|
||||
} else {
|
||||
QDF_BUG(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue