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:
@@ -585,6 +585,8 @@ static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
cfg_get(psoc, CFG_AP_LINK_MONITOR_TIMEOUT);
|
cfg_get(psoc, CFG_AP_LINK_MONITOR_TIMEOUT);
|
||||||
timeouts->ps_data_inactivity_timeout =
|
timeouts->ps_data_inactivity_timeout =
|
||||||
cfg_get(psoc, CFG_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,
|
static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
|
@@ -285,6 +285,32 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"PS data inactivity timeout")
|
"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 \
|
#define CFG_TIMEOUT_ALL \
|
||||||
CFG(CFG_JOIN_FAILURE_TIMEOUT) \
|
CFG(CFG_JOIN_FAILURE_TIMEOUT) \
|
||||||
CFG(CFG_AUTH_FAILURE_TIMEOUT) \
|
CFG(CFG_AUTH_FAILURE_TIMEOUT) \
|
||||||
@@ -297,6 +323,7 @@
|
|||||||
CFG(CFG_HEART_BEAT_THRESHOLD) \
|
CFG(CFG_HEART_BEAT_THRESHOLD) \
|
||||||
CFG(CFG_AP_KEEP_ALIVE_TIMEOUT) \
|
CFG(CFG_AP_KEEP_ALIVE_TIMEOUT) \
|
||||||
CFG(CFG_AP_LINK_MONITOR_TIMEOUT) \
|
CFG(CFG_AP_LINK_MONITOR_TIMEOUT) \
|
||||||
|
CFG(CFG_WMI_WQ_WATCHDOG) \
|
||||||
CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)
|
CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)
|
||||||
|
|
||||||
#endif /* __CFG_MLME_TIMEOUT_H */
|
#endif /* __CFG_MLME_TIMEOUT_H */
|
||||||
|
@@ -1568,6 +1568,7 @@ struct wlan_mlme_power {
|
|||||||
* @ap_keep_alive_timeout: AP keep alive timeout value
|
* @ap_keep_alive_timeout: AP keep alive timeout value
|
||||||
* @ap_link_monitor_timeout: AP link monitor timeout value
|
* @ap_link_monitor_timeout: AP link monitor timeout value
|
||||||
* @ps_data_inactivity_timeout: PS data inactivity timeout
|
* @ps_data_inactivity_timeout: PS data inactivity timeout
|
||||||
|
* @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
|
||||||
*/
|
*/
|
||||||
struct wlan_mlme_timeout {
|
struct wlan_mlme_timeout {
|
||||||
uint32_t join_failure_timeout;
|
uint32_t join_failure_timeout;
|
||||||
@@ -1582,6 +1583,7 @@ struct wlan_mlme_timeout {
|
|||||||
uint32_t ap_keep_alive_timeout;
|
uint32_t ap_keep_alive_timeout;
|
||||||
uint32_t ap_link_monitor_timeout;
|
uint32_t ap_link_monitor_timeout;
|
||||||
uint32_t ps_data_inactivity_timeout;
|
uint32_t ps_data_inactivity_timeout;
|
||||||
|
uint32_t wmi_wq_watchdog_timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1203,6 +1203,28 @@ QDF_STATUS
|
|||||||
ucfg_mlme_set_fast_roam_in_concurrency_enabled(struct wlan_objmgr_psoc *psoc,
|
ucfg_mlme_set_fast_roam_in_concurrency_enabled(struct wlan_objmgr_psoc *psoc,
|
||||||
bool val);
|
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
|
* ucfg_mlme_get_ps_data_inactivity_timeout() - Get data inactivity timeout
|
||||||
* @psoc: pointer to psoc object
|
* @psoc: pointer to psoc object
|
||||||
|
@@ -1118,6 +1118,49 @@ ucfg_mlme_get_current_mcs_set(struct wlan_objmgr_psoc *psoc,
|
|||||||
len);
|
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
|
QDF_STATUS
|
||||||
ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
|
ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t *inactivity_timeout)
|
uint32_t *inactivity_timeout)
|
||||||
|
Reference in New Issue
Block a user