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
This commit is contained in:
@@ -28,16 +28,28 @@
|
|||||||
#include <wmi_unified_param.h>
|
#include <wmi_unified_param.h>
|
||||||
#include <wlan_objmgr_psoc_obj.h>
|
#include <wlan_objmgr_psoc_obj.h>
|
||||||
#include <wlan_lmac_if_def.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;
|
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
|
* target_if_vdev_mgr_delete_response_handler() - API to handle vdev delete
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
#include <wmi_unified_param.h>
|
#include <wmi_unified_param.h>
|
||||||
#include <wlan_mlme_dbg.h>
|
#include <wlan_mlme_dbg.h>
|
||||||
#include <target_if.h>
|
#include <target_if.h>
|
||||||
#include <qdf_platform.h>
|
|
||||||
#include <wlan_vdev_mlme_main.h>
|
#include <wlan_vdev_mlme_main.h>
|
||||||
#include <wmi_unified_vdev_api.h>
|
#include <wmi_unified_vdev_api.h>
|
||||||
|
|
||||||
@@ -128,25 +127,29 @@ void target_if_vdev_mgr_rsp_timer_mgmt_cb(void *arg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target_if_vdev_mgr_is_driver_unloading() || qdf_is_recovering() ||
|
if (!target_if_vdev_mgr_is_panic_allowed()) {
|
||||||
qdf_is_fw_down()) {
|
mlme_debug("PSOC_%d VDEV_%d: Panic not allowed",
|
||||||
|
wlan_psoc_get_id(psoc), vdev_id);
|
||||||
return;
|
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(¶m, sizeof(param), 0);
|
||||||
|
/* RECOVERY_SIM_SELF_RECOVERY */
|
||||||
|
param.type = 0x08;
|
||||||
|
wmi_crash_inject(wmi_handle, ¶m);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Host panic to collect host stacktrace */
|
||||||
if (target_if_vdev_mgr_is_panic_on_bug()) {
|
if (target_if_vdev_mgr_is_panic_on_bug()) {
|
||||||
QDF_DEBUG_PANIC("PSOC_%d VDEV_%d: Panic, %s response timeout",
|
QDF_DEBUG_PANIC("PSOC_%d VDEV_%d: Panic, %s response timeout",
|
||||||
wlan_psoc_get_id(psoc),
|
wlan_psoc_get_id(psoc),
|
||||||
vdev_id, string_from_rsp_bit(rsp_pos));
|
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(¶m, sizeof(param), 0);
|
|
||||||
/* RECOVERY_SIM_SELF_RECOVERY*/
|
|
||||||
param.type = 0x08;
|
|
||||||
wmi_crash_inject(wmi_handle, ¶m);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user