diff options
| author | Mukul Sharma <mukul@codeaurora.org> | 2016-09-03 15:16:22 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-10 04:33:22 -0700 |
| commit | f7d62e1cccb99204178cae9baf49219d749acbd2 (patch) | |
| tree | 164dddd2e65a6727b177d85f61d6fc0e47ba09fe | |
| parent | e1e7cd1c40ce8cde6205d0e64df11d5a97802f72 (diff) | |
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
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 13 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 11 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 5 |
3 files changed, 28 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 7bbc547e51c0..ab19c7ac9331 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -3406,6 +3406,18 @@ enum dot11p_mode { #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. * Acceptable values for this: @@ -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; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 27b227ec7751..9e944e6d33eb 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -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); diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 26e5f6641987..159346cc0e44 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -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: |
