1
0

qcacld-3.0: Enhance the broadcast twt capabilities population logic

Currently multiple ini is available for setting the broadcast
TWT requestor and responder configuration.
Deprecate "bcast_twt" legacy ini and also don't consider
legacy service capability WMI_SERVICE_BROADCAST_TWT.
So below is the service capability values combination
advertised by firmware:
new fw:
bcast_req bcast_resp legacy
    0        0         0       -> disable bcast
    0        1         0
    1        0         0
    1        1         1

old fw:
   0         0         1   -> enable TWT

Also change the default value of "twt_bcast_req_resp_config" ini
to 1.

Change-Id: Ic9af296b0efffc8f76f647b5830183867e0adf57
CRs-Fixed: 2873360
Este cometimento está contido em:
Pragaspathi Thilagaraj
2021-03-02 23:14:14 +05:30
cometido por snandini
ascendente 85be939de0
cometimento d6b2eea730
11 ficheiros modificados com 117 adições e 279 eliminações

Ver ficheiro

@@ -66,28 +66,6 @@
1, \
"TWT responder")
/*
* <ini>
* bcast_twt - to bcast twt capability.
* @Min: 0
* @Max: 1
* @Default: 1
*
* 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", \
1, \
"Bcast TWT")
/*
* <ini>
* enable_twt - Enable Target Wake Time support.
@@ -143,7 +121,7 @@
* twt_bcast_req_resp_config - To enable broadcast twt requestor and responder.
* @Min: 0 Disable the extended twt capability
* @Max: 3
* @Default: 0
* @Default: 1
*
* This cfg is used to configure the broadcast TWT requestor and responder.
* Bitmap for enabling the broadcast twt requestor and responder.
@@ -171,7 +149,7 @@
"twt_bcast_req_resp_config", \
0, \
3, \
0, \
1, \
CFG_VALUE_OR_DEFAULT, \
"BROADCAST TWT CAPABILITY")
@@ -186,7 +164,6 @@
TWT_BCAST_RES_BITS)
#define CFG_TWT_ALL \
CFG(CFG_BCAST_TWT) \
CFG(CFG_ENABLE_TWT) \
CFG(CFG_TWT_REQUESTOR) \
CFG(CFG_TWT_RESPONDER) \

Ver ficheiro

@@ -1428,6 +1428,8 @@ struct wlan_mlme_acs {
* @is_bcast_requestor_enabled: bcast requestor enable/disable
* @bcast_requestor_tgt_cap: Broadcast requestor target capability
* @bcast_responder_tgt_cap: Broadcast responder target capability
* @bcast_legacy_tgt_cap: Broadcast Target capability. This is the legacy
* capability.
* @is_twt_nudge_tgt_cap_enabled: support for nudge request enable/disable
* @is_all_twt_tgt_cap_enabled: support for all twt enable/disable
* @is_twt_statistics_tgt_cap_enabled: support for twt statistics
@@ -1439,6 +1441,7 @@ struct wlan_mlme_cfg_twt {
bool is_bcast_requestor_enabled;
bool bcast_requestor_tgt_cap;
bool bcast_responder_tgt_cap;
bool bcast_legacy_tgt_cap;
bool is_twt_nudge_tgt_cap_enabled;
bool is_all_twt_tgt_cap_enabled;
bool is_twt_statistics_tgt_cap_enabled;

Ver ficheiro

@@ -75,28 +75,6 @@ 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
@@ -142,7 +120,7 @@ QDF_STATUS
ucfg_mlme_set_enable_twt(struct wlan_objmgr_psoc *psoc,
bool val);
/**
/*
* ucfg_mlme_get_twt_bcast_requestor() - Get twt requestor enabled
* @psoc: pointer to psoc object
* @val: Pointer to the value which will be filled for the caller
@@ -153,17 +131,6 @@ QDF_STATUS
ucfg_mlme_get_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* ucfg_mlme_set_twt_bcast_requestor() - Set Global twt bcast requestor support
* @psoc: pointer to psoc object
* @val: Value to be set to config
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_get_twt_bcast_responder() - Get twt responder enabled
* @psoc: pointer to psoc object
@@ -174,55 +141,64 @@ ucfg_mlme_set_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
ucfg_mlme_get_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
bool *val);
/**
* 1. If both of the new service caps
* WMI_SERVICE_BROADCAST_TWT_REQUESTER And
* WMI_SERVICE_BROADCAST_TWT_RESPONDER are enabled then the old
* WMI_SERVICE_BROADCAST_TWT will be set to 1.
*
* 2.a. If any of the new service caps in case of new firmware:
* WMI_SERVICE_BROADCAST_TWT_REQUESTER And
* WMI_SERVICE_BROADCAST_TWT_RESPONDER is DISABLED then the old
* WMI_SERVICE_BROADCAST_TWT will be set to 0.
*
* 2.b In case of new firmware wants to disable broadcast TWT:
* all 3 WMI_SERVICE_BROADCAST_TWT_REQUESTER,
* WMI_SERVICE_BROADCAST_TWT_RESPONDER &
* WMI_SERVICE_BROADCAST_TWT will be disabled.
*
* 2.c IN case of old firmware:
* WMI_SERVICE_BROADCAST_TWT will be 1 and
* WMI_SERVICE_BROADCAST_TWT_REQUESTER,
* WMI_SERVICE_BROADCAST_TWT_RESPONDER will be 0.
*
* bcast_requestor_cfg/bcast_responder_cfg is intersection of
* "enable_twt", "twt_bcast_req_resp_config" ini and above target
* service cap combination.
*/
/**
* ucfg_mlme_set_twt_bcast_requestor() - Set Global twt bcast requestor support
* @psoc: pointer to psoc object
* @val: Value to be set to config
*
* The caller of ucfg_mlme_set_twt_bcast_requestor() updates with the
* intersection of "enable_twt", "twt_bcast_req_resp_config" ini and the
* WMI_SERVICE_BROADCAST_TWT_REQUESTOR, WMI_SERVICE_BROADCAST_TWT
* combination.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_set_twt_bcast_responder() - Set Global twt bcast responder support
* @psoc: pointer to psoc object
* @val: Value to be set to config
*
* The caller of ucfg_mlme_set_twt_bcast_requestor() updates with the
* intersection of "enable_twt", "twt_bcast_req_resp_config" ini and the
* WMI_SERVICE_BROADCAST_TWT_RESPONDER, WMI_SERVICE_BROADCAST_TWT
* combination.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_set_twt_bcast_requestor_tgt_cap() - Update the broadast requestor
* target capability
* @psoc: pointer to psoc object
* @val: Value to be set to config
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_twt_bcast_requestor_tgt_cap(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_get_twt_bcast_requestor_tgt_cap() - Get broadcast requestor TGT
* capability.
* @psoc: pointer to psoc object
*
* Return: True if broadcast requestor target capability is present.
*/
static inline bool
ucfg_mlme_get_twt_bcast_requestor_tgt_cap(struct wlan_objmgr_psoc *psoc)
{
return mlme_get_twt_bcast_requestor_tgt_cap(psoc);
}
/**
* ucfg_mlme_set_twt_bcast_responder_tgt_cap() - Update the broadast responder
* target capability
* @psoc: pointer to psoc object
* @val: Value to be set to config
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_twt_bcast_responder_tgt_cap(struct wlan_objmgr_psoc *psoc,
bool val);
/**
* ucfg_mlme_is_twt_setup_in_progress() - Get TWT setup in progress for
* given dialog id
@@ -469,21 +445,6 @@ ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
ucfg_mlme_get_bcast_twt(struct wlan_objmgr_psoc *psoc,
bool *val)
{
*val = false;
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
ucfg_mlme_set_bcast_twt(struct wlan_objmgr_psoc *psoc,
bool val)
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
uint32_t *val)
@@ -581,32 +542,12 @@ ucfg_mlme_set_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
ucfg_mlme_set_twt_bcast_requestor_tgt_cap(struct wlan_objmgr_psoc *psoc,
bool val)
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline QDF_STATUS
ucfg_mlme_set_twt_bcast_responder_tgt_cap(struct wlan_objmgr_psoc *psoc,
bool val)
{
return QDF_STATUS_E_NOSUPPORT;
}
static inline
bool ucfg_mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline bool
ucfg_mlme_get_twt_bcast_requestor_tgt_cap(struct wlan_objmgr_psoc *psoc)
{
return false;
}
static inline
uint8_t ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr *peer_mac)