From 0090e226f1307513d37e66f27cc587352c47e9dd Mon Sep 17 00:00:00 2001 From: Ravi Kumar Bokka Date: Wed, 9 Nov 2016 18:07:56 +0530 Subject: [PATCH] qcacmn: Add ini param to control the crash inject qcacld-2.0 to qcacmn propagation Currently the crash can be injected by iwpriv command and FW gets crashed. Changes are done to add the gEnableCrashInject ini parameter 1) This ini param is disabled by default. 2) If this param is disabled the crash inject is ignored. Change-Id: I7e908be1e37090a9d343dc04411fe387f776a937 CRs-Fixed: 1087774 --- wmi/inc/wmi_unified_api.h | 9 +++++++++ wmi/inc/wmi_unified_priv.h | 1 + wmi/src/wmi_unified.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 949c4bc66b..cc94f23925 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -292,6 +292,15 @@ void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val); */ void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag); +/** + * WMI API to set target assert + * @param wmi_handle: handle to WMI. + * @param val: target assert config value. + * + * Return: none. + */ +void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val); + /** * generic function to block unified WMI command * @param wmi_handle : handle to WMI. diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index f7e0498a12..2a5cd02125 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1438,6 +1438,7 @@ struct wmi_unified { #endif qdf_atomic_t is_wow_bus_suspended; bool tag_crash_inject; + bool tgt_force_assert_enable; enum wmi_target_type target_type; struct wmi_rx_ops rx_ops; struct wmi_ops *ops; diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index 5a50526b02..8c6386e05f 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -3013,6 +3013,11 @@ void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val) qdf_atomic_set(&wmi_handle->is_wow_bus_suspended, val); } +void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val) +{ + wmi_handle->tgt_force_assert_enable = val; +} + #ifndef CONFIG_MCL /** * API to flush all the previous packets associated with the wmi endpoint