1
0

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
Este cometimento está contido em:
Pragaspathi Thilagaraj
2021-03-19 17:28:02 +05:30
cometido por snandini
ascendente 92d317f98e
cometimento fb88149381
7 ficheiros modificados com 83 adições e 2 eliminações

Ver ficheiro

@@ -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 */

Ver ficheiro

@@ -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;
};
/**

Ver ficheiro

@@ -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)
{