diff options
| author | Hanumanth Reddy Pothula <c_hpothu@codeaurora.org> | 2017-08-03 19:31:05 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappara@codeaurora.org> | 2017-09-07 23:08:44 -0700 |
| commit | f1e2b2ca0ddc4b1079f76da7bc3533ffbefc9048 (patch) | |
| tree | 9bf2d8854dcb83a9cf4ef2be95fad0b46413dbfb | |
| parent | 8ae1585143567cf9e97e1ffc5cb82197806dadef (diff) | |
qcacld-3.0: Update ini param g_auto_detect_power_failure_mode
Update ini param g_auto_detect_power_failure_mode to incorporate below
values,
0 - Don't register wow wakeup event and FW crashes on power failure
1 - Register wow wakeup event and FW sends failure event to host on
power failure
2 - Don't register wow wakeup event and FW silently rejuvenate on
power failure
3 - Don't register wow wakeup event and the auto power failure detect
feature is disabled in FW.
Change-Id: I8a704954ecbacadbc035c1523fa41a18b6300f66
CRs-Fixed: 2087144
| -rw-r--r-- | core/cds/inc/cds_config.h | 20 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 14 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 3 | ||||
| -rw-r--r-- | core/wma/inc/wma.h | 2 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 6 | ||||
| -rw-r--r-- | core/wma/src/wma_main.c | 4 |
6 files changed, 36 insertions, 13 deletions
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index 2de4add79704..616cecb7ce6e 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -82,6 +82,24 @@ enum cds_hang_reason { }; /** + * enum cds_auto_pwr_detect_failure_mode_t - auto detect failure modes + * @CDS_FW_TO_CRASH_ON_PWR_FAILURE: Don't register wow wakeup event and FW + * crashes on power failure + * @CDS_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE: Register wow wakeup event and FW + * sends failure event to host on power failure + * @CDS_FW_TO_REJUVENATE_ON_PWR_FAILURE: Don't register wow wakeup event and + * FW silently rejuvenate on power failure + * @CDS_AUTO_PWR_FAILURE_DETECT_DISABLE: Don't register wow wakeup event and the + * auto power failure detect feature is disabled in FW. + */ +enum cds_auto_pwr_detect_failure_mode_t { + CDS_FW_TO_CRASH_ON_PWR_FAILURE, + CDS_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE, + CDS_FW_TO_REJUVENATE_ON_PWR_FAILURE, + CDS_AUTO_PWR_FAILURE_DETECT_DISABLE +}; + +/** * struct cds_config_info - Place Holder for cds configuration * @max_station: Max station supported * @max_bssid: Max Bssid Supported @@ -192,7 +210,7 @@ struct cds_config_info { enum active_bpf_mode active_uc_bpf_mode; enum active_bpf_mode active_mc_bc_bpf_mode; bool rps_enabled; - bool auto_power_save_fail_mode; + enum cds_auto_pwr_detect_failure_mode_t auto_power_save_fail_mode; uint8_t ito_repeat_count; }; diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index ffcc027716bd..a3c4ddd04b54 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -11326,9 +11326,9 @@ enum hw_filter_mode { /* * <ini> * g_auto_detect_power_failure_mode - auto detect power save failure mode - * @Min: 0 : Recovery - * @Max: 1 : WMI - * @Default: 0 + * @Min: CDS_FW_TO_CRASH_ON_PWR_FAILURE + * @Max: CDS_AUTO_PWR_FAILURE_DETECT_DISABLE + * @Default: CDS_FW_TO_CRASH_ON_PWR_FAILURE * * This ini specifies the behavior of FW in case of * CHIP_POWER_SAVE_FAIL_DETECTED event @@ -11337,10 +11337,10 @@ enum hw_filter_mode { * * </ini> */ -#define CFG_AUTO_DETECT_POWER_FAIL_MODE_NAME "g_auto_detect_power_failure_mode" -#define CFG_AUTO_DETECT_POWER_FAIL_MODE_MIN (0) -#define CFG_AUTO_DETECT_POWER_FAIL_MODE_MAX (1) -#define CFG_AUTO_DETECT_POWER_FAIL_MODE_DEFAULT (0) +#define CFG_AUTO_DETECT_POWER_FAIL_MODE_NAME "g_auto_detect_power_failure_mode" +#define CFG_AUTO_DETECT_POWER_FAIL_MODE_MIN (CDS_FW_TO_CRASH_ON_PWR_FAILURE) +#define CFG_AUTO_DETECT_POWER_FAIL_MODE_MAX (CDS_AUTO_PWR_FAILURE_DETECT_DISABLE) +#define CFG_AUTO_DETECT_POWER_FAIL_MODE_DEFAULT (CDS_FW_TO_CRASH_ON_PWR_FAILURE) /* * <ini> diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 2bbe05b7a079..7fce17871bde 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9359,6 +9359,9 @@ int hdd_configure_cds(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter) sme_cli_set_command(0, WMI_PDEV_PARAM_FAST_PWR_TRANSITION, hdd_ctx->config->enable_phy_reg_retention, PDEV_CMD); + sme_cli_set_command(0, (int)WMI_PDEV_AUTO_DETECT_POWER_FAILURE, + hdd_ctx->config->auto_pwr_save_fail_mode, PDEV_CMD); + cds_get_dfs_region(&dfs_reg); cds_set_wma_dfs_region(dfs_reg); diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index fb6d98932a8b..a7219acc0c33 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1707,7 +1707,7 @@ typedef struct { bool tx_bfee_8ss_enabled; tSirAddonPsReq ps_setting; struct peer_debug_info *peer_dbg; - bool auto_power_save_enabled; + enum cds_auto_pwr_detect_failure_mode_t auto_power_save_enabled; uint8_t in_imps; uint64_t tx_fail_cnt; uint64_t wmi_desc_fail_count; diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 69bab2c901c3..8684e47220a4 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -5192,7 +5192,8 @@ void wma_register_wow_wakeup_events(WMA_HANDLE handle, if ((wma->interfaces[vdev_id].in_bmps == true || wma->in_imps == true) && - wma->auto_power_save_enabled) + (wma->auto_power_save_enabled == + CDS_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE)) wma_set_wow_event_bitmap( WOW_CHIP_POWER_FAILURE_DETECT_EVENT, WMI_WOW_MAX_EVENT_BM_LEN, @@ -6033,7 +6034,8 @@ static void wma_configure_dynamic_wake_events(tp_wma_handle wma) WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE || wma->interfaces[vdev_id].sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT))) && - wma->auto_power_save_enabled) { + (wma->auto_power_save_enabled == + CDS_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE)) { wma_set_wow_event_bitmap(EV_PWR, BM_LEN, enable_mask); diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index eb2a681621d5..3537fc40fad5 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -2751,14 +2751,14 @@ QDF_STATUS wma_open(void *cds_context, wma_handle->auto_power_save_enabled = cds_cfg->auto_power_save_fail_mode; /* Register PWR_SAVE_FAIL event only in case of recovery(1) */ - if (wma_handle->auto_power_save_enabled) { + if (wma_handle->auto_power_save_enabled == + CDS_FW_TO_SEND_WOW_IND_ON_PWR_FAILURE) { wmi_unified_register_event_handler(wma_handle->wmi_handle, WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID, wma_chip_power_save_failure_detected_handler, WMA_RX_SERIALIZER_CTX); } - wma_ndp_register_all_event_handlers(wma_handle); wmi_unified_register_event_handler(wma_handle->wmi_handle, WMI_PEER_ANTDIV_INFO_EVENTID, |
