diff --git a/components/mlme/dispatcher/inc/cfg_mlme_generic.h b/components/mlme/dispatcher/inc/cfg_mlme_generic.h index 691be467b5..eb5362b7f4 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_generic.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_generic.h @@ -400,7 +400,7 @@ * * gDroppedPktDisconnectTh - Sets dropped packet threshold in firmware * @Min: 0 - * @Max: 512 + * @Max: 65535 * @Default: 512 * * This INI is the packet drop threshold will trigger disconnect from remote diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index 56a31bb519..9a656d54a9 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -198,34 +198,34 @@ QDF_STATUS wlan_mlme_set_band_capability(struct wlan_objmgr_psoc *psoc, uint8_t band_capability); /** - * wlan_mlme_get_prevent_link_down_cfg() - Get the prevent link down config + * wlan_mlme_get_prevent_link_down() - Get the prevent link down config * @psoc: pointer to psoc object * @prevent_link_down: Pointer to the variable from caller * * Return: QDF Status */ -QDF_STATUS wlan_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc, - bool *prevent_link_down); +QDF_STATUS wlan_mlme_get_prevent_link_down(struct wlan_objmgr_psoc *psoc, + bool *prevent_link_down); /** - * wlan_mlme_get_select_5ghz_margin_cfg() - Get the select 5Ghz margin config + * wlan_mlme_get_select_5ghz_margin() - Get the select 5Ghz margin config * @psoc: pointer to psoc object * @select_5ghz_margin: Pointer to the variable from caller * * Return: QDF Status */ -QDF_STATUS wlan_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc, - uint8_t *select_5ghz_margin); +QDF_STATUS wlan_mlme_get_select_5ghz_margin(struct wlan_objmgr_psoc *psoc, + uint8_t *select_5ghz_margin); /** - * wlan_mlme_get_crash_inject_cfg() - Get the crash inject config + * wlan_mlme_get_crash_inject() - Get the crash inject config * @psoc: pointer to psoc object * @crash_inject: Pointer to the variable from caller * * Return: QDF Status */ -QDF_STATUS wlan_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc, - bool *crash_inject); +QDF_STATUS wlan_mlme_get_crash_inject(struct wlan_objmgr_psoc *psoc, + bool *crash_inject); /** * wlan_mlme_get_lpass_support() - Get the LPASS Support config @@ -237,6 +237,46 @@ QDF_STATUS wlan_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc, bool *lpass_support); +/** + * wlan_mlme_get_self_recovery() - Get the self recovery config + * @psoc: pointer to psoc object + * @self_recovery: Pointer to the variable from caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_self_recovery(struct wlan_objmgr_psoc *psoc, + bool *self_recovery); + +/** + * wlan_mlme_get_sub_20_chan_width() - Get the sub 20 chan width config + * @psoc: pointer to psoc object + * @sub_20_chan_width: Pointer to the variable from caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_sub_20_chan_width(struct wlan_objmgr_psoc *psoc, + uint8_t *sub_20_chan_width); + +/** + * wlan_mlme_get_fw_timeout_crash() - Get the fw timeout crash config + * @psoc: pointer to psoc object + * @fw_timeout_crash: Pointer to the variable from caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_fw_timeout_crash(struct wlan_objmgr_psoc *psoc, + bool *fw_timeout_crash); + +/** + * wlan_mlme_get_ito_repeat_count() - Get the fw timeout crash config + * @psoc: pointer to psoc object + * @ito_repeat_count: Pointer to the variable from caller + * + * Return: QDF Status + */ +QDF_STATUS wlan_mlme_get_ito_repeat_count(struct wlan_objmgr_psoc *psoc, + uint8_t *ito_repeat_count); + /** * wlan_mlme_get_acs_with_more_param() - Get the acs_with_more_param flag * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index 237f8e815b..c32ca23a89 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -178,45 +178,45 @@ QDF_STATUS ucfg_mlme_set_band_capability(struct wlan_objmgr_psoc *psoc, } /** - * ucfg_mlme_get_prevent_link_down_cfg() - Get the prevent link down config + * ucfg_mlme_get_prevent_link_down() - Get the prevent link down config * @psoc: pointer to psoc object * @prevent_link_down: Pointer to the variable from caller * * Return: QDF Status */ static inline -QDF_STATUS ucfg_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc, - bool *prevent_link_down) +QDF_STATUS ucfg_mlme_get_prevent_link_down(struct wlan_objmgr_psoc *psoc, + bool *prevent_link_down) { - return wlan_mlme_get_prevent_link_down_cfg(psoc, prevent_link_down); + return wlan_mlme_get_prevent_link_down(psoc, prevent_link_down); } /** - * ucfg_mlme_get_select_5ghz_margin_cfg() - Get the select 5Ghz margin config + * ucfg_mlme_get_select_5ghz_margin() - Get the select 5Ghz margin config * @psoc: pointer to psoc object * @select_5ghz_margin: Pointer to the variable from caller * * Return: QDF Status */ static inline -QDF_STATUS ucfg_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc, - uint8_t *select_5ghz_margin) +QDF_STATUS ucfg_mlme_get_select_5ghz_margin(struct wlan_objmgr_psoc *psoc, + uint8_t *select_5ghz_margin) { - return wlan_mlme_get_select_5ghz_margin_cfg(psoc, select_5ghz_margin); + return wlan_mlme_get_select_5ghz_margin(psoc, select_5ghz_margin); } /** - * ucfg_mlme_get_crash_inject_cfg() - Get the crash inject config + * ucfg_mlme_get_crash_inject() - Get the crash inject config * @psoc: pointer to psoc object * @crash_inject: Pointer to the variable from caller * * Return: QDF Status */ static inline -QDF_STATUS ucfg_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc, - bool *crash_inject) +QDF_STATUS ucfg_mlme_get_crash_inject(struct wlan_objmgr_psoc *psoc, + bool *crash_inject) { - return wlan_mlme_get_crash_inject_cfg(psoc, crash_inject); + return wlan_mlme_get_crash_inject(psoc, crash_inject); } /** @@ -233,6 +233,62 @@ QDF_STATUS ucfg_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc, return wlan_mlme_get_lpass_support(psoc, lpass_support); } +/** + * ucfg_mlme_get_self_recovery() - Get the self recovery config + * @psoc: pointer to psoc object + * @self_recovery: Pointer to the variable from caller + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_self_recovery(struct wlan_objmgr_psoc *psoc, + bool *self_recovery) +{ + return wlan_mlme_get_self_recovery(psoc, self_recovery); +} + +/** + * ucfg_mlme_get_sub_20_chan_width() - Get the sub 20 chan width config + * @psoc: pointer to psoc object + * @sub_20_chan_width: Pointer to the variable from caller + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_sub_20_chan_width(struct wlan_objmgr_psoc *psoc, + uint8_t *sub_20_chan_width) +{ + return wlan_mlme_get_sub_20_chan_width(psoc, sub_20_chan_width); +} + +/** + * ucfg_mlme_get_fw_timeout_crash() - Get the fw timeout crash config + * @psoc: pointer to psoc object + * @fw_timeout_crash: Pointer to the variable from caller + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_fw_timeout_crash(struct wlan_objmgr_psoc *psoc, + bool *fw_timeout_crash) +{ + return wlan_mlme_get_fw_timeout_crash(psoc, fw_timeout_crash); +} + +/** + * ucfg_mlme_get_ito_repeat_count() - Get the fw timeout crash config + * @psoc: pointer to psoc object + * @ito_repeat_count: Pointer to the variable from caller + * + * Return: QDF Status + */ +static inline +QDF_STATUS ucfg_mlme_get_ito_repeat_count(struct wlan_objmgr_psoc *psoc, + uint8_t *ito_repeat_count) +{ + return wlan_mlme_get_ito_repeat_count(psoc, ito_repeat_count); +} + /** * ucfg_mlme_get_acs_with_more_param() - Get the flag for acs with * more param diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 11620d3d54..2f1ed4917d 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -123,8 +123,8 @@ QDF_STATUS wlan_mlme_set_band_capability(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } -QDF_STATUS wlan_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc, - bool *prevent_link_down) +QDF_STATUS wlan_mlme_get_prevent_link_down(struct wlan_objmgr_psoc *psoc, + bool *prevent_link_down) { struct wlan_mlme_psoc_obj *mlme_obj; @@ -139,8 +139,8 @@ QDF_STATUS wlan_mlme_get_prevent_link_down_cfg(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } -QDF_STATUS wlan_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc, - uint8_t *select_5ghz_margin) +QDF_STATUS wlan_mlme_get_select_5ghz_margin(struct wlan_objmgr_psoc *psoc, + uint8_t *select_5ghz_margin) { struct wlan_mlme_psoc_obj *mlme_obj; @@ -155,8 +155,8 @@ QDF_STATUS wlan_mlme_get_select_5ghz_margin_cfg(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } -QDF_STATUS wlan_mlme_get_crash_inject_cfg(struct wlan_objmgr_psoc *psoc, - bool *crash_inject) +QDF_STATUS wlan_mlme_get_crash_inject(struct wlan_objmgr_psoc *psoc, + bool *crash_inject) { struct wlan_mlme_psoc_obj *mlme_obj; @@ -187,6 +187,70 @@ QDF_STATUS wlan_mlme_get_lpass_support(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +QDF_STATUS wlan_mlme_get_self_recovery(struct wlan_objmgr_psoc *psoc, + bool *self_recovery) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *self_recovery = mlme_obj->cfg.gen.self_recovery; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_sub_20_chan_width(struct wlan_objmgr_psoc *psoc, + uint8_t *sub_20_chan_width) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *sub_20_chan_width = mlme_obj->cfg.gen.sub_20_chan_width; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_fw_timeout_crash(struct wlan_objmgr_psoc *psoc, + bool *fw_timeout_crash) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *fw_timeout_crash = mlme_obj->cfg.gen.fw_timeout_crash; + + return QDF_STATUS_SUCCESS; +} + +QDF_STATUS wlan_mlme_get_ito_repeat_count(struct wlan_objmgr_psoc *psoc, + uint8_t *ito_repeat_count) +{ + struct wlan_mlme_psoc_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_obj(psoc); + if (!mlme_obj) { + mlme_err("Failed to get MLME Obj"); + return QDF_STATUS_E_FAILURE; + } + + *ito_repeat_count = mlme_obj->cfg.gen.ito_repeat_count; + + return QDF_STATUS_SUCCESS; +} + void wlan_mlme_get_sap_inactivity_override(struct wlan_objmgr_psoc *psoc, bool *val) { diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 93e0f55c9c..3184686ac9 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -1282,29 +1282,6 @@ enum hdd_dot11_mode { #define CFG_ROAM_RESCAN_RSSI_DIFF_MAX (100) #define CFG_ROAM_RESCAN_RSSI_DIFF_DEFAULT (5) -/* - * - * gDroppedPktDisconnectTh - Sets dropped packet threshold in firmware - * @Min: 0 - * @Max: 512 - * @Default: 512 - * - * This INI is the packet drop threshold will trigger disconnect from remote - * peer. - * - * Related: None - * - * Supported Feature: connection - * - * Usage: External - * - * - */ -#define CFG_DROPPED_PKT_DISCONNECT_TH_NAME "gDroppedPktDisconnectTh" -#define CFG_DROPPED_PKT_DISCONNECT_TH_MIN (0) -#define CFG_DROPPED_PKT_DISCONNECT_TH_MAX (65535) -#define CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT (512) - /* * * gForce1x1Exception - force 1x1 when connecting to certain peer @@ -4846,11 +4823,6 @@ enum hdd_link_speed_rpt_type { #define CFG_IPA_UC_TX_PARTITION_BASE_MAX (9000) #define CFG_IPA_UC_TX_PARTITION_BASE_DEFAULT (3000) -#define CFG_ENABLE_SELF_RECOVERY_NAME "gEnableSelfRecovery" -#define CFG_ENABLE_SELF_RECOVERY_MIN (0) -#define CFG_ENABLE_SELF_RECOVERY_MAX (1) -#define CFG_ENABLE_SELF_RECOVERY_DEFAULT (0) - #define CFG_ENABLE_SAP_SUSPEND "gEnableSapSuspend" #define CFG_ENABLE_SAP_SUSPEND_MIN (0) #define CFG_ENABLE_SAP_SUSPEND_MAX (1) @@ -5043,11 +5015,6 @@ enum hdd_link_speed_rpt_type { #define CFG_GO_11AC_OVERRIDE_MAX (1) #define CFG_GO_11AC_OVERRIDE_DEFAULT (1) -#define CFG_SAP_DOT11MC_NAME "gSapDot11mc" -#define CFG_SAP_DOT11MC_MIN (0) -#define CFG_SAP_DOT11MC_MAX (1) -#define CFG_SAP_DOT11MC_DEFAULT (0) - #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR "gPreferNonDfsChanOnRadar" #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MIN (0) #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MAX (1) @@ -5464,15 +5431,6 @@ enum hdd_link_speed_rpt_type { #define CFG_SET_TSF_PTP_OPT_DEFAULT (0xf) #endif -/* - * Enable/Disable to initiate BUG report in case of fatal event - * Default: Enable - */ -#define CFG_ENABLE_FATAL_EVENT_TRIGGER_NAME "gEnableFatalEvent" -#define CFG_ENABLE_FATAL_EVENT_TRIGGER_MIN (0) -#define CFG_ENABLE_FATAL_EVENT_TRIGGER_MAX (1) -#define CFG_ENABLE_FATAL_EVENT_TRIGGER_DEFAULT (1) - /* * * gEnableEdcaParams - Enable edca parameter @@ -5948,31 +5906,6 @@ enum hdd_link_speed_rpt_type { #define CFG_ADAPT_DWELL_WIFI_THRESH_MAX (100) #define CFG_ADAPT_DWELL_WIFI_THRESH_DEFAULT (10) -/* - * - * gSub20ChannelWidth - Control sub 20 channel width (5/10 Mhz) - * @Min: 0 - * @Max: 2 - * @Default: 0 - * - * This ini is used to set the sub 20 channel width. - * gSub20ChannelWidth=0: indicates do not use Sub 20 MHz bandwidth - * gSub20ChannelWidth=1: Bring up SAP/STA in 5 MHz bandwidth - * gSub20ChannelWidth=2: Bring up SAP/STA in 10 MHz bandwidth - * - * Related: None - * - * Supported Feature: 5/10 Mhz channel width support - * - * Usage: Internal/External - * - * - */ -#define CFG_SUB_20_CHANNEL_WIDTH_NAME "gSub20ChannelWidth" -#define CFG_SUB_20_CHANNEL_WIDTH_MIN (WLAN_SUB_20_CH_WIDTH_NONE) -#define CFG_SUB_20_CHANNEL_WIDTH_MAX (WLAN_SUB_20_CH_WIDTH_10) -#define CFG_SUB_20_CHANNEL_WIDTH_DEFAULT (WLAN_SUB_20_CH_WIDTH_NONE) - /* * * restart_beaconing_on_chan_avoid_event - control the beaconing entity to move @@ -6136,37 +6069,6 @@ enum hdd_link_speed_rpt_type { #define CFG_FILTER_MULTICAST_REPLAY_MAX (1) #define CFG_FILTER_MULTICAST_REPLAY_DEFAULT (1) -/* Optimize channel avoidance indication coming from firmware */ -#define CFG_OPTIMIZE_CA_EVENT_NAME "goptimize_chan_avoid_event" -#define CFG_OPTIMIZE_CA_EVENT_DISABLE (0) -#define CFG_OPTIMIZE_CA_EVENT_ENABLE (1) -#define CFG_OPTIMIZE_CA_EVENT_DEFAULT (0) - -/* - * - * fw_timeout_crash - Enable/Disable BUG ON - * @Min: 0 - * @Max: 1 - * @Default: 1 - * - * This ini is used to Trigger host crash when firmware fails to send the - * response to host - * fw_timeout_crash = 0 Disabled - * fw_timeout_crash = 1 Trigger host crash - * - * Related: None - * - * Supported Feature: SSR - * - * Usage: Internal/External - * - * - */ -#define CFG_CRASH_FW_TIMEOUT_NAME "fw_timeout_crash" -#define CFG_CRASH_FW_TIMEOUT_DISABLE (0) -#define CFG_CRASH_FW_TIMEOUT_ENABLE (1) -#define CFG_CRASH_FW_TIMEOUT_DEFAULT (1) - /* * * rx_wakelock_timeout - Amount of time to hold wakelock for RX unicast packets @@ -6844,24 +6746,6 @@ enum hdd_link_speed_rpt_type { #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MAX (0xFFFFFFFF) #define CFG_MAWC_NLO_MAX_SCAN_INTERVAL_DEFAULT (60000) -/* - * - * gItoRepeatCount - sets ito repeated count - * @Min: 0 - * @Max: 5 - * @Default: 0 - * - * This ini sets the ito count in FW - * - * Usage: External - * - * - */ -#define CFG_ITO_REPEAT_COUNT_NAME "gItoRepeatCount" -#define CFG_ITO_REPEAT_COUNT_MIN (0) -#define CFG_ITO_REPEAT_COUNT_MAX (5) -#define CFG_ITO_REPEAT_COUNT_DEFAULT (0) - /* * * gEnableLPRx - Enable/Disable LPRx @@ -8202,7 +8086,6 @@ struct hdd_config { uint32_t IpaUcRxIndRingCount; uint32_t IpaUcTxPartitionBase; - bool enableSelfRecovery; #ifdef FEATURE_WLAN_FORCE_SAP_SCC uint8_t SapSccChanAvoidance; #endif /* FEATURE_WLAN_FORCE_SAP_SCC */ @@ -8223,7 +8106,6 @@ struct hdd_config { #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ uint8_t sap_11ac_override; uint8_t go_11ac_override; - uint8_t sap_dot11mc; uint8_t prefer_non_dfs_on_radar; uint8_t conc_system_pref; uint32_t dbs_selection_policy; @@ -8296,7 +8178,6 @@ struct hdd_config { /* Tuning TX sched parameters for BK (skip credit limit credit disc) */ uint8_t tx_sched_wrr_bk[TX_SCHED_WRR_PARAM_STRING_LENGTH]; - bool enable_fatal_event; bool apf_enabled; #ifdef CONFIG_DP_TRACE bool enable_dp_trace; @@ -8312,8 +8193,6 @@ struct hdd_config { uint8_t adapt_dwell_passive_mon_intval; uint8_t adapt_dwell_wifi_act_threshold; bool bug_report_for_no_scan_results; - /* parameter to control GTX */ - enum cfg_sub_20_channel_width enable_sub_20_channel_width; bool indoor_channel_support; /* control marking indoor channel passive to disable */ bool force_ssc_disable_indoor_channel; @@ -8322,8 +8201,6 @@ struct hdd_config { bool go_force_11n_for_11ac; uint16_t sap_tx_leakage_threshold; bool multicast_replay_filter; - bool goptimize_chan_avoid_event; - bool fw_timeout_crash; uint32_t rx_wakelock_timeout; bool sap_internal_restart; enum restart_beaconing_on_ch_avoid_rule @@ -8347,11 +8224,8 @@ struct hdd_config { uint32_t mawc_nlo_exp_backoff_ratio; uint32_t mawc_nlo_init_scan_interval; uint32_t mawc_nlo_max_scan_interval; - /* threshold of packet drops at which FW initiates disconnect */ - uint16_t pkt_err_disconn_th; bool is_force_1x1; enum pmo_auto_pwr_detect_failure_mode auto_pwr_save_fail_mode; - uint8_t ito_repeat_count; bool enable_11d_in_world_mode; /* 5G preference parameters for boosting RSSI */ bool enable_5g_band_pref; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index aac7b73a55..244a4e4e6f 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -2014,13 +2014,6 @@ struct reg_table_entry g_registry_table[] = { CFG_IPA_UC_TX_PARTITION_BASE_MIN, CFG_IPA_UC_TX_PARTITION_BASE_MAX), - REG_VARIABLE(CFG_ENABLE_SELF_RECOVERY_NAME, WLAN_PARAM_Integer, - struct hdd_config, enableSelfRecovery, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ENABLE_SELF_RECOVERY_DEFAULT, - CFG_ENABLE_SELF_RECOVERY_MIN, - CFG_ENABLE_SELF_RECOVERY_MAX), - REG_VARIABLE(CFG_ENABLE_SAP_SUSPEND, WLAN_PARAM_Integer, struct hdd_config, enable_sap_suspend, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2103,13 +2096,6 @@ struct reg_table_entry g_registry_table[] = { CFG_GO_11AC_OVERRIDE_MIN, CFG_GO_11AC_OVERRIDE_MAX), - REG_VARIABLE(CFG_SAP_DOT11MC_NAME, WLAN_PARAM_Integer, - struct hdd_config, sap_dot11mc, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SAP_DOT11MC_DEFAULT, - CFG_SAP_DOT11MC_MIN, - CFG_SAP_DOT11MC_MAX), - REG_VARIABLE(CFG_ENABLE_NON_DFS_CHAN_ON_RADAR, WLAN_PARAM_Integer, struct hdd_config, prefer_non_dfs_on_radar, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2330,14 +2316,6 @@ struct reg_table_entry g_registry_table[] = { CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN, CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX), - REG_VARIABLE(CFG_ENABLE_FATAL_EVENT_TRIGGER_NAME, WLAN_PARAM_Integer, - struct hdd_config, enable_fatal_event, - VAR_FLAGS_OPTIONAL | - VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ENABLE_FATAL_EVENT_TRIGGER_DEFAULT, - CFG_ENABLE_FATAL_EVENT_TRIGGER_MIN, - CFG_ENABLE_FATAL_EVENT_TRIGGER_MAX), - REG_VARIABLE(CFG_ENABLE_EDCA_INI_NAME, WLAN_PARAM_Integer, struct hdd_config, enable_edca_params, VAR_FLAGS_OPTIONAL | @@ -2529,13 +2507,6 @@ struct reg_table_entry g_registry_table[] = { CFG_ADAPT_DWELL_LPF_WEIGHT_MIN, CFG_ADAPT_DWELL_LPF_WEIGHT_MAX), - REG_VARIABLE(CFG_SUB_20_CHANNEL_WIDTH_NAME, WLAN_PARAM_Integer, - struct hdd_config, enable_sub_20_channel_width, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_SUB_20_CHANNEL_WIDTH_DEFAULT, - CFG_SUB_20_CHANNEL_WIDTH_MIN, - CFG_SUB_20_CHANNEL_WIDTH_MAX), - REG_VARIABLE(CFG_ADAPT_DWELL_PASMON_INTVAL_NAME, WLAN_PARAM_Integer, struct hdd_config, adapt_dwell_passive_mon_intval, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2617,20 +2588,6 @@ struct reg_table_entry g_registry_table[] = { CFG_FILTER_MULTICAST_REPLAY_MIN, CFG_FILTER_MULTICAST_REPLAY_MAX), - REG_VARIABLE(CFG_OPTIMIZE_CA_EVENT_NAME, WLAN_PARAM_Integer, - struct hdd_config, goptimize_chan_avoid_event, - VAR_FLAGS_OPTIONAL | - VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_OPTIMIZE_CA_EVENT_DEFAULT, - CFG_OPTIMIZE_CA_EVENT_DISABLE, - CFG_OPTIMIZE_CA_EVENT_ENABLE), - - REG_VARIABLE(CFG_CRASH_FW_TIMEOUT_NAME, WLAN_PARAM_Integer, - struct hdd_config, fw_timeout_crash, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_CRASH_FW_TIMEOUT_DEFAULT, - CFG_CRASH_FW_TIMEOUT_DISABLE, - CFG_CRASH_FW_TIMEOUT_ENABLE), REG_VARIABLE(CFG_RX_WAKELOCK_TIMEOUT_NAME, WLAN_PARAM_Integer, struct hdd_config, rx_wakelock_timeout, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2739,13 +2696,6 @@ struct reg_table_entry g_registry_table[] = { CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MIN, CFG_MAWC_NLO_MAX_SCAN_INTERVAL_MAX), - REG_VARIABLE(CFG_DROPPED_PKT_DISCONNECT_TH_NAME, WLAN_PARAM_Integer, - struct hdd_config, pkt_err_disconn_th, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_DROPPED_PKT_DISCONNECT_TH_DEFAULT, - CFG_DROPPED_PKT_DISCONNECT_TH_MIN, - CFG_DROPPED_PKT_DISCONNECT_TH_MAX), - REG_VARIABLE(CFG_FORCE_1X1_NAME, WLAN_PARAM_Integer, struct hdd_config, is_force_1x1, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -2753,13 +2703,6 @@ struct reg_table_entry g_registry_table[] = { CFG_FORCE_1X1_MIN, CFG_FORCE_1X1_MAX), - REG_VARIABLE(CFG_ITO_REPEAT_COUNT_NAME, WLAN_PARAM_Integer, - struct hdd_config, ito_repeat_count, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ITO_REPEAT_COUNT_DEFAULT, - CFG_ITO_REPEAT_COUNT_MIN, - CFG_ITO_REPEAT_COUNT_MAX), - REG_VARIABLE(CFG_ENABLE_11D_IN_WORLD_MODE_NAME, WLAN_PARAM_Integer, struct hdd_config, enable_11d_in_world_mode, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -4723,8 +4666,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) /* Update maximum interfaces information */ smeConfig->csrConfig.max_intf_count = hdd_ctx->max_intf_count; - smeConfig->csrConfig.enableSelfRecovery = - hdd_ctx->config->enableSelfRecovery; smeConfig->csrConfig.conc_custom_rule1 = hdd_ctx->config->conc_custom_rule1; smeConfig->csrConfig.conc_custom_rule2 = @@ -4759,8 +4700,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) hdd_ctx->config->min_delay_btw_roam_scans; smeConfig->csrConfig.roam_trigger_reason_bitmask = hdd_ctx->config->roam_trigger_reason_bitmask; - smeConfig->csrConfig.enable_fatal_event = - pConfig->enable_fatal_event; smeConfig->csrConfig.scan_adaptive_dwell_mode = hdd_ctx->config->scan_adaptive_dwell_mode; smeConfig->csrConfig.scan_adaptive_dwell_mode_nc = @@ -4820,9 +4759,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx) smeConfig->csrConfig.wlm_latency_flags[3] = hdd_ctx->config->wlm_latency_flags_ultralow; - smeConfig->csrConfig.pkt_err_disconn_th = - hdd_ctx->config->pkt_err_disconn_th; - smeConfig->csrConfig.is_force_1x1 = hdd_ctx->config->is_force_1x1; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index ead3a42aff..a9ca9bad6c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1887,9 +1887,17 @@ static int hdd_update_reg_chan_info(struct hdd_adapter *adapter, struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); tsap_config_t *sap_config = &adapter->session.ap.sap_config; mac_handle_t mac_handle; + uint8_t sub_20_chan_width = 0; + QDF_STATUS status; mac_handle = hdd_ctx->mac_handle; sap_config->channel_info_count = channel_count; + + status = ucfg_mlme_get_sub_20_chan_width(hdd_ctx->psoc, + &sub_20_chan_width); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("Failed to get sub_20_chan_width config"); + for (i = 0; i < channel_count; i++) { icv = &sap_config->channel_info[i]; chan = channel_list[i]; @@ -1928,7 +1936,7 @@ static int hdd_update_reg_chan_info(struct hdd_adapter *adapter, sap_config->acs_cfg.ch_width, sap_config->acs_cfg.is_ht_enabled, sap_config->acs_cfg.is_vht_enabled, - hdd_ctx->config->enable_sub_20_channel_width); + sub_20_chan_width); if (icv->flags & IEEE80211_CHAN_PASSIVE) icv->flagext |= IEEE80211_CHAN_DFS; diff --git a/core/hdd/src/wlan_hdd_ftm.c b/core/hdd/src/wlan_hdd_ftm.c index e8ab29e9ef..28bba06033 100644 --- a/core/hdd/src/wlan_hdd_ftm.c +++ b/core/hdd/src/wlan_hdd_ftm.c @@ -65,6 +65,8 @@ struct qcmbr_data { int hdd_update_cds_config_ftm(struct hdd_context *hdd_ctx) { struct cds_config_info *cds_cfg; + QDF_STATUS status; + bool self_recovery; cds_cfg = qdf_mem_malloc(sizeof(*cds_cfg)); if (!cds_cfg) { @@ -72,10 +74,16 @@ int hdd_update_cds_config_ftm(struct hdd_context *hdd_ctx) return -ENOMEM; } + status = ucfg_mlme_get_self_recovery(hdd_ctx->psoc, &self_recovery); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get self recovery ini config"); + return -EIO; + } + cds_cfg->driver_type = QDF_DRIVER_TYPE_MFG; hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx); cds_cfg->sub_20_channel_width = WLAN_SUB_20_CH_WIDTH_NONE; - cds_cfg->self_recovery_enabled = hdd_ctx->config->enableSelfRecovery; + cds_cfg->self_recovery_enabled = self_recovery; cds_cfg->num_vdevs = hdd_ctx->config->num_vdevs; cds_init_ini_config(cds_cfg); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 21ab0815fa..f8dffd36d3 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -4186,6 +4186,7 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter) tsap_config_t *sap_cfg = &ap_adapter->session.ap.sap_config; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter); uint8_t ch_width; + uint8_t sub_20_chan_width; QDF_STATUS status; /* Fixed channel 11AC override: @@ -4201,18 +4202,25 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter) * not allow 11AC rates or more than 20 MHz channel width when * enable_sub_20_channel_width is non zero */ - if (!hdd_ctx->config->enable_sub_20_channel_width && - (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) && - ((ap_adapter->device_mode == QDF_SAP_MODE && - !hdd_ctx->config->sap_force_11n_for_11ac && - hdd_ctx->config->sap_11ac_override) || - (ap_adapter->device_mode == QDF_P2P_GO_MODE && - !hdd_ctx->config->go_force_11n_for_11ac && - hdd_ctx->config->go_11ac_override))) { + status = ucfg_mlme_get_sub_20_chan_width(hdd_ctx->psoc, + &sub_20_chan_width); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get sub_20_chan_width config"); + return -EIO; + } + + if (!sub_20_chan_width && + (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n || + sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac || + sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY || + sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax || + sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) && + ((ap_adapter->device_mode == QDF_SAP_MODE && + !hdd_ctx->config->sap_force_11n_for_11ac && + hdd_ctx->config->sap_11ac_override) || + (ap_adapter->device_mode == QDF_P2P_GO_MODE && + !hdd_ctx->config->go_force_11n_for_11ac && + hdd_ctx->config->go_11ac_override))) { hdd_debug("** Driver force 11AC override for SAP/Go **"); /* 11n only shall not be overridden since it may be on purpose*/ @@ -5086,15 +5094,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, /* Enable OBSS protection */ pConfig->obssProtEnabled = iniConfig->apOBSSProtEnabled; - if (adapter->device_mode == QDF_SAP_MODE) - pConfig->sap_dot11mc = - (WLAN_HDD_GET_CTX(adapter))->config->sap_dot11mc; - else /* for P2P-Go case */ - pConfig->sap_dot11mc = 1; - - hdd_debug("11MC Support Enabled : %d\n", - pConfig->sap_dot11mc); - #ifdef WLAN_FEATURE_11W pConfig->mfpCapable = MFPCapable; pConfig->mfpRequired = MFPRequired; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 6bf7358a5a..0739973ee8 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1696,6 +1696,7 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) uint8_t temp_band_cap, band_capability; struct cds_config_info *cds_cfg = cds_get_ini_config(); uint8_t antenna_mode; + uint8_t sub_20_chan_width; QDF_STATUS status; mac_handle_t mac_handle; bool bval = false; @@ -1747,15 +1748,21 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) ucfg_ipa_reg_send_to_nw_cb(hdd_ctx->pdev, hdd_ipa_send_skb_to_network); + status = ucfg_mlme_get_sub_20_chan_width(hdd_ctx->psoc, + &sub_20_chan_width); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get sub_20_chan_width config"); + return; + } + if (cds_cfg) { - if (hdd_ctx->config->enable_sub_20_channel_width != - WLAN_SUB_20_CH_WIDTH_NONE && !cfg->sub_20_support) { + if (sub_20_chan_width != + WLAN_SUB_20_CH_WIDTH_NONE && !cfg->sub_20_support) { hdd_err("User requested sub 20 MHz channel width but unsupported by FW."); cds_cfg->sub_20_channel_width = WLAN_SUB_20_CH_WIDTH_NONE; } else { - cds_cfg->sub_20_channel_width = - hdd_ctx->config->enable_sub_20_channel_width; + cds_cfg->sub_20_channel_width = sub_20_chan_width; } } @@ -9034,7 +9041,8 @@ static struct hdd_context *hdd_context_create(struct device *dev) hdd_ctx->config->timer_multiplier); qdf_timer_set_multiplier(hdd_ctx->config->timer_multiplier); - cds_set_fatal_event(hdd_ctx->config->enable_fatal_event); + cds_set_fatal_event(cfg_get(hdd_ctx->psoc, + CFG_ENABLE_FATAL_EVENT_TRIGGER)); hdd_override_ini_config(hdd_ctx); @@ -9427,7 +9435,10 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) struct cds_config_info *cds_cfg; int value; uint8_t band_capability; + uint8_t ito_repeat_count; bool crash_inject; + bool self_recovery; + bool fw_timeout_crash; QDF_STATUS status; cds_cfg = (struct cds_config_info *)qdf_mem_malloc(sizeof(*cds_cfg)); @@ -9447,12 +9458,32 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) cds_cfg->dfs_phyerr_filter_offload = hdd_ctx->config->fDfsPhyerrFilterOffload; - status = ucfg_mlme_get_crash_inject_cfg(hdd_ctx->psoc, &crash_inject); + status = ucfg_mlme_get_crash_inject(hdd_ctx->psoc, &crash_inject); if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Failed to get crash inject ini config"); goto exit; } + status = ucfg_mlme_get_self_recovery(hdd_ctx->psoc, &self_recovery); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get self recovery ini config"); + goto exit; + } + + status = ucfg_mlme_get_fw_timeout_crash(hdd_ctx->psoc, + &fw_timeout_crash); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get fw timeout crash ini config"); + goto exit; + } + + status = ucfg_mlme_get_ito_repeat_count(hdd_ctx->psoc, + &ito_repeat_count); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("Failed to get ITO repeat count ini config"); + goto exit; + } + cds_cfg->force_target_assert_enabled = crash_inject; ucfg_mlme_get_sap_max_offload_peers(hdd_ctx->psoc, &value); @@ -9504,12 +9535,12 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) cds_cfg->flow_steering_enabled = hdd_ctx->config->flow_steering_enable; cds_cfg->max_msdus_per_rxinorderind = hdd_ctx->config->max_msdus_per_rxinorderind; - cds_cfg->self_recovery_enabled = hdd_ctx->config->enableSelfRecovery; - cds_cfg->fw_timeout_crash = hdd_ctx->config->fw_timeout_crash; + cds_cfg->self_recovery_enabled = self_recovery; + cds_cfg->fw_timeout_crash = fw_timeout_crash; cds_cfg->active_uc_apf_mode = hdd_ctx->config->active_uc_apf_mode; cds_cfg->active_mc_bc_apf_mode = hdd_ctx->config->active_mc_bc_apf_mode; - cds_cfg->ito_repeat_count = hdd_ctx->config->ito_repeat_count; + cds_cfg->ito_repeat_count = ito_repeat_count; status = ucfg_mlme_get_band_capability(hdd_ctx->psoc, &band_capability); if (QDF_IS_STATUS_ERROR(status)) @@ -9564,8 +9595,6 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx) hdd_ctx->config->Is11dSupportEnabled; user_config->is_11h_support_enabled = hdd_ctx->config->Is11hSupportEnabled; - user_config->optimize_chan_avoid_event = - hdd_ctx->config->goptimize_chan_avoid_event; cfg_p2p_get_skip_dfs_channel_p2p_search(hdd_ctx->psoc, &skip_dfs_in_p2p_search); user_config->skip_dfs_chnl_in_p2p_search = skip_dfs_in_p2p_search; @@ -10507,13 +10536,10 @@ static int hdd_features_init(struct hdd_context *hdd_ctx) return ret; } - if (hdd_ctx->config->goptimize_chan_avoid_event) { - status = sme_enable_disable_chanavoidind_event( - mac_handle, 0); - if (!QDF_IS_STATUS_SUCCESS(status)) { - hdd_err("Failed to disable Chan Avoidance Indication"); - goto deregister_cb; - } + status = sme_enable_disable_chanavoidind_event(mac_handle, 0); + if (QDF_IS_STATUS_ERROR(status) && (status != QDF_STATUS_E_NOSUPPORT)) { + hdd_err("Failed to disable Chan Avoidance Indication"); + goto deregister_cb; } /* register P2P Listen Offload event callback */ @@ -13491,11 +13517,17 @@ static void hdd_update_ol_config(struct hdd_context *hdd_ctx) { struct ol_config_info cfg; struct ol_context *ol_ctx = cds_get_context(QDF_MODULE_ID_BMI); + bool self_recovery = false; + QDF_STATUS status; if (!ol_ctx) return; - cfg.enable_self_recovery = hdd_ctx->config->enableSelfRecovery; + status = ucfg_mlme_get_self_recovery(hdd_ctx->psoc, &self_recovery); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("Failed to get self recovery ini config"); + + cfg.enable_self_recovery = self_recovery; cfg.enable_uart_print = hdd_ctx->config->enablefwprint; cfg.enable_fw_log = hdd_ctx->config->enable_fw_log; cfg.enable_ramdump_collection = hdd_ctx->config->is_ramdump_enabled; @@ -13537,17 +13569,22 @@ static void hdd_update_hif_config(struct hdd_context *hdd_ctx) struct hif_opaque_softc *scn = cds_get_context(QDF_MODULE_ID_HIF); struct hif_config_info cfg; bool prevent_link_down = false; + bool self_recovery = false; QDF_STATUS status; if (!scn) return; - status = ucfg_mlme_get_prevent_link_down_cfg(hdd_ctx->psoc, - &prevent_link_down); + status = ucfg_mlme_get_prevent_link_down(hdd_ctx->psoc, + &prevent_link_down); if (QDF_IS_STATUS_ERROR(status)) hdd_err("Failed to get prevent_link_down config"); - cfg.enable_self_recovery = hdd_ctx->config->enableSelfRecovery; + status = ucfg_mlme_get_self_recovery(hdd_ctx->psoc, &self_recovery); + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("Failed to get self recovery ini config"); + + cfg.enable_self_recovery = self_recovery; hdd_populate_runtime_cfg(hdd_ctx, &cfg); hif_init_ini_config(scn, &cfg); @@ -13857,8 +13894,8 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx) uint8_t scan_bucket_thre; uint8_t select_5ghz_margin; - status = ucfg_mlme_get_select_5ghz_margin_cfg(hdd_ctx->psoc, - &select_5ghz_margin); + status = ucfg_mlme_get_select_5ghz_margin(hdd_ctx->psoc, + &select_5ghz_margin); if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Failed to get select_5ghz_margin"); return -EIO; @@ -13974,11 +14011,6 @@ int hdd_enable_disable_ca_event(struct hdd_context *hdd_ctx, uint8_t set_value) if (0 != wlan_hdd_validate_context(hdd_ctx)) return -EAGAIN; - if (!hdd_ctx->config->goptimize_chan_avoid_event) { - hdd_warn("goptimize_chan_avoid_event ini param disabled"); - return -EINVAL; - } - status = sme_enable_disable_chanavoidind_event(hdd_ctx->mac_handle, set_value); if (!QDF_IS_STATUS_SUCCESS(status)) { diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index dd125aa374..bbaab44841 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -455,6 +455,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, enum scan_reject_states curr_reason; static uint32_t scan_ebusy_cnt; struct scan_params params = {0}; + bool self_recovery; + QDF_STATUS qdf_status; hdd_enter(); @@ -482,6 +484,12 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, if (!sme_is_session_id_valid(hdd_ctx->mac_handle, adapter->session_id)) return -EINVAL; + qdf_status = ucfg_mlme_get_self_recovery(hdd_ctx->psoc, &self_recovery); + if (QDF_IS_STATUS_ERROR(qdf_status)) { + hdd_err("Failed to get self recovery ini config"); + return -EIO; + } + if ((eConnectionState_Associated == WLAN_HDD_GET_STATION_CTX_PTR(adapter)-> conn_info.connState) && @@ -574,12 +582,12 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, jiffies); hdd_ctx->last_scan_reject_timestamp = 0; hdd_ctx->scan_reject_cnt = 0; - if (hdd_ctx->config->enable_fatal_event) { + if (cds_is_fatal_event_enabled()) { cds_flush_logs(WLAN_LOG_TYPE_FATAL, WLAN_LOG_INDICATOR_HOST_DRIVER, WLAN_LOG_REASON_SCAN_NOT_ALLOWED, false, - hdd_ctx->config->enableSelfRecovery); + self_recovery); } else { hdd_err("Triggering SSR due to scan stuck"); cds_trigger_recovery(SCAN_FAILURE); diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index a9da38dda7..a57ce1e1de 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -8953,7 +8953,7 @@ int hdd_crash_inject(struct hdd_adapter *adapter, uint32_t v1, uint32_t v2) v1, v2); hdd_ctx = WLAN_HDD_GET_CTX(adapter); - status = ucfg_mlme_get_crash_inject_cfg(hdd_ctx->psoc, &crash_inject); + status = ucfg_mlme_get_crash_inject(hdd_ctx->psoc, &crash_inject); if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Failed to get crash inject ini config"); return 0; diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index de62a062cd..84d8af0975 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -327,7 +327,7 @@ lim_trigger_sta_deletion(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds, mlm_disassoc_ind.sessionId = session_entry->peSessionId; lim_post_sme_message(mac_ctx, LIM_MLM_DISASSOC_IND, (uint32_t *) &mlm_disassoc_ind); - if (mac_ctx->roam.configParam.enable_fatal_event) + if (mac_ctx->mlme_cfg->gen.fatal_event_trigger) cds_flush_logs(WLAN_LOG_TYPE_FATAL, WLAN_LOG_INDICATOR_HOST_DRIVER, WLAN_LOG_REASON_HB_FAILURE, @@ -429,7 +429,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId, if (LIM_IS_STA_ROLE(psessionEntry)) lim_post_sme_message(pMac, LIM_MLM_DEAUTH_IND, (uint32_t *) &mlmDeauthInd); - if (pMac->roam.configParam.enable_fatal_event) + if (pMac->mlme_cfg->gen.fatal_event_trigger) cds_flush_logs(WLAN_LOG_TYPE_FATAL, WLAN_LOG_INDICATOR_HOST_DRIVER, WLAN_LOG_REASON_HB_FAILURE, diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c index 6be8862722..5816ce45b9 100644 --- a/core/mac/src/pe/lim/lim_process_deauth_frame.c +++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c @@ -156,14 +156,14 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, reasonCode, lim_dot11_reason_str(reasonCode), MAC_ADDR_ARRAY(pHdr->sa)); - if (pMac->roam.configParam.enable_fatal_event && - (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && - reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && - reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { + if (pMac->mlme_cfg->gen.fatal_event_trigger && + (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && + reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && + reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { cds_flush_logs(WLAN_LOG_TYPE_FATAL, - WLAN_LOG_INDICATOR_HOST_DRIVER, - WLAN_LOG_REASON_DISCONNECT, - false, false); + WLAN_LOG_INDICATOR_HOST_DRIVER, + WLAN_LOG_REASON_DISCONNECT, + false, false); } lim_diag_event_report(pMac, WLAN_PE_DIAG_DEAUTH_FRAME_EVENT, diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c index 99ca91f7ac..97a284c6ea 100644 --- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c +++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c @@ -155,14 +155,14 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_FRAME_EVENT, psessionEntry, 0, reasonCode); - if (pMac->roam.configParam.enable_fatal_event && - (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && - reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && - reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { + if (pMac->mlme_cfg->gen.fatal_event_trigger && + (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && + reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && + reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { cds_flush_logs(WLAN_LOG_TYPE_FATAL, - WLAN_LOG_INDICATOR_HOST_DRIVER, - WLAN_LOG_REASON_DISCONNECT, - false, false); + WLAN_LOG_INDICATOR_HOST_DRIVER, + WLAN_LOG_REASON_DISCONNECT, + false, false); } /** * Extract 'associated' context for STA, if any. diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index cf554101f1..bf027952ae 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -607,7 +607,6 @@ typedef struct sap_config { uint16_t probeRespBcnIEsLen; /* buffer for addn ies comes from hostapd */ void *pProbeRespBcnIEsBuffer; - uint8_t sap_dot11mc; /* Specify if 11MC is enabled or disabled*/ uint16_t beacon_tx_rate; uint8_t *vendor_ie; enum vendor_ie_access_policy vendor_ie_access_policy; diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index a26ee95d77..e242554ffc 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -3036,7 +3036,6 @@ sapconvert_to_csr_profile(tsap_config_t *pconfig_params, eCsrRoamBssType bssType profile->addIeParams.probeRespBCNDataLen = 0; profile->addIeParams.probeRespBCNData_buff = NULL; } - profile->sap_dot11mc = pconfig_params->sap_dot11mc; if (pconfig_params->supported_rates.numRates) { qdf_mem_copy(profile->supported_rates.rate, diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 57354935df..e736890208 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -883,7 +883,6 @@ struct csr_roam_profile { uint8_t disableDFSChSwitch; /* addIe params */ tSirAddIeParams addIeParams; - uint8_t sap_dot11mc; uint16_t beacon_tx_rate; tSirMacRateSet supported_rates; tSirMacRateSet extended_rates; @@ -1174,7 +1173,6 @@ typedef struct tagCsrConfigParam { uint8_t max_scan_count; int8_t first_scan_bucket_threshold; uint8_t max_intf_count; - bool enableSelfRecovery; uint32_t f_sta_miracast_mcc_rest_time_val; #ifdef FEATURE_AP_MCC_CH_AVOIDANCE bool sap_channel_avoidance; @@ -1202,7 +1200,6 @@ typedef struct tagCsrConfigParam { uint32_t edca_vi_aifs; uint32_t edca_bk_aifs; uint32_t edca_be_aifs; - bool enable_fatal_event; enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode; enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc; struct csr_sta_roam_policy_params sta_roam_policy_params; @@ -1215,7 +1212,6 @@ typedef struct tagCsrConfigParam { uint16_t wlm_latency_enable; uint16_t wlm_latency_level; uint32_t wlm_latency_flags[CSR_NUM_WLM_LATENCY_LEVEL]; - uint16_t pkt_err_disconn_th; bool is_force_1x1; uint8_t oce_feature_bitmap; uint32_t btm_offload_config; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index 6ed7ee484d..0c1f8a4ea2 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -528,7 +528,6 @@ struct csr_config { uint32_t edca_vi_aifs; uint32_t edca_bk_aifs; uint32_t edca_be_aifs; - bool enable_fatal_event; bool vendor_vht_sap; enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode; enum scan_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc; @@ -539,7 +538,6 @@ struct csr_config { bool enable_ul_ofdma; bool enable_ul_mimo; #endif - uint16_t pkt_err_disconn_th; bool is_force_1x1; uint16_t wlm_latency_enable; uint16_t wlm_latency_level; diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h index f7c5cf45fd..39dbae12f1 100644 --- a/core/sme/inc/sme_internal.h +++ b/core/sme/inc/sme_internal.h @@ -306,7 +306,6 @@ typedef struct tagSmeStruct { #ifdef WLAN_FEATURE_NAN nan_callback nan_callback; #endif - bool enableSelfRecovery; csr_link_status_callback link_status_callback; void *link_status_context; int (*get_tsf_cb)(void *pcb_cxt, struct stsf *ptsf); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index ff5d0f1b1a..9f33c307c0 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -439,12 +439,12 @@ tSmeCmd *sme_get_command_buffer(tpAniSirGlobal pMac) } csr_nonscan_pending_ll_unlock(pMac); - if (pMac->roam.configParam.enable_fatal_event) + if (pMac->mlme_cfg->gen.fatal_event_trigger) cds_flush_logs(WLAN_LOG_TYPE_FATAL, WLAN_LOG_INDICATOR_HOST_DRIVER, WLAN_LOG_REASON_SME_OUT_OF_CMD_BUF, false, - pMac->sme.enableSelfRecovery ? true : false); + pMac->mlme_cfg->gen.self_recovery); else cds_trigger_recovery(QDF_GET_MSG_BUFF_FAILURE); } @@ -14709,6 +14709,11 @@ QDF_STATUS sme_enable_disable_chanavoidind_event(tHalHandle hal, tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); struct scheduler_msg msg = {0}; + if (!mac_ctx->mlme_cfg->gen.optimize_ca_event) { + sme_err("optimize_ca_event not enabled in ini"); + return QDF_STATUS_E_NOSUPPORT; + } + sme_debug("set_value: %d", set_value); status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_STATUS_SUCCESS == status) { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index e3f517649b..afa4198dad 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2766,8 +2766,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, int i; if (pParam) { - pMac->roam.configParam.pkt_err_disconn_th = - pParam->pkt_err_disconn_th; pMac->roam.configParam.is_force_1x1 = pParam->is_force_1x1; pMac->roam.configParam.WMMSupportMode = pParam->WMMSupportMode; @@ -3057,8 +3055,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, /* update interface configuration */ pMac->sme.max_intf_count = pParam->max_intf_count; - pMac->sme.enableSelfRecovery = pParam->enableSelfRecovery; - pMac->f_sta_miracast_mcc_rest_time_val = pParam->f_sta_miracast_mcc_rest_time_val; #ifdef FEATURE_AP_MCC_CH_AVOIDANCE @@ -3094,8 +3090,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac, pMac->roam.configParam.edca_bk_aifs = pParam->edca_bk_aifs; pMac->roam.configParam.edca_be_aifs = pParam->edca_be_aifs; - pMac->roam.configParam.enable_fatal_event = - pParam->enable_fatal_event; pMac->roam.configParam.sta_roam_policy.dfs_mode = pParam->sta_roam_policy_params.dfs_mode; pMac->roam.configParam.sta_roam_policy.skip_unsafe_channels = @@ -3176,7 +3170,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) if (!pParam) return QDF_STATUS_E_INVAL; - pParam->pkt_err_disconn_th = cfg_params->pkt_err_disconn_th; pParam->is_force_1x1 = cfg_params->is_force_1x1; pParam->WMMSupportMode = cfg_params->WMMSupportMode; pParam->Is11eSupportEnabled = cfg_params->Is11eSupportEnabled; @@ -3295,7 +3288,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pParam->sap_channel_avoidance = pMac->sap.sap_channel_avoidance; #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ pParam->max_intf_count = pMac->sme.max_intf_count; - pParam->enableSelfRecovery = pMac->sme.enableSelfRecovery; pParam->f_prefer_non_dfs_on_radar = pMac->f_prefer_non_dfs_on_radar; pParam->dual_mac_feature_disable = @@ -3327,8 +3319,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam) pParam->edca_vi_aifs = pMac->roam.configParam.edca_vi_aifs; pParam->edca_bk_aifs = pMac->roam.configParam.edca_bk_aifs; pParam->edca_be_aifs = pMac->roam.configParam.edca_be_aifs; - pParam->enable_fatal_event = - pMac->roam.configParam.enable_fatal_event; pParam->sta_roam_policy_params.dfs_mode = pMac->roam.configParam.sta_roam_policy.dfs_mode; pParam->sta_roam_policy_params.skip_unsafe_channels = @@ -8193,7 +8183,6 @@ QDF_STATUS csr_roam_copy_profile(tpAniSirGlobal pMac, pDstProfile->cfg_protection = pSrcProfile->cfg_protection; pDstProfile->wps_state = pSrcProfile->wps_state; pDstProfile->ieee80211d = pSrcProfile->ieee80211d; - pDstProfile->sap_dot11mc = pSrcProfile->sap_dot11mc; pDstProfile->supplicant_disabled_roaming = pSrcProfile->supplicant_disabled_roaming; qdf_mem_copy(&pDstProfile->Keys, &pSrcProfile->Keys, @@ -14202,7 +14191,14 @@ QDF_STATUS csr_roam_issue_start_bss(tpAniSirGlobal pMac, uint32_t sessionId, pParam->addIeParams.probeRespBCNData_buff = pProfile->addIeParams.probeRespBCNData_buff; } - pParam->sap_dot11mc = pProfile->sap_dot11mc; + + if (pProfile->csrPersona == QDF_SAP_MODE) + pParam->sap_dot11mc = pMac->mlme_cfg->gen.sap_dot11mc; + else + pParam->sap_dot11mc = 1; + + sme_debug("11MC Support Enabled : %d", pParam->sap_dot11mc); + pParam->cac_duration_ms = pProfile->cac_duration_ms; pParam->dfs_regdomain = pProfile->dfs_regdomain; pParam->beacon_tx_rate = pProfile->beacon_tx_rate; @@ -17066,7 +17062,7 @@ QDF_STATUS csr_issue_add_sta_for_session_req(tpAniSirGlobal pMac, add_sta_self_req->fils_max_chan_guard_time = pMac->mlme_cfg->sta.fils_max_chan_guard_time; add_sta_self_req->pkt_err_disconn_th = - pMac->roam.configParam.pkt_err_disconn_th; + pMac->mlme_cfg->gen.dropped_pkt_disconnect_thresh; add_sta_self_req->oce_feature_bitmap = pMac->mlme_cfg->oce.feature_bitmap; @@ -20965,7 +20961,7 @@ void csr_process_ho_fail_ind(tpAniSirGlobal mac_ctx, void *pMsgBuf) "LFR3:Issue Disconnect on session %d", sessionId); csr_roam_disconnect(mac_ctx, sessionId, eCSR_DISCONNECT_REASON_ROAM_HO_FAIL); - if (mac_ctx->roam.configParam.enable_fatal_event) + if (mac_ctx->mlme_cfg->gen.fatal_event_trigger) cds_flush_logs(WLAN_LOG_TYPE_FATAL, WLAN_LOG_INDICATOR_HOST_DRIVER, WLAN_LOG_REASON_ROAM_HO_FAILURE,