qcacld-3.0: Add new ini to disable TWT in 2.4Ghz connection
Add new ini "enable_twt_24ghz" to enable/disable host triggered TWT in 2.4Ghz connection. Check this ini value in TWT get capability. The userspace will query the self capability before triggering the host TWT. Change-Id: I3544de89f438fc526f8a2554c6aeebcd25d6c415 CRs-Fixed: 2904775
This commit is contained in:

committed by
snandini

parent
92d317f98e
commit
fb88149381
@@ -201,6 +201,15 @@ bool mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
|
||||
struct qdf_mac_addr *peer_mac,
|
||||
uint8_t dialog_id,
|
||||
enum wlan_twt_commands cmd);
|
||||
|
||||
/**
|
||||
* mlme_is_24ghz_twt_enabled() - Get if TWT is enabled on 2.4Ghz
|
||||
* @psoc: Pointer to psoc object
|
||||
*
|
||||
* Return: True if TWT is allowed on 2.4Ghz connection.
|
||||
*/
|
||||
bool mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#else
|
||||
static inline
|
||||
void mlme_set_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
|
||||
|
@@ -1242,6 +1242,7 @@ static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
twt_cfg->is_twt_enabled = cfg_get(psoc, CFG_ENABLE_TWT);
|
||||
twt_cfg->twt_congestion_timeout = cfg_get(psoc, CFG_TWT_CONGESTION_TIMEOUT);
|
||||
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);
|
||||
}
|
||||
|
@@ -524,3 +524,14 @@ bool mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
return is_command_in_progress;
|
||||
}
|
||||
|
||||
bool mlme_is_24ghz_twt_enabled(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_ENABLE_TWT_24GHZ);
|
||||
|
||||
return mlme_obj->cfg.twt_cfg.enable_twt_24ghz;
|
||||
}
|
||||
|
@@ -163,10 +163,35 @@
|
||||
TWT_BCAST_RES_INDEX, \
|
||||
TWT_BCAST_RES_BITS)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* enable_twt_24ghz - Enable Target wake time when STA is connected on 2.4Ghz
|
||||
* band.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to enable/disable the host TWT when STA is connected to AP
|
||||
* in 2.4Ghz band.
|
||||
*
|
||||
* Related: NA
|
||||
*
|
||||
* Supported Feature: 11AX
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_TWT_24GHZ CFG_INI_BOOL( \
|
||||
"enable_twt_24ghz", \
|
||||
true, \
|
||||
"enable twt in 2.4Ghz band")
|
||||
|
||||
#define CFG_TWT_ALL \
|
||||
CFG(CFG_ENABLE_TWT) \
|
||||
CFG(CFG_TWT_REQUESTOR) \
|
||||
CFG(CFG_TWT_RESPONDER) \
|
||||
CFG(CFG_TWT_CONGESTION_TIMEOUT) \
|
||||
CFG(CFG_BCAST_TWT_REQ_RESP)
|
||||
CFG(CFG_BCAST_TWT_REQ_RESP) \
|
||||
CFG(CFG_ENABLE_TWT_24GHZ)
|
||||
#endif /* __CFG_MLME_TWT_H */
|
||||
|
@@ -1436,6 +1436,8 @@ struct wlan_mlme_acs {
|
||||
* @is_all_twt_tgt_cap_enabled: support for all twt enable/disable
|
||||
* @is_twt_statistics_tgt_cap_enabled: support for twt statistics
|
||||
* @twt_congestion_timeout: congestion timeout value
|
||||
* @enable_twt_24ghz: Enable/disable host TWT when STA is connected in
|
||||
* 2.4Ghz
|
||||
*/
|
||||
struct wlan_mlme_cfg_twt {
|
||||
bool is_twt_enabled;
|
||||
@@ -1448,6 +1450,7 @@ struct wlan_mlme_cfg_twt {
|
||||
bool is_all_twt_tgt_cap_enabled;
|
||||
bool is_twt_statistics_tgt_cap_enabled;
|
||||
uint32_t twt_congestion_timeout;
|
||||
bool enable_twt_24ghz;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -319,6 +319,19 @@ QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
|
||||
return mlme_init_twt_context(psoc, peer_mac, dialog_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_is_24ghz_twt_enabled() - Get if host triggered TWT is enabled on
|
||||
* 2.4Ghz band.
|
||||
* @psoc: Pointer to global psoc object
|
||||
*
|
||||
* Return: True if host TWT is enabled on 2.4 Ghz band.
|
||||
*/
|
||||
static inline bool
|
||||
ucfg_mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return mlme_is_24ghz_twt_enabled(psoc);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_nudge_tgt_cap() - Set TWT nudge target capability.
|
||||
* @psoc: Pointer to global psoc object
|
||||
@@ -563,6 +576,12 @@ QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
ucfg_mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
|
Reference in New Issue
Block a user