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
Этот коммит содержится в:

коммит произвёл
snandini

родитель
85be939de0
Коммит
d6b2eea730
@@ -174,15 +174,6 @@ bool mlme_is_twt_notify_in_progress(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
bool mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* mlme_get_twt_bcast_requestor_tgt_cap() - Get broadcast requestor target
|
||||
* capability.
|
||||
* @psoc: Pointer to psoc object
|
||||
*
|
||||
* Return: True if tgt cap is advertised.
|
||||
*/
|
||||
bool mlme_get_twt_bcast_requestor_tgt_cap(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* mlme_set_twt_command_in_progress() - Set TWT command is in progress.
|
||||
* @psoc: Pointer to psoc object
|
||||
|
@@ -1032,7 +1032,12 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_TWT_REQUESTOR);
|
||||
he_caps->dot11_he_cap.twt_responder =
|
||||
cfg_get(psoc, CFG_TWT_RESPONDER);
|
||||
he_caps->dot11_he_cap.broadcast_twt = cfg_get(psoc, CFG_BCAST_TWT);
|
||||
/*
|
||||
* Broadcast TWT capability will be filled in
|
||||
* populate_dot11f_he_caps() based on STA/SAP
|
||||
* role and "twt_bcast_req_resp_config" ini
|
||||
*/
|
||||
he_caps->dot11_he_cap.broadcast_twt = 0;
|
||||
if (mlme_is_twt_enabled(psoc))
|
||||
he_caps->dot11_he_cap.flex_twt_sched =
|
||||
cfg_default(CFG_HE_FLEX_TWT_SCHED);
|
||||
|
@@ -405,17 +405,6 @@ bool mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc *psoc)
|
||||
}
|
||||
#endif
|
||||
|
||||
bool mlme_get_twt_bcast_requestor_tgt_cap(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 false;
|
||||
|
||||
return mlme_obj->cfg.twt_cfg.bcast_requestor_tgt_cap;
|
||||
}
|
||||
|
||||
QDF_STATUS mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc *psoc,
|
||||
struct qdf_mac_addr *peer_mac,
|
||||
uint8_t dialog_id,
|
||||
|
@@ -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) \
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -89,38 +89,6 @@ ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_bcast_twt(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) {
|
||||
*val = cfg_default(CFG_BCAST_TWT);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
*val = mlme_obj->cfg.he_caps.dot11_he_cap.broadcast_twt;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_bcast_twt(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.he_caps.dot11_he_cap.broadcast_twt = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *val)
|
||||
@@ -238,36 +206,6 @@ ucfg_mlme_set_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_bcast_requestor_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.bcast_requestor_tgt_cap = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_bcast_responder_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.bcast_responder_tgt_cap = val;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
|
||||
{
|
||||
|
@@ -2273,7 +2273,6 @@ hdd_twt_pack_get_capabilities_resp(struct hdd_adapter *adapter)
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
uint8_t peer_cap = 0, self_cap = 0;
|
||||
bool twt_req = false, twt_bcast_req = false;
|
||||
bool enable_bcast_twt = false, bcast_tgt_cap;
|
||||
|
||||
/*
|
||||
* Length of attribute QCA_WLAN_VENDOR_ATTR_TWT_CAPABILITIES_SELF &
|
||||
@@ -2301,16 +2300,9 @@ hdd_twt_pack_get_capabilities_resp(struct hdd_adapter *adapter)
|
||||
if (twt_req)
|
||||
self_cap |= QCA_WLAN_TWT_CAPA_REQUESTOR;
|
||||
|
||||
ucfg_mlme_get_bcast_twt(hdd_ctx->psoc, &enable_bcast_twt);
|
||||
bcast_tgt_cap = ucfg_mlme_get_twt_bcast_requestor_tgt_cap(
|
||||
hdd_ctx->psoc);
|
||||
ucfg_mlme_get_twt_bcast_requestor(hdd_ctx->psoc,
|
||||
&twt_bcast_req);
|
||||
if (bcast_tgt_cap && enable_bcast_twt)
|
||||
self_cap |= (twt_bcast_req ?
|
||||
QCA_WLAN_TWT_CAPA_BROADCAST : 0);
|
||||
else if (twt_bcast_req)
|
||||
self_cap |= QCA_WLAN_TWT_CAPA_BROADCAST;
|
||||
self_cap |= (twt_bcast_req ? QCA_WLAN_TWT_CAPA_BROADCAST : 0);
|
||||
|
||||
if (ucfg_mlme_is_flexible_twt_enabled(hdd_ctx->psoc))
|
||||
self_cap |= QCA_WLAN_TWT_CAPA_FLEXIBLE;
|
||||
@@ -3065,10 +3057,7 @@ void hdd_update_tgt_twt_cap(struct hdd_context *hdd_ctx,
|
||||
struct wma_tgt_services *services = &cfg->services;
|
||||
bool twt_bcast_req;
|
||||
bool twt_bcast_res;
|
||||
bool enable_twt;
|
||||
bool bcast_twt;
|
||||
bool twt_req;
|
||||
bool twt_res;
|
||||
bool twt_req, twt_res, enable_twt;
|
||||
|
||||
enable_twt = ucfg_mlme_is_twt_enabled(hdd_ctx->psoc);
|
||||
|
||||
@@ -3082,43 +3071,57 @@ void hdd_update_tgt_twt_cap(struct hdd_context *hdd_ctx,
|
||||
ucfg_mlme_get_twt_bcast_responder(hdd_ctx->psoc,
|
||||
&twt_bcast_res);
|
||||
|
||||
ucfg_mlme_get_bcast_twt(hdd_ctx->psoc, &bcast_twt);
|
||||
if (bcast_twt)
|
||||
ucfg_mlme_set_bcast_twt(hdd_ctx->psoc,
|
||||
QDF_MIN(cfg->bcast_twt_support,
|
||||
enable_twt));
|
||||
else
|
||||
hdd_debug("bcast twt is disable in ini, fw cap %d",
|
||||
cfg->bcast_twt_support);
|
||||
|
||||
hdd_debug("ini: enable_twt=%d, bcast_req=%d, bcast_res=%d",
|
||||
enable_twt, twt_bcast_req, twt_bcast_res);
|
||||
hdd_debug("ini: twt_req=%d, twt_res=%d", twt_req, twt_res);
|
||||
hdd_debug("svc: req=%d, res=%d, bcast_req=%d, bcast_res=%d",
|
||||
hdd_debug("svc: req=%d, res=%d, bcast_req=%d, bcast_res=%d legacy_bcast_twt:%d",
|
||||
services->twt_requestor, services->twt_responder,
|
||||
cfg->twt_bcast_req_support, cfg->twt_bcast_res_support);
|
||||
cfg->twt_bcast_req_support, cfg->twt_bcast_res_support,
|
||||
cfg->legacy_bcast_twt_support);
|
||||
|
||||
/*
|
||||
* The HE cap IE in frame will have intersection of
|
||||
* "enable_twt" ini, twt requestor fw service cap and
|
||||
* "twt_requestor" ini requestor bit after this
|
||||
* set operation.
|
||||
*/
|
||||
ucfg_mlme_set_twt_requestor(hdd_ctx->psoc,
|
||||
QDF_MIN(services->twt_requestor,
|
||||
(enable_twt && twt_req)));
|
||||
|
||||
/*
|
||||
* The HE cap IE in frame will have intersection of
|
||||
* "enable_twt" ini, twt responder fw service cap and
|
||||
* "twt_responder" ini responder bit after this
|
||||
* set operation.
|
||||
*/
|
||||
ucfg_mlme_set_twt_responder(hdd_ctx->psoc,
|
||||
QDF_MIN(services->twt_responder,
|
||||
(enable_twt && twt_res)));
|
||||
/*
|
||||
* The HE cap IE in frame will have intersection of
|
||||
* "enable_twt" ini, twt requestor fw service cap and
|
||||
* "twt_bcast_req_resp_config" ini requestor bit after this
|
||||
* set operation.
|
||||
*/
|
||||
ucfg_mlme_set_twt_bcast_requestor(
|
||||
hdd_ctx->psoc,
|
||||
QDF_MIN((cfg->twt_bcast_req_support ||
|
||||
cfg->legacy_bcast_twt_support),
|
||||
(enable_twt && twt_bcast_req)));
|
||||
|
||||
twt_req = enable_twt && twt_bcast_req;
|
||||
ucfg_mlme_set_twt_bcast_requestor_tgt_cap(hdd_ctx->psoc,
|
||||
cfg->twt_bcast_req_support);
|
||||
ucfg_mlme_set_twt_bcast_requestor(hdd_ctx->psoc,
|
||||
QDF_MIN(cfg->twt_bcast_req_support,
|
||||
twt_req));
|
||||
/*
|
||||
* The HE cap IE in frame will have intersection of
|
||||
* "enable_twt" ini, twt responder fw service cap and
|
||||
* "twt_bcast_req_resp_config" ini responder bit after this
|
||||
* set operation.
|
||||
*/
|
||||
ucfg_mlme_set_twt_bcast_responder(
|
||||
hdd_ctx->psoc,
|
||||
QDF_MIN((cfg->twt_bcast_res_support ||
|
||||
cfg->legacy_bcast_twt_support),
|
||||
(enable_twt && twt_bcast_res)));
|
||||
|
||||
twt_res = enable_twt && twt_bcast_res;
|
||||
ucfg_mlme_set_twt_bcast_responder_tgt_cap(hdd_ctx->psoc,
|
||||
cfg->twt_bcast_res_support);
|
||||
ucfg_mlme_set_twt_bcast_responder(hdd_ctx->psoc,
|
||||
QDF_MIN(cfg->twt_bcast_res_support,
|
||||
twt_res));
|
||||
ucfg_mlme_set_twt_nudge_tgt_cap(hdd_ctx->psoc, cfg->twt_nudge_enabled);
|
||||
ucfg_mlme_set_twt_all_twt_tgt_cap(hdd_ctx->psoc,
|
||||
cfg->all_twt_enabled);
|
||||
@@ -3130,19 +3133,22 @@ void hdd_send_twt_enable_cmd(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
uint8_t pdev_id = hdd_ctx->pdev->pdev_objmgr.wlan_pdev_id;
|
||||
struct twt_enable_disable_conf twt_en_dis = {0};
|
||||
bool is_requestor_en;
|
||||
bool is_responder_en;
|
||||
bool twt_bcast_en;
|
||||
bool is_requestor_en, is_responder_en;
|
||||
bool twt_bcast_requestor = false, twt_bcast_responder = false;
|
||||
|
||||
/* Get MLME TWT config */
|
||||
ucfg_mlme_get_twt_requestor(hdd_ctx->psoc, &is_requestor_en);
|
||||
ucfg_mlme_get_twt_responder(hdd_ctx->psoc, &is_responder_en);
|
||||
ucfg_mlme_get_bcast_twt(hdd_ctx->psoc, &twt_en_dis.bcast_en);
|
||||
|
||||
ucfg_mlme_get_twt_bcast_responder(hdd_ctx->psoc, &twt_bcast_responder);
|
||||
ucfg_mlme_get_twt_bcast_requestor(hdd_ctx->psoc, &twt_bcast_requestor);
|
||||
twt_en_dis.bcast_en = (twt_bcast_requestor || twt_bcast_responder);
|
||||
|
||||
ucfg_mlme_get_twt_congestion_timeout(hdd_ctx->psoc,
|
||||
&twt_en_dis.congestion_timeout);
|
||||
hdd_debug("TWT mlme cfg:req: %d, res:%d, bcast:%d, cong:%d, pdev:%d",
|
||||
is_requestor_en, is_responder_en, twt_en_dis.bcast_en,
|
||||
twt_en_dis.congestion_timeout, pdev_id);
|
||||
twt_en_dis.congestion_timeout, pdev_id);
|
||||
|
||||
/* The below code takes care of the following :
|
||||
* If user wants to separately enable requestor and responder roles,
|
||||
@@ -3163,8 +3169,7 @@ void hdd_send_twt_enable_cmd(struct hdd_context *hdd_ctx)
|
||||
if (is_requestor_en) {
|
||||
twt_en_dis.role = WMI_TWT_ROLE_REQUESTOR;
|
||||
twt_en_dis.ext_conf_present = true;
|
||||
ucfg_mlme_get_twt_bcast_requestor(hdd_ctx->psoc, &twt_bcast_en);
|
||||
if (twt_bcast_en)
|
||||
if (twt_bcast_requestor)
|
||||
twt_en_dis.oper = WMI_TWT_OPERATION_BROADCAST;
|
||||
else
|
||||
twt_en_dis.oper = WMI_TWT_OPERATION_INDIVIDUAL;
|
||||
@@ -3176,8 +3181,7 @@ void hdd_send_twt_enable_cmd(struct hdd_context *hdd_ctx)
|
||||
if (is_responder_en) {
|
||||
twt_en_dis.role = WMI_TWT_ROLE_RESPONDER;
|
||||
twt_en_dis.ext_conf_present = true;
|
||||
ucfg_mlme_get_twt_bcast_responder(hdd_ctx->psoc, &twt_bcast_en);
|
||||
if (twt_bcast_en)
|
||||
if (twt_bcast_responder)
|
||||
twt_en_dis.oper = WMI_TWT_OPERATION_BROADCAST;
|
||||
else
|
||||
twt_en_dis.oper = WMI_TWT_OPERATION_INDIVIDUAL;
|
||||
|
@@ -6421,27 +6421,17 @@ populate_dot11f_broadcast_twt_he_cap(struct mac_context *mac,
|
||||
struct pe_session *session,
|
||||
tDot11fIEhe_cap *he_cap)
|
||||
{
|
||||
bool enable_bcast_twt =
|
||||
mac->mlme_cfg->he_caps.dot11_he_cap.broadcast_twt;
|
||||
bool requestor_tgt_cap =
|
||||
mac->mlme_cfg->twt_cfg.bcast_requestor_tgt_cap;
|
||||
bool responder_tgt_cap =
|
||||
mac->mlme_cfg->twt_cfg.bcast_responder_tgt_cap;
|
||||
bool requestor_cfg =
|
||||
bool bcast_requestor =
|
||||
mac->mlme_cfg->twt_cfg.is_bcast_requestor_enabled;
|
||||
bool responder_cfg =
|
||||
bool bcast_responder =
|
||||
mac->mlme_cfg->twt_cfg.is_bcast_responder_enabled;
|
||||
|
||||
he_cap->broadcast_twt = 0;
|
||||
|
||||
if (session->opmode == QDF_STA_MODE) {
|
||||
if (enable_bcast_twt && requestor_tgt_cap)
|
||||
he_cap->broadcast_twt = requestor_cfg;
|
||||
else if (enable_bcast_twt)
|
||||
he_cap->broadcast_twt = 1;
|
||||
he_cap->broadcast_twt = bcast_requestor;
|
||||
} else if (session->opmode == QDF_SAP_MODE) {
|
||||
if (enable_bcast_twt && responder_tgt_cap)
|
||||
he_cap->broadcast_twt = responder_cfg;
|
||||
else if (enable_bcast_twt)
|
||||
he_cap->broadcast_twt = 1;
|
||||
he_cap->broadcast_twt = bcast_responder;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@@ -185,7 +185,7 @@ struct board_info {
|
||||
* @obss_detection_offloaded: obss detection offloaded to firmware
|
||||
* @obss_color_collision_offloaded: obss color collision offloaded to firmware
|
||||
* @sar_version: Version of SAR supported by firmware
|
||||
* @bcast_twt_support: braodcast twt support
|
||||
* @legacy_bcast_twt_support: broadcast twt support
|
||||
* @restricted_80p80_bw_supp: Restricted 80+80MHz(165MHz BW) support
|
||||
* @twt_bcast_req_support: twt bcast requestor support
|
||||
* @twt_bcast_res_support: twt bcast responder support
|
||||
@@ -230,7 +230,7 @@ struct wma_tgt_cfg {
|
||||
struct board_info hw_bd_info;
|
||||
enum sar_version sar_version;
|
||||
struct nan_tgt_caps nan_caps;
|
||||
bool bcast_twt_support;
|
||||
bool legacy_bcast_twt_support;
|
||||
bool restricted_80p80_bw_supp;
|
||||
#ifdef WLAN_SUPPORT_TWT
|
||||
bool twt_bcast_req_support;
|
||||
|
@@ -565,9 +565,9 @@ void wma_update_bcast_twt_support(tp_wma_handle wh,
|
||||
{
|
||||
if (wmi_service_enabled(wh->wmi_handle,
|
||||
wmi_service_bcast_twt_support))
|
||||
tgt_cfg->bcast_twt_support = true;
|
||||
tgt_cfg->legacy_bcast_twt_support = true;
|
||||
else
|
||||
tgt_cfg->bcast_twt_support = false;
|
||||
tgt_cfg->legacy_bcast_twt_support = false;
|
||||
|
||||
if (wmi_service_enabled(wh->wmi_handle,
|
||||
wmi_service_twt_bcast_req_support))
|
||||
|
Ссылка в новой задаче
Block a user