qcacld-3.0: Enable twt based on peer capabilities
Enable twt based on peer capabilities, for non-AX devices. Change-Id: I2710cfa362efe6fc58ad46ed41b1c3fe1b85d6f9 CRs-Fixed: 2287706
This commit is contained in:

committad av
nshrivas

förälder
b6723ecdb7
incheckning
6686c0b995
@@ -1084,6 +1084,7 @@ typedef struct sSirSmeJoinReq {
|
||||
uint8_t vdev_nss;
|
||||
uint8_t nss;
|
||||
bool nss_forced_1x1;
|
||||
bool enable_session_twt_support;
|
||||
tSirBssDescription bssDescription;
|
||||
/*
|
||||
* WARNING: Pls make bssDescription as last variable in struct
|
||||
|
@@ -560,6 +560,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
|
||||
uint8_t peer_twt_requestor;
|
||||
uint8_t peer_twt_responder;
|
||||
#endif
|
||||
bool enable_session_twt_support;
|
||||
} tPESession, *tpPESession;
|
||||
|
||||
struct session_params {
|
||||
|
@@ -1336,7 +1336,8 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
|
||||
bss_desc->channelId);
|
||||
}
|
||||
session->max_amsdu_num = sme_join_req->max_amsdu_num;
|
||||
|
||||
session->enable_session_twt_support =
|
||||
sme_join_req->enable_session_twt_support;
|
||||
/*
|
||||
* Store Session related parameters
|
||||
*/
|
||||
|
@@ -6307,12 +6307,15 @@ void lim_set_stads_rtt_cap(tpDphHashNode sta_ds, struct s_ext_cap *ext_cap,
|
||||
#ifdef WLAN_SUPPORT_TWT
|
||||
void lim_set_peer_twt_cap(tpPESession session, struct s_ext_cap *ext_cap)
|
||||
{
|
||||
session->peer_twt_requestor = ext_cap->twt_requestor_support;
|
||||
session->peer_twt_responder = ext_cap->twt_responder_support;
|
||||
if (session->enable_session_twt_support) {
|
||||
session->peer_twt_requestor = ext_cap->twt_requestor_support;
|
||||
session->peer_twt_responder = ext_cap->twt_responder_support;
|
||||
}
|
||||
|
||||
pe_debug("Ext Cap peer TWT requestor: %d, responder: %d",
|
||||
pe_debug("Ext Cap peer TWT requestor: %d, responder: %d, enable_twt %d",
|
||||
ext_cap->twt_requestor_support,
|
||||
ext_cap->twt_responder_support);
|
||||
ext_cap->twt_responder_support,
|
||||
session->enable_session_twt_support);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -6418,6 +6418,9 @@ QDF_STATUS populate_dot11f_twt_extended_caps(tpAniSirGlobal mac_ctx,
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct s_ext_cap *p_ext_cap;
|
||||
|
||||
if (!pe_session->enable_session_twt_support)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
dot11f->num_bytes = DOT11F_IE_EXTCAP_MAX_LEN;
|
||||
p_ext_cap = (struct s_ext_cap *)dot11f->bytes;
|
||||
|
||||
|
@@ -15484,6 +15484,27 @@ csr_check_vendor_ap_3_present(tpAniSirGlobal mac_ctx, uint8_t *ie,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_enable_twt() - Check if its allowed to enable twt for this session
|
||||
* @ie: pointer to beacon/probe resp ie's
|
||||
*
|
||||
* TWT is allowed only if device is in 11ax mode or if QCN ie present.
|
||||
*
|
||||
* Return: true or flase
|
||||
*/
|
||||
static bool csr_enable_twt(tDot11fBeaconIEs *ie)
|
||||
{
|
||||
if (IS_FEATURE_SUPPORTED_BY_FW(DOT11AX))
|
||||
return true;
|
||||
|
||||
if (!ie) {
|
||||
sme_debug("Beacon ie buffer is null");
|
||||
return false;
|
||||
}
|
||||
|
||||
return ie->QCN_IE.present;
|
||||
}
|
||||
|
||||
/**
|
||||
* The communication between HDD and LIM is thru mailbox (MB).
|
||||
* Both sides will access the data structure "tSirSmeJoinReq".
|
||||
@@ -16374,6 +16395,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
|
||||
csr_join_req->enable_bcast_probe_rsp =
|
||||
pMac->roam.configParam.enable_bcast_probe_rsp;
|
||||
|
||||
csr_join_req->enable_session_twt_support = csr_enable_twt(pIes);
|
||||
status = umac_send_mb_message_to_mac(csr_join_req);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
/*
|
||||
|
Referens i nytt ärende
Block a user