mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Add ucfg api to get/set ps data inactivity timeout
Add and use ucfg api to get/set ps data inactivity timeout value. Change-Id: I8b0931870507aac146a18b70103c323bea1ca6f3 CRs-Fixed: 2335980
This commit is contained in:
parent
ec85d5d076
commit
41cbc1e9a5
3 changed files with 70 additions and 15 deletions
|
|
@ -772,6 +772,29 @@ ucfg_mlme_set_roaming_offload(struct wlan_objmgr_psoc *psoc,
|
|||
QDF_STATUS
|
||||
ucfg_mlme_get_first_scan_bucket_threshold(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_ps_data_inactivity_timeout() - Get data inactivity timeout
|
||||
* @psoc: pointer to psoc object
|
||||
* @inactivity_timeout: buffer to hold value
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *inactivity_timeout);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_ps_data_inactivity_timeout() - Set data inactivity timeout
|
||||
* @psoc: pointer to psoc object
|
||||
* @inactivity_timeout: value to be set
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t inactivity_timeout);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_sap_listen_interval() - Set the Sap listen interval
|
||||
* @psoc: pointer to psoc object
|
||||
|
|
|
|||
|
|
@ -466,3 +466,45 @@ ucfg_mlme_get_current_mcs_set(struct wlan_objmgr_psoc *psoc,
|
|||
&mlme_obj->cfg.rates.current_mcs_set,
|
||||
len);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *inactivity_timeout)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*inactivity_timeout =
|
||||
cfg_default(CFG_PS_DATA_INACTIVITY_TIMEOUT);
|
||||
mlme_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*inactivity_timeout = mlme_obj->cfg.timeouts.ps_data_inactivity_timeout;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t inactivity_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_PS_DATA_INACTIVITY_TIMEOUT, inactivity_timeout)) {
|
||||
mlme_err("inactivity timeout set value is invalid %d",
|
||||
inactivity_timeout);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
mlme_obj->cfg.timeouts.ps_data_inactivity_timeout = inactivity_timeout;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4160,25 +4160,15 @@ static int hdd_we_set_max_assoc(struct hdd_adapter *adapter, int value)
|
|||
}
|
||||
|
||||
static int hdd_we_set_data_inactivity_timeout(struct hdd_adapter *adapter,
|
||||
int value)
|
||||
int inactivity_timeout)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
||||
struct mac_context *mac_ctx;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!mac_handle)
|
||||
return -EINVAL;
|
||||
status = ucfg_mlme_set_ps_data_inactivity_timeout(hdd_ctx->psoc,
|
||||
inactivity_timeout);
|
||||
|
||||
if (!cfg_in_range(CFG_PS_DATA_INACTIVITY_TIMEOUT, value)) {
|
||||
hdd_err_rl("Invalid value %d", value);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* pre-existing layering violation */
|
||||
mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
mac_ctx->mlme_cfg->timeouts.ps_data_inactivity_timeout = value;
|
||||
|
||||
return 0;
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
static int hdd_we_set_wow_data_inactivity_timeout(struct hdd_adapter *adapter,
|
||||
|
|
|
|||
Loading…
Reference in a new issue