qcacld-3.0: Add support to get TWT target capabilities
Add support to get the following TWT target capabilities 1) Nudge 2) all twt and 3) statistics Change-Id: If74e99b0ff920481bcabb0300129b9067082d113 CRs-Fixed: 2854927
This commit is contained in:

committed by
snandini

parent
90b68e3bf0
commit
f3b6093c65
@@ -1399,10 +1399,13 @@ struct wlan_mlme_acs {
|
||||
/*
|
||||
* struct wlan_mlme_cfg_twt - All twt related cfg items
|
||||
* @is_twt_enabled: global twt configuration
|
||||
* @bcast_requestor_tgt_cap: Broadcast requestor target capability
|
||||
* @bcast_responder_tgt_cap: Broadcast responder target capability
|
||||
* @is_bcast_responder_enabled: bcast responder enable/disable
|
||||
* @is_bcast_requestor_enabled: bcast requestor enable/disable
|
||||
* @bcast_requestor_tgt_cap: Broadcast requestor target capability
|
||||
* @bcast_responder_tgt_cap: Broadcast responder target 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
|
||||
* @twt_congestion_timeout: congestion timeout value
|
||||
*/
|
||||
struct wlan_mlme_cfg_twt {
|
||||
@@ -1411,6 +1414,9 @@ struct wlan_mlme_cfg_twt {
|
||||
bool is_bcast_requestor_enabled;
|
||||
bool bcast_requestor_tgt_cap;
|
||||
bool bcast_responder_tgt_cap;
|
||||
bool is_twt_nudge_tgt_cap_enabled;
|
||||
bool is_all_twt_tgt_cap_enabled;
|
||||
bool is_twt_statistics_tgt_cap_enabled;
|
||||
uint32_t twt_congestion_timeout;
|
||||
};
|
||||
|
||||
|
@@ -314,6 +314,68 @@ QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return mlme_init_twt_context(psoc, peer_mac, dialog_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_nudge_tgt_cap() - Set TWT nudge target capability.
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @val: Value to set
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_nudge_tgt_cap() - Get TWT Nudge target capability
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @val: Value to set
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_all_twt_tgt_cap() - Set TWT all dialog support target
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @val: Value to set
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_all_twt_tgt_cap() - Get TWT all dialog support target
|
||||
* capability
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @val: Value to set
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_set_twt_statistics_tgt_cap() - Set TWT statistics target
|
||||
* capability
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @val: Value to set
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val);
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_twt_statistics_tgt_cap() - Get TWT statistics target capability
|
||||
* @psoc: Pointer to global psoc object
|
||||
* @val: Value to set
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc *psoc,
|
||||
@@ -479,5 +541,44 @@ QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
*val = false;
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_get_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
*val = false;
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_get_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
*val = false;
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_set_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_mlme_set_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
#endif /* defined(WLAN_SUPPORT_TWT) && defined(WLAN_FEATURE_11AX) */
|
||||
#endif /* _WLAN_MLME_TWT_UCFG_API_H_ */
|
||||
|
@@ -267,4 +267,88 @@ ucfg_mlme_set_twt_bcast_responder_tgt_cap(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_twt_nudge_tgt_cap_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_twt_nudge_tgt_cap_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_all_twt_tgt_cap_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_all_twt_tgt_cap_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
mlme_obj->cfg.twt_cfg.is_twt_statistics_tgt_cap_enabled = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
if (!mlme_obj)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
*val = mlme_obj->cfg.twt_cfg.is_twt_statistics_tgt_cap_enabled;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user