qcacld-3.0: Add support for g_sap_ps_with_twt_enable ini

As part of new requirement of 'SAP PS with TWT enabled',
add ini 'g_sap_ps_with_twt_enable' support in host
to enabled/disabled SAP power save with TWT enable.

Change-Id: Iea76f9cdef6f0753a6dfcebedc2aeab17d121faf
CRs-Fixed: 3421610
This commit is contained in:
Divyajyothi Goparaju
2023-02-12 13:47:33 +05:30
committato da Madan Koyyalamudi
parent 2bdfffdc18
commit 28632436e5
5 ha cambiato i file con 54 aggiunte e 1 eliminazioni

Vedi File

@@ -1612,6 +1612,8 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_6G_SAP_FILS_DISCOVERY_ENABLED);
sap_cfg->disable_bcn_prot =
cfg_get(psoc, CFG_DISABLE_SAP_BCN_PROT);
sap_cfg->sap_ps_with_twt_enable =
cfg_get(psoc, CFG_SAP_PS_WITH_TWT);
}
static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,

Vedi File

@@ -768,6 +768,31 @@
"disable_sap_bcn_prot", \
"0", \
"Disable beacon protection for SAP")
/*
* <ini>
* g_sap_ps_with_twt_enable - enable/disable power save between successive TWT
* SPs for SAP
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable power save between successive
* TWT SPs for SAP
*
* Related: None
*
* Supported Feature: SAP
*
* Usage: External
*
* </ini>
*/
#define CFG_SAP_PS_WITH_TWT CFG_INI_BOOL(\
"g_sap_ps_with_twt_enable", \
"0", \
"Enable/Disable SAP power save with twt")
#define CFG_SAP_ALL \
CFG_SAP_SAE \
CFG(CFG_AP_ENABLE_RANDOM_BSSID) \
@@ -803,6 +828,7 @@
CFG(CFG_IS_SAP_BCAST_DEAUTH_ENABLED) \
CFG(CFG_6G_SAP_FILS_DISCOVERY_ENABLED) \
CFG(CFG_DISABLE_MCS13_SUPPORT) \
CFG(CFG_DISABLE_SAP_BCN_PROT)
CFG(CFG_DISABLE_SAP_BCN_PROT) \
CFG(CFG_SAP_PS_WITH_TWT)
#endif /* __CFG_MLME_SAP_H */

Vedi File

@@ -4257,4 +4257,15 @@ wlan_mlme_is_bcn_prot_disabled_for_sap(struct wlan_objmgr_psoc *psoc);
*/
uint8_t *
wlan_mlme_get_src_addr_from_frame(struct element_info *frame);
/*
* wlan_mlme_get_sap_ps_with_twt() - power save with twt config enabled/disabled
* for SAP interface
*
* @psoc: pointer to psoc object
*
* Return: power save enabled/disabled
*/
bool
wlan_mlme_get_sap_ps_with_twt(struct wlan_objmgr_psoc *psoc);
#endif /* _WLAN_MLME_API_H_ */

Vedi File

@@ -743,6 +743,7 @@ struct wlan_mlme_wps_params {
* @is_sap_bcast_deauth_enabled: enable bcast deauth for sap
* @is_6g_sap_fd_enabled: enable fils discovery on sap
* @disable_bcn_prot: disable beacon protection for sap
* @sap_ps_with_twt_enable: SAP power save with TWT
*/
struct wlan_mlme_cfg_sap {
uint16_t beacon_interval;
@@ -779,6 +780,7 @@ struct wlan_mlme_cfg_sap {
bool is_sap_bcast_deauth_enabled;
bool is_6g_sap_fd_enabled;
bool disable_bcn_prot;
bool sap_ps_with_twt_enable;
};
/**

Vedi File

@@ -6747,3 +6747,15 @@ uint8_t *wlan_mlme_get_src_addr_from_frame(struct element_info *frame)
return hdr->i_addr2;
}
bool
wlan_mlme_get_sap_ps_with_twt(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_SAP_PS_WITH_TWT);
return mlme_obj->cfg.sap_cfg.sap_ps_with_twt_enable;
}