mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Add ini to raise bug on SSR re-init failure
qcacld-2.0 to qcacld-3.0 propagation Currently, If SSR re-init get failed then host raise VOS_BUG. In this type of cases, OEM might prefer not to crash the device instead want wlan recovery using driver unload followed by load. Change-Id: If433aae949326af6a20df2190dd7356f211c4103 CRs-Fixed: 1017278
This commit is contained in:
parent
e1e7cd1c40
commit
f7d62e1ccc
3 changed files with 28 additions and 1 deletions
|
|
@ -3405,6 +3405,18 @@ enum dot11p_mode {
|
|||
#define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_MAX (4)
|
||||
#define CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_DEFAULT (0)
|
||||
|
||||
/*
|
||||
* This parameter will help to debug ssr reinit failure issues
|
||||
* by raising vos bug so dumps can be collected. If OEM
|
||||
* wants to avoid this crash, just disable this parameter.
|
||||
* wlan driver will only recover after driver unload and load.
|
||||
* Default: Enable
|
||||
*/
|
||||
#define CFG_BUG_ON_REINIT_FAILURE_NAME "g_bug_on_reinit_failure"
|
||||
#define CFG_BUG_ON_REINIT_FAILURE_MIN (0)
|
||||
#define CFG_BUG_ON_REINIT_FAILURE_MAX (1)
|
||||
#define CFG_BUG_ON_REINIT_FAILURE_DEFAULT (1)
|
||||
|
||||
/*
|
||||
* This parameter will set the algo used in dwell time optimization during
|
||||
* pno scan. see enum wmi_dwelltime_adaptive_mode.
|
||||
|
|
@ -4178,6 +4190,7 @@ struct hdd_config {
|
|||
uint8_t adapt_dwell_passive_mon_intval;
|
||||
uint8_t adapt_dwell_wifi_act_threshold;
|
||||
bool bug_report_for_no_scan_results;
|
||||
bool bug_on_reinit_failure;
|
||||
#ifdef WLAN_FEATURE_NAN_DATAPATH
|
||||
bool enable_nan_datapath;
|
||||
uint8_t nan_datapath_ndi_channel;
|
||||
|
|
|
|||
|
|
@ -3965,6 +3965,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
|
|||
CFG_INDOOR_CHANNEL_SUPPORT_MIN,
|
||||
CFG_INDOOR_CHANNEL_SUPPORT_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_BUG_ON_REINIT_FAILURE_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, bug_on_reinit_failure,
|
||||
VAR_FLAGS_OPTIONAL |
|
||||
VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_BUG_ON_REINIT_FAILURE_DEFAULT,
|
||||
CFG_BUG_ON_REINIT_FAILURE_MIN,
|
||||
CFG_BUG_ON_REINIT_FAILURE_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_INTERFACE_CHANGE_WAIT_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, iface_change_wait_time,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
|
||||
|
|
@ -5590,6 +5598,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
|
|||
hdd_info("Name = [%s] Value = [%u]",
|
||||
CFG_IDLE_TIME_NAME,
|
||||
pHddCtx->config->idle_time_conc);
|
||||
hdd_info("Name = [%s] Value = [%d]",
|
||||
CFG_BUG_ON_REINIT_FAILURE_NAME,
|
||||
pHddCtx->config->bug_on_reinit_failure);
|
||||
hdd_info("Name = [%s] Value = [%u]",
|
||||
CFG_INTERFACE_CHANGE_WAIT_NAME,
|
||||
pHddCtx->config->iface_change_wait_time);
|
||||
|
|
|
|||
|
|
@ -1495,6 +1495,7 @@ QDF_STATUS hdd_wlan_re_init(void)
|
|||
hdd_adapter_t *pAdapter;
|
||||
QDF_STATUS qdf_status;
|
||||
int ret;
|
||||
bool bug_on_reinit_failure = CFG_BUG_ON_REINIT_FAILURE_DEFAULT;
|
||||
|
||||
hdd_prevent_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT);
|
||||
|
||||
|
|
@ -1511,6 +1512,7 @@ QDF_STATUS hdd_wlan_re_init(void)
|
|||
hdd_alert("HDD context is Null");
|
||||
goto err_re_init;
|
||||
}
|
||||
bug_on_reinit_failure = pHddCtx->config->bug_on_reinit_failure;
|
||||
|
||||
/* The driver should always be initialized in STA mode after SSR */
|
||||
hdd_set_conparam(0);
|
||||
|
|
@ -1591,7 +1593,8 @@ err_wiphy_unregister:
|
|||
err_re_init:
|
||||
/* Allow the phone to go to sleep */
|
||||
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT);
|
||||
QDF_BUG(0);
|
||||
if (bug_on_reinit_failure)
|
||||
QDF_BUG(0);
|
||||
return -EPERM;
|
||||
|
||||
success:
|
||||
|
|
|
|||
Loading…
Reference in a new issue