qcacmn: Add support for self recovery in target_if

Add support to trigger self recovery in case
of vdev request timeout, as when host is asserted
fw dumps are not collected

Change-Id: I534ada61b114f5b96ecfae1ff27d692ee496edba
CRs-Fixed: 2496796
此提交包含在:
Naga
2019-07-30 10:32:23 +05:30
提交者 nshrivas
父節點 7c974c29d3
當前提交 004bb25c0b
共有 2 個檔案被更改,包括 31 行新增16 行删除

查看文件

@@ -28,16 +28,28 @@
#include <wmi_unified_param.h>
#include <wlan_objmgr_psoc_obj.h>
#include <wlan_lmac_if_def.h>
#include <qdf_platform.h>
/**
* target_if_vdev_mgr_is_driver_unloading: API to driver unload status
* target_if_vdev_mgr_is_panic_allowed: API to get if panic is allowed on
* timeout
*
* Return: TRUE or FALSE
* Return: TRUE or FALSE when VDEV_ASSERT_MANAGEMENT is disabled else FALSE
*/
static inline bool target_if_vdev_mgr_is_driver_unloading(void)
#ifdef VDEV_ASSERT_MANAGEMENT
static inline bool target_if_vdev_mgr_is_panic_allowed(void)
{
return false;
}
#else
static inline bool target_if_vdev_mgr_is_panic_allowed(void)
{
if (qdf_is_recovering() || qdf_is_fw_down())
return false;
return true;
}
#endif
/**
* target_if_vdev_mgr_delete_response_handler() - API to handle vdev delete

查看文件

@@ -29,7 +29,6 @@
#include <wmi_unified_param.h>
#include <wlan_mlme_dbg.h>
#include <target_if.h>
#include <qdf_platform.h>
#include <wlan_vdev_mlme_main.h>
#include <wmi_unified_vdev_api.h>
@@ -128,25 +127,29 @@ void target_if_vdev_mgr_rsp_timer_mgmt_cb(void *arg)
return;
}
if (target_if_vdev_mgr_is_driver_unloading() || qdf_is_recovering() ||
qdf_is_fw_down()) {
if (!target_if_vdev_mgr_is_panic_allowed()) {
mlme_debug("PSOC_%d VDEV_%d: Panic not allowed",
wlan_psoc_get_id(psoc), vdev_id);
return;
}
/* Trigger fw recovery to collect fw dump */
wmi_handle = target_if_vdev_mgr_wmi_handle_get(vdev);
if (wmi_handle) {
mlme_err("PSOC_%d VDEV_%d: Self recovery, %s rsp timeout",
wlan_psoc_get_id(psoc), vdev_id,
string_from_rsp_bit(rsp_pos));
qdf_mem_set(&param, sizeof(param), 0);
/* RECOVERY_SIM_SELF_RECOVERY */
param.type = 0x08;
wmi_crash_inject(wmi_handle, &param);
}
/* Host panic to collect host stacktrace */
if (target_if_vdev_mgr_is_panic_on_bug()) {
QDF_DEBUG_PANIC("PSOC_%d VDEV_%d: Panic, %s response timeout",
wlan_psoc_get_id(psoc),
vdev_id, string_from_rsp_bit(rsp_pos));
} else {
mlme_err("PSOC_%d VDEV_%d: Self recovery, %s response timeout",
wlan_psoc_get_id(psoc),
vdev_id, string_from_rsp_bit(rsp_pos));
wmi_handle = target_if_vdev_mgr_wmi_handle_get(vdev);
qdf_mem_set(&param, sizeof(param), 0);
/* RECOVERY_SIM_SELF_RECOVERY*/
param.type = 0x08;
wmi_crash_inject(wmi_handle, &param);
}
}