qcacld-3.0: Refactor CFG_WMI_WQ_WATCHDOG cfg

Refactor following  CFG_WMI_WQ_WATCHDOG cfg items.

Change-Id: Ib65c6cda2a2574940604e8b67bc29a6749add842
CRs-Fixed: 2357070
This commit is contained in:
Arif Hussain 2018-11-27 16:40:51 -08:00 • committed by nshrivas
commit 4966f697ef
7 changed files with 96 additions and 31 deletions

View file

@ -585,6 +585,8 @@ static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_AP_LINK_MONITOR_TIMEOUT);
timeouts->ps_data_inactivity_timeout =
cfg_get(psoc, CFG_PS_DATA_INACTIVITY_TIMEOUT);
timeouts->wmi_wq_watchdog_timeout =
cfg_get(psoc, CFG_WMI_WQ_WATCHDOG);
}
static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,

View file

@ -285,6 +285,32 @@
CFG_VALUE_OR_DEFAULT, \
"PS data inactivity timeout")
/*
* <ini>
* wmi_wq_watchdog - Sets timeout period for wmi watchdog bite.
* @Min: 0
* @Max: 30
* @Default: 20
*
* This ini is used to set timeout period for wmi watchdog bite. If it is
* 0 then wmi watchdog bite is disabled.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_WMI_WQ_WATCHDOG CFG_INI_UINT( \
"wmi_wq_watchdog", \
0, \
30, \
20, \
CFG_VALUE_OR_DEFAULT, \
"timeout period for wmi watchdog bite")
#define CFG_TIMEOUT_ALL \
CFG(CFG_JOIN_FAILURE_TIMEOUT) \
CFG(CFG_AUTH_FAILURE_TIMEOUT) \
@ -297,6 +323,7 @@
CFG(CFG_HEART_BEAT_THRESHOLD) \
CFG(CFG_AP_KEEP_ALIVE_TIMEOUT) \
CFG(CFG_AP_LINK_MONITOR_TIMEOUT) \
CFG(CFG_WMI_WQ_WATCHDOG) \
CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)
#endif /* __CFG_MLME_TIMEOUT_H */

View file

@ -1568,6 +1568,7 @@ struct wlan_mlme_power {
* @ap_keep_alive_timeout: AP keep alive timeout value
* @ap_link_monitor_timeout: AP link monitor timeout value
* @ps_data_inactivity_timeout: PS data inactivity timeout
* @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
*/
struct wlan_mlme_timeout {
uint32_t join_failure_timeout;
@ -1582,6 +1583,7 @@ struct wlan_mlme_timeout {
uint32_t ap_keep_alive_timeout;
uint32_t ap_link_monitor_timeout;
uint32_t ps_data_inactivity_timeout;
uint32_t wmi_wq_watchdog_timeout;
};
/**

View file

@ -1203,6 +1203,28 @@ QDF_STATUS
ucfg_mlme_set_fast_roam_in_concurrency_enabled(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_get_wmi_wq_watchdog_timeout() - Get timeout for wmi watchdog bite
* @psoc: pointer to psoc object
* @wmi_wq_watchdog_timeout: buffer to hold value
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_wmi_wq_watchdog_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *wmi_wq_watchdog_timeout);
/**
* ucfg_mlme_set_wmi_wq_watchdog_timeout() - Set timeout for wmi watchdog bite
* @psoc: pointer to psoc object
* @wmi_wq_watchdog_timeout: value to be set
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_wmi_wq_watchdog_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t wmi_wq_watchdog_timeout);
/**
* ucfg_mlme_get_ps_data_inactivity_timeout() - Get data inactivity timeout
* @psoc: pointer to psoc object

View file

@ -1118,6 +1118,49 @@ ucfg_mlme_get_current_mcs_set(struct wlan_objmgr_psoc *psoc,
len);
}
QDF_STATUS
ucfg_mlme_get_wmi_wq_watchdog_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *wmi_wq_watchdog_timeout)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*wmi_wq_watchdog_timeout = cfg_default(CFG_WMI_WQ_WATCHDOG);
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
*wmi_wq_watchdog_timeout =
mlme_obj->cfg.timeouts.wmi_wq_watchdog_timeout;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_wmi_wq_watchdog_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t wmi_wq_watchdog_timeout)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
if (!cfg_in_range(CFG_WMI_WQ_WATCHDOG, wmi_wq_watchdog_timeout)) {
mlme_err("wmi watchdog bite timeout is invalid %d",
wmi_wq_watchdog_timeout);
return QDF_STATUS_E_INVAL;
}
mlme_obj->cfg.timeouts.wmi_wq_watchdog_timeout =
wmi_wq_watchdog_timeout;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *inactivity_timeout)

View file

@ -4434,29 +4434,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX (300)
#define CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_DEFAULT (3)
/*
* <ini>
* wmi_wq_watchdog - Sets timeout period for wmi watchdog bite
* @Min: 0
* @Max: 30
* @Default: 20
*
* This ini is used to set timeout period for wmi watchdog bite. If it is
* 0 then wmi watchdog bite is disabled.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_WMI_WQ_WATCHDOG "wmi_wq_watchdog"
#define CFG_WMI_WQ_WATCHDOG_MIN (0)
#define CFG_WMI_WQ_WATCHDOG_MAX (30) /* 30s */
#define CFG_WMI_WQ_WATCHDOG_DEFAULT (20) /* 20s */
/*
* <ini>
* gEnableDTIMSelectionDiversity - Enable/Disable chain
@ -5253,7 +5230,6 @@ struct hdd_config {
uint32_t neighbor_report_offload_max_req_cap;
bool action_oui_enable;
uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN];
uint16_t wmi_wq_watchdog_timeout;
uint8_t enable_tx_sch_delay;
uint32_t enable_secondary_rate;
bool is_unit_test_framework_enabled;

View file

@ -1272,13 +1272,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MIN,
CFG_OFFLOAD_NEIGHBOR_REPORT_MAX_REQ_CAP_MAX),
REG_VARIABLE(CFG_WMI_WQ_WATCHDOG, WLAN_PARAM_Integer,
struct hdd_config, wmi_wq_watchdog_timeout,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_WMI_WQ_WATCHDOG_DEFAULT,
CFG_WMI_WQ_WATCHDOG_MIN,
CFG_WMI_WQ_WATCHDOG_MAX),
REG_VARIABLE(CFG_DTIM_SELECTION_DIVERSITY_NAME,
WLAN_PARAM_Integer,
struct hdd_config, enable_dtim_selection_diversity,