qcacld-3.0: Refactor TWT cfg
Refactor following TWT cfg items. CFG_BCAST_TWT CFG_ENABLE_TWT CFG_TWT_RESPONDER CFG_TWT_REQUESTOR CFG_TWT_CONGESTION_TIMEOUT Change-Id: Iad0c2ed0893513cc98bf12ec39d111b78c6e9d1f CRs-Fixed: 2349558
This commit is contained in:
@@ -1067,6 +1067,16 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
#endif
|
||||
|
||||
static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_cfg_twt *twt_cfg)
|
||||
{
|
||||
twt_cfg->is_twt_bcast_enabled = cfg_get(psoc, CFG_BCAST_TWT);
|
||||
twt_cfg->is_twt_enabled = cfg_get(psoc, CFG_ENABLE_TWT);
|
||||
twt_cfg->is_twt_responder_enabled = cfg_get(psoc, CFG_TWT_RESPONDER);
|
||||
twt_cfg->is_twt_requestor_enabled = cfg_get(psoc, CFG_TWT_REQUESTOR);
|
||||
twt_cfg->twt_congestion_timeout = cfg_get(psoc, CFG_TWT_CONGESTION_TIMEOUT);
|
||||
}
|
||||
|
||||
static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_cfg_sap *sap_cfg)
|
||||
{
|
||||
@@ -1802,6 +1812,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
mlme_init_obss_ht40_cfg(psoc, &mlme_cfg->obss_ht40);
|
||||
mlme_init_product_details_cfg(&mlme_cfg->product_details);
|
||||
mlme_init_sta_cfg(psoc, &mlme_cfg->sta);
|
||||
mlme_init_twt_cfg(psoc, &mlme_cfg->twt_cfg);
|
||||
mlme_init_lfr_cfg(psoc, &mlme_cfg->lfr);
|
||||
mlme_init_feature_flag_in_cfg(psoc, &mlme_cfg->feature_flags);
|
||||
mlme_init_scoring_cfg(psoc, &mlme_cfg->scoring);
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include "cfg_sap_protection.h"
|
||||
#include "cfg_mlme_fe_wmm.h"
|
||||
#include "cfg_mlme_sap.h"
|
||||
#include "cfg_mlme_twt.h"
|
||||
#include "cfg_mlme_scoring.h"
|
||||
#include "cfg_mlme_oce.h"
|
||||
#include "cfg_mlme_threshold.h"
|
||||
@@ -74,6 +75,7 @@
|
||||
CFG_STA_ALL \
|
||||
CFG_THRESHOLD_ALL \
|
||||
CFG_TIMEOUT_ALL \
|
||||
CFG_TWT_ALL \
|
||||
CFG_VHT_CAPS_ALL \
|
||||
CFG_WEP_PARAMS_ALL \
|
||||
CFG_WPS_ALL
|
||||
|
149
components/mlme/dispatcher/inc/cfg_mlme_twt.h
Normal file
149
components/mlme/dispatcher/inc/cfg_mlme_twt.h
Normal file
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: This file contains centralized definitions of converged configuration.
|
||||
*/
|
||||
|
||||
#ifndef __CFG_MLME_TWT_H
|
||||
#define __CFG_MLME_TWT_H
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* twt_requestor - twt requestor.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This cfg is used to store twt requestor config.
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_TWT_REQUESTOR CFG_INI_BOOL( \
|
||||
"twt_requestor", \
|
||||
0, \
|
||||
"TWT requestor")
|
||||
/*
|
||||
* <ini>
|
||||
* twt_responder - twt responder.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This cfg is used to store twt responder config.
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_TWT_RESPONDER CFG_INI_BOOL( \
|
||||
"twt_responder", \
|
||||
0, \
|
||||
"TWT responder")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* bcast_twt - to bcast twt capability.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This cfg is used to bcast twt capability.
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_BCAST_TWT CFG_INI_BOOL( \
|
||||
"bcast_twt", \
|
||||
0, \
|
||||
"Bcast TWT")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* enable_twt - Enable Target Wake Time support.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to enable or disable TWT support.
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_TWT CFG_INI_BOOL( \
|
||||
"enable_twt", \
|
||||
1, \
|
||||
"TWT support")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* twt_congestion_timeout - Target wake time congestion timeout.
|
||||
* @Min: 0
|
||||
* @Max: 10000
|
||||
* @Default: 100
|
||||
*
|
||||
* STA uses this timer to continuously monitor channel congestion levels to
|
||||
* decide whether to start or stop TWT. This ini is used to configure the
|
||||
* target wake time congestion timeout value in the units of milliseconds.
|
||||
* A value of Zero indicates that this is a host triggered TWT and all the
|
||||
* necessary configuration for TWT will be directed from the host.
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_TWT_CONGESTION_TIMEOUT CFG_INI_UINT( \
|
||||
"twt_congestion_timeout", \
|
||||
0, \
|
||||
10000, \
|
||||
100, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"twt congestion timeout")
|
||||
|
||||
#define CFG_TWT_ALL \
|
||||
CFG(CFG_BCAST_TWT) \
|
||||
CFG(CFG_ENABLE_TWT) \
|
||||
CFG(CFG_TWT_REQUESTOR) \
|
||||
CFG(CFG_TWT_RESPONDER) \
|
||||
CFG(CFG_TWT_CONGESTION_TIMEOUT)
|
||||
|
||||
#endif /* __CFG_MLME_TWT_H */
|
@@ -944,6 +944,22 @@ struct wlan_mlme_acs {
|
||||
bool is_external_acs_policy;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct wlan_mlme_cfg_twt - All twt related cfg items
|
||||
* @is_twt_bcast_enabled: twt capability for the session
|
||||
* @is_twt_enabled: global twt configuration
|
||||
* @is_twt_responder_enabled: twt responder
|
||||
* @is_twt_requestor_enabled: twt requestor
|
||||
* @twt_congestion_timeout: congestion timeout value
|
||||
*/
|
||||
struct wlan_mlme_cfg_twt {
|
||||
bool is_twt_bcast_enabled;
|
||||
bool is_twt_enabled;
|
||||
bool is_twt_responder_enabled;
|
||||
bool is_twt_requestor_enabled;
|
||||
uint32_t twt_congestion_timeout;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_mlme_obss_ht40 - OBSS HT40 config items
|
||||
* @active_dwelltime: obss active dwelltime
|
||||
@@ -1585,6 +1601,7 @@ struct wlan_mlme_wep_cfg {
|
||||
* @oce: OCE related CFG items
|
||||
* @threshold: threshold related cfg items
|
||||
* @timeouts: mlme timeout related CFG items
|
||||
* @twt_cfg: TWT CFG Items
|
||||
* @acs: ACS related CFG items
|
||||
* @feature_flags: Feature flag config items
|
||||
* @wep_params: WEP related config items
|
||||
@@ -1615,6 +1632,7 @@ struct wlan_mlme_cfg {
|
||||
struct wlan_mlme_oce oce;
|
||||
struct wlan_mlme_threshold threshold;
|
||||
struct wlan_mlme_timeout timeouts;
|
||||
struct wlan_mlme_cfg_twt twt_cfg;
|
||||
struct wlan_mlme_acs acs;
|
||||
struct wlan_mlme_feature_flag feature_flags;
|
||||
struct wlan_mlme_wep_cfg wep_params;
|
||||
|
@@ -699,6 +699,116 @@ QDF_STATUS
|
||||
ucfg_mlme_set_pmkid_modes(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_requestor() - Get twt requestor
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: Pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_requestor() - Set twt requestor
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: value that needs to set to this config
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc *psoc,
|
||||
bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_responder() - Get twt responder
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: Pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_responder() - Set twt responder
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: value that needs to set to this config
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
|
||||
bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_bcast_twt() - Get bcast twt
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: Pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_bcast_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_bcast_twt() - Set bcast twt
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: value that needs to set to this config
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_bcast_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_congestion_timeout() - Get twt congestion timeout
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: Pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_congestion_timeout() - Set twt congestion timeout
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: value that needs to set to this config
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_enable_twt() - Get global twt config support
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: Pointer to the value which will be filled for the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_enable_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_enable_twt() - Set global twt config support
|
||||
* @psoc: pointer to psoc object
|
||||
* @val: value that needs to set to this config
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_enable_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_dot11p_mode() - Get the setting about 802.11p mode
|
||||
* @psoc: pointer to psoc object
|
||||
|
@@ -241,6 +241,181 @@ ucfg_mlme_set_pmkid_modes(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_TWT_REQUESTOR);
|
||||
mlme_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_twt_requestor_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc *psoc,
|
||||
bool val)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_twt_requestor_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_TWT_RESPONDER);
|
||||
mlme_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_twt_responder_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
|
||||
bool val)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_twt_responder_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_bcast_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_BCAST_TWT);
|
||||
mlme_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_twt_bcast_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_bcast_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool val)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_twt_bcast_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_TWT_CONGESTION_TIMEOUT);
|
||||
mlme_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.twt_congestion_timeout;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t val)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
mlme_obj->cfg.twt_cfg.twt_congestion_timeout = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_enable_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
*val = cfg_default(CFG_ENABLE_TWT);
|
||||
mlme_err("mlme obj null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_twt_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_enable_twt(struct wlan_objmgr_psoc *psoc,
|
||||
bool val)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_twt_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_dot11p_mode(struct wlan_objmgr_psoc *psoc,
|
||||
enum dot11p_mode *out_mode)
|
||||
|
@@ -34,35 +34,39 @@ void hdd_update_tgt_twt_cap(struct hdd_context *hdd_ctx,
|
||||
struct wma_tgt_cfg *cfg)
|
||||
{
|
||||
struct wma_tgt_services *services = &cfg->services;
|
||||
bool enable_twt = false;
|
||||
|
||||
ucfg_mlme_get_enable_twt(hdd_ctx->psoc, &enable_twt);
|
||||
hdd_debug("TWT: enable_twt=%d, tgt Req=%d, Res=%d",
|
||||
hdd_ctx->config->enable_twt, services->twt_requestor,
|
||||
enable_twt, services->twt_requestor,
|
||||
services->twt_responder);
|
||||
|
||||
sme_cfg_set_int(hdd_ctx->mac_handle, WNI_CFG_TWT_REQUESTOR,
|
||||
QDF_MIN(services->twt_requestor,
|
||||
hdd_ctx->config->enable_twt));
|
||||
ucfg_mlme_set_twt_requestor(hdd_ctx->psoc,
|
||||
QDF_MIN(services->twt_requestor,
|
||||
enable_twt));
|
||||
|
||||
sme_cfg_set_int(hdd_ctx->mac_handle, WNI_CFG_TWT_RESPONDER,
|
||||
QDF_MIN(services->twt_responder,
|
||||
hdd_ctx->config->enable_twt));
|
||||
ucfg_mlme_set_twt_responder(hdd_ctx->psoc,
|
||||
QDF_MIN(services->twt_responder,
|
||||
enable_twt));
|
||||
|
||||
/*
|
||||
* Currently broadcast TWT is not supported
|
||||
*/
|
||||
sme_cfg_set_int(hdd_ctx->mac_handle, WNI_CFG_BCAST_TWT,
|
||||
QDF_MIN(0, hdd_ctx->config->enable_twt));
|
||||
ucfg_mlme_set_bcast_twt(hdd_ctx->psoc,
|
||||
QDF_MIN(0, enable_twt));
|
||||
}
|
||||
|
||||
void hdd_send_twt_enable_cmd(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
uint8_t pdev_id = hdd_ctx->pdev->pdev_objmgr.wlan_pdev_id;
|
||||
uint32_t req_val = 0, resp_val = 0, bcast_val = 0;
|
||||
uint32_t congestion_timeout = hdd_ctx->config->twt_congestion_timeout;
|
||||
bool req_val = 0, resp_val = 0, bcast_val = 0;
|
||||
uint32_t congestion_timeout = 0;
|
||||
|
||||
sme_cfg_get_int(hdd_ctx->mac_handle, WNI_CFG_TWT_REQUESTOR, &req_val);
|
||||
sme_cfg_get_int(hdd_ctx->mac_handle, WNI_CFG_TWT_RESPONDER, &resp_val);
|
||||
sme_cfg_get_int(hdd_ctx->mac_handle, WNI_CFG_BCAST_TWT, &bcast_val);
|
||||
ucfg_mlme_get_twt_requestor(hdd_ctx->psoc, &req_val);
|
||||
ucfg_mlme_get_twt_responder(hdd_ctx->psoc, &resp_val);
|
||||
ucfg_mlme_get_bcast_twt(hdd_ctx->psoc, &bcast_val);
|
||||
ucfg_mlme_get_twt_congestion_timeout(hdd_ctx->psoc,
|
||||
&congestion_timeout);
|
||||
|
||||
hdd_debug("TWT cfg req:%d, responder:%d, bcast:%d, pdev:%d, cong:%d",
|
||||
req_val, resp_val, bcast_val, pdev_id, congestion_timeout);
|
||||
|
@@ -49,9 +49,6 @@ enum {
|
||||
WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT,
|
||||
WNI_CFG_OBSS_DETECTION_OFFLOAD,
|
||||
WNI_CFG_OBSS_COLOR_COLLISION_OFFLOAD,
|
||||
WNI_CFG_TWT_REQUESTOR,
|
||||
WNI_CFG_TWT_RESPONDER,
|
||||
WNI_CFG_BCAST_TWT,
|
||||
/* Any new items to be added should be above this strictly */
|
||||
CFG_PARAM_MAX_NUM
|
||||
};
|
||||
@@ -421,18 +418,6 @@ enum {
|
||||
#define WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT_STAMAX 255
|
||||
#define WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT_STADEF 50
|
||||
|
||||
#define WNI_CFG_TWT_REQUESTOR_STAMIN 0
|
||||
#define WNI_CFG_TWT_REQUESTOR_STAMAX 1
|
||||
#define WNI_CFG_TWT_REQUESTOR_STADEF 0
|
||||
|
||||
#define WNI_CFG_TWT_RESPONDER_STAMIN 0
|
||||
#define WNI_CFG_TWT_RESPONDER_STAMAX 1
|
||||
#define WNI_CFG_TWT_RESPONDER_STADEF 0
|
||||
|
||||
#define WNI_CFG_BCAST_TWT_STAMIN 0
|
||||
#define WNI_CFG_BCAST_TWT_STAMAX 1
|
||||
#define WNI_CFG_BCAST_TWT_STADEF 0
|
||||
|
||||
#define CFG_STA_MAGIC_DWORD 0xbeefbeef
|
||||
|
||||
#endif
|
||||
|
@@ -63,9 +63,6 @@ const char *cfg_get_string(uint16_t cfg_id)
|
||||
CASE_RETURN_STRING(WNI_CFG_PS_WOW_DATA_INACTIVITY_TIMEOUT);
|
||||
CASE_RETURN_STRING(WNI_CFG_OBSS_DETECTION_OFFLOAD);
|
||||
CASE_RETURN_STRING(WNI_CFG_OBSS_COLOR_COLLISION_OFFLOAD);
|
||||
CASE_RETURN_STRING(WNI_CFG_TWT_REQUESTOR);
|
||||
CASE_RETURN_STRING(WNI_CFG_TWT_RESPONDER);
|
||||
CASE_RETURN_STRING(WNI_CFG_BCAST_TWT);
|
||||
}
|
||||
|
||||
return "invalid";
|
||||
|
@@ -142,18 +142,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
|
||||
{WNI_CFG_OBSS_COLOR_COLLISION_OFFLOAD,
|
||||
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
|
||||
0, 1, 0},
|
||||
{WNI_CFG_TWT_REQUESTOR,
|
||||
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
|
||||
WNI_CFG_TWT_REQUESTOR_STAMIN, WNI_CFG_TWT_REQUESTOR_STAMAX,
|
||||
WNI_CFG_TWT_REQUESTOR_STADEF},
|
||||
{WNI_CFG_TWT_RESPONDER,
|
||||
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
|
||||
WNI_CFG_TWT_RESPONDER_STAMIN, WNI_CFG_TWT_RESPONDER_STAMAX,
|
||||
WNI_CFG_TWT_RESPONDER_STADEF},
|
||||
{WNI_CFG_BCAST_TWT,
|
||||
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
|
||||
WNI_CFG_BCAST_TWT_STAMIN, WNI_CFG_BCAST_TWT_STAMAX,
|
||||
WNI_CFG_BCAST_TWT_STADEF},
|
||||
};
|
||||
|
||||
|
||||
|
@@ -6018,8 +6018,6 @@ QDF_STATUS populate_dot11f_twt_extended_caps(tpAniSirGlobal mac_ctx,
|
||||
struct pe_session *pe_session,
|
||||
tDot11fIEExtCap *dot11f)
|
||||
{
|
||||
uint32_t value = 0;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct s_ext_cap *p_ext_cap;
|
||||
|
||||
if (!pe_session->enable_session_twt_support)
|
||||
@@ -6028,17 +6026,16 @@ QDF_STATUS populate_dot11f_twt_extended_caps(tpAniSirGlobal mac_ctx,
|
||||
dot11f->num_bytes = DOT11F_IE_EXTCAP_MAX_LEN;
|
||||
p_ext_cap = (struct s_ext_cap *)dot11f->bytes;
|
||||
|
||||
if (pe_session->pePersona == QDF_STA_MODE) {
|
||||
CFG_GET_INT(status, mac_ctx, WNI_CFG_TWT_REQUESTOR, value);
|
||||
p_ext_cap->twt_requestor_support = value;
|
||||
}
|
||||
if (pe_session->pePersona == QDF_SAP_MODE) {
|
||||
CFG_GET_INT(status, mac_ctx, WNI_CFG_TWT_RESPONDER, value);
|
||||
p_ext_cap->twt_responder_support = value;
|
||||
}
|
||||
if (pe_session->pePersona == QDF_STA_MODE)
|
||||
p_ext_cap->twt_requestor_support =
|
||||
mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled;
|
||||
if (pe_session->pePersona == QDF_SAP_MODE)
|
||||
p_ext_cap->twt_responder_support =
|
||||
mac_ctx->mlme_cfg->twt_cfg.is_twt_responder_enabled;
|
||||
|
||||
dot11f->num_bytes = lim_compute_ext_cap_ie_length(dot11f);
|
||||
|
||||
return status;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -14779,9 +14779,6 @@ static bool csr_enable_twt(tDot11fBeaconIEs *ie)
|
||||
*/
|
||||
static bool csr_enable_uapsd(tpAniSirGlobal mac_ctx, tDot11fBeaconIEs *ie)
|
||||
{
|
||||
uint32_t value = 0;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
/* In non-HE case, TWT is enabled only for Q2Q.
|
||||
* So keed uAPSD enabled for non-Q2Q in this non-HE case.
|
||||
*/
|
||||
@@ -14793,8 +14790,8 @@ static bool csr_enable_uapsd(tpAniSirGlobal mac_ctx, tDot11fBeaconIEs *ie)
|
||||
return true;
|
||||
}
|
||||
|
||||
CFG_GET_INT(status, mac_ctx, WNI_CFG_TWT_REQUESTOR, value);
|
||||
if ((value || IS_FEATURE_SUPPORTED_BY_FW(DOT11AX)) &&
|
||||
if ((mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled ||
|
||||
IS_FEATURE_SUPPORTED_BY_FW(DOT11AX)) &&
|
||||
ie->he_cap.twt_responder) {
|
||||
sme_debug("twt supported, disable uapsd");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user