qcacld-3.0: Add support for INI twt_disable_info
Add support for INI twt_disable_info to disable FW initiated information frame for TWT Change-Id: I06fe9be364d9def0ccfffc196ae31dcc2ab9a500 CRs-Fixed: 3621241
This commit is contained in:
committed by
Rahul Choudhary
parent
f72feda4a1
commit
5db1e4740c
@@ -308,6 +308,22 @@ bool mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
bool mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#ifdef WLAN_TWT_CONV_SUPPORTED
|
||||
/**
|
||||
* mlme_is_twt_disable_info_frame() - Get if TWT info frame enabled/disabled
|
||||
* @psoc: Pointer to psoc object
|
||||
*
|
||||
* Return: True if TWT info frame is disabled.
|
||||
*/
|
||||
bool mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc);
|
||||
#else
|
||||
static inline bool
|
||||
mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
#else
|
||||
static inline
|
||||
void mlme_set_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -334,5 +350,12 @@ mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* WLAN_SUPPORT_TWT */
|
||||
#endif /* _WLAN_MLME_TWT_API_H_ */
|
||||
|
||||
@@ -2165,6 +2165,28 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
|
||||
/**
|
||||
* mlme_init_disable_twt_info() - initialize disable twt info
|
||||
* @psoc: Pointer to PSOC
|
||||
* @twt_cfg: Pointer to twt_cfg
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void mlme_init_disable_twt_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_cfg_twt *twt_cfg)
|
||||
{
|
||||
twt_cfg->disable_twt_info_frame = cfg_get(psoc,
|
||||
CFG_DISABLE_TWT_INFO_FRAME);
|
||||
}
|
||||
#elif defined(WLAN_SUPPORT_TWT)
|
||||
static void mlme_init_disable_twt_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_cfg_twt *twt_cfg)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_TWT
|
||||
static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_cfg_twt *twt_cfg)
|
||||
@@ -2176,6 +2198,7 @@ static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
twt_cfg->enable_twt_24ghz = cfg_get(psoc, CFG_ENABLE_TWT_24GHZ);
|
||||
twt_cfg->is_bcast_requestor_enabled = CFG_TWT_GET_BCAST_REQ(bcast_conf);
|
||||
twt_cfg->is_bcast_responder_enabled = CFG_TWT_GET_BCAST_RES(bcast_conf);
|
||||
mlme_init_disable_twt_info(psoc, twt_cfg);
|
||||
}
|
||||
#else
|
||||
static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -853,3 +853,16 @@ bool mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
return mlme_obj->cfg.twt_cfg.enable_twt_24ghz;
|
||||
}
|
||||
|
||||
#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
|
||||
bool mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return cfg_default(CFG_DISABLE_TWT_INFO_FRAME);
|
||||
|
||||
return mlme_obj->cfg.twt_cfg.disable_twt_info_frame;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1634,6 +1634,7 @@ struct wlan_mlme_acs {
|
||||
* @disable_btwt_usr_cfg: User config param to enable/disable the BTWT support
|
||||
* @enable_twt_24ghz: Enable/disable host TWT when STA is connected in
|
||||
* 2.4Ghz
|
||||
* @disable_twt_info_frame: Enable/disable TWT info frame
|
||||
* @req_flag: requestor flag enable/disable
|
||||
* @res_flag: responder flag enable/disable
|
||||
* @twt_res_svc_cap: responder service capability
|
||||
@@ -1651,6 +1652,7 @@ struct wlan_mlme_cfg_twt {
|
||||
uint32_t twt_congestion_timeout;
|
||||
bool disable_btwt_usr_cfg;
|
||||
bool enable_twt_24ghz;
|
||||
bool disable_twt_info_frame;
|
||||
bool req_flag;
|
||||
bool res_flag;
|
||||
bool twt_res_svc_cap;
|
||||
|
||||
@@ -234,6 +234,27 @@
|
||||
"enable_twt_24ghz", \
|
||||
true, \
|
||||
"enable twt in 2.4Ghz band")
|
||||
/*
|
||||
* <ini>
|
||||
* twt_disable_info - Enable/Disable TWT info frame.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to enable/disable TWT Info frame
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_DISABLE_TWT_INFO_FRAME CFG_INI_BOOL( \
|
||||
"twt_disable_info", \
|
||||
false, \
|
||||
"disable twt info frame")
|
||||
|
||||
#define CFG_HE_FLEX_TWT_SCHED CFG_BOOL( \
|
||||
"he_flex_twt_sched", \
|
||||
@@ -270,6 +291,7 @@
|
||||
CFG(CFG_TWT_CONGESTION_TIMEOUT) \
|
||||
CFG(CFG_BCAST_TWT_REQ_RESP) \
|
||||
CFG(CFG_ENABLE_TWT_24GHZ) \
|
||||
CFG(CFG_DISABLE_TWT_INFO_FRAME) \
|
||||
CFG(CFG_TWT_ENABLE_IN_11N) \
|
||||
CFG(CFG_RTWT_REQ_RESP)
|
||||
#elif !defined(WLAN_SUPPORT_TWT) && !defined(WLAN_TWT_CONV_SUPPORTED)
|
||||
|
||||
@@ -6400,7 +6400,7 @@ static QDF_STATUS wma_vdev_mgmt_perband_tx_rate(struct dev_set_param *info)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#define MAX_VDEV_CREATE_PARAMS 21
|
||||
#define MAX_VDEV_CREATE_PARAMS 22
|
||||
/* params being sent:
|
||||
* 1.wmi_vdev_param_wmm_txop_enable
|
||||
* 2.wmi_vdev_param_disconnect_th
|
||||
@@ -6423,6 +6423,7 @@ static QDF_STATUS wma_vdev_mgmt_perband_tx_rate(struct dev_set_param *info)
|
||||
* 19.wmi_vdev_param_bmiss_final_bcnt
|
||||
* 20.wmi_vdev_param_set_sap_ps_with_twt
|
||||
* 21.wmi_vdev_param_disable_2g_twt
|
||||
* 22.wmi_vdev_param_disable_twt_info_frame
|
||||
*/
|
||||
|
||||
QDF_STATUS wma_vdev_create_set_param(struct wlan_objmgr_vdev *vdev)
|
||||
@@ -6439,6 +6440,7 @@ QDF_STATUS wma_vdev_create_set_param(struct wlan_objmgr_vdev *vdev)
|
||||
struct dev_set_param setparam[MAX_VDEV_CREATE_PARAMS];
|
||||
uint8_t index = 0;
|
||||
bool is_24ghz_twt_enabled;
|
||||
bool disable_twt_info_frame;
|
||||
enum QDF_OPMODE opmode;
|
||||
|
||||
if (!mac)
|
||||
@@ -6700,6 +6702,17 @@ QDF_STATUS wma_vdev_create_set_param(struct wlan_objmgr_vdev *vdev)
|
||||
goto error;
|
||||
}
|
||||
|
||||
disable_twt_info_frame = mlme_is_twt_disable_info_frame(mac->psoc);
|
||||
status = mlme_check_index_setparam(
|
||||
setparam,
|
||||
wmi_vdev_param_disable_twt_info_frame,
|
||||
disable_twt_info_frame,
|
||||
index++, MAX_VDEV_CREATE_PARAMS);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
wma_debug("failed to set wmi_vdev_param_disable_twt_info_frame");
|
||||
goto error;
|
||||
}
|
||||
|
||||
status = wma_send_multi_pdev_vdev_set_params(MLME_VDEV_SETPARAM,
|
||||
vdev_id, setparam, index);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
|
||||
Reference in New Issue
Block a user