mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Advertise twt capability correctly
Fix the logic to not to advertise twt requester for SAP & twt responder for STA. Change-Id: I153f7c52d0107c75f7c59b4c880bb4aa0757356b CRs-Fixed: 2473541
This commit is contained in:
parent
8cb25b3042
commit
72adeb5673
2 changed files with 35 additions and 0 deletions
|
|
@ -2292,9 +2292,20 @@ static void csr_start_bss_copy_he_cap(struct start_bss_req *req,
|
|||
sizeof(session->he_config));
|
||||
}
|
||||
|
||||
void csr_init_session_twt_cap(struct csr_roam_session *session,
|
||||
uint32_t type_of_persona)
|
||||
{
|
||||
if (WMI_VDEV_TYPE_AP == type_of_persona) {
|
||||
session->he_config.twt_request = 0;
|
||||
} else if (WMI_VDEV_TYPE_STA == type_of_persona) {
|
||||
session->he_config.twt_responder = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void csr_update_session_he_cap(struct mac_context *mac_ctx,
|
||||
struct csr_roam_session *session)
|
||||
{
|
||||
enum QDF_OPMODE persona;
|
||||
tDot11fIEhe_cap *he_cap = &session->he_config;
|
||||
he_cap->present = true;
|
||||
|
||||
|
|
@ -2302,6 +2313,17 @@ void csr_update_session_he_cap(struct mac_context *mac_ctx,
|
|||
&mac_ctx->mlme_cfg->he_caps.dot11_he_cap,
|
||||
sizeof(session->he_config));
|
||||
|
||||
/*
|
||||
* Do not advertise requester role for SAP & responder role
|
||||
* for STA
|
||||
*/
|
||||
persona = csr_get_session_persona(mac_ctx, session->sessionId);
|
||||
if (QDF_SAP_MODE == persona) {
|
||||
session->he_config.twt_request = 0;
|
||||
} else if (QDF_STA_MODE == persona) {
|
||||
session->he_config.twt_responder = 0;
|
||||
}
|
||||
|
||||
if (he_cap->ppet_present) {
|
||||
/* till now operating channel is not decided yet, use 5g cap */
|
||||
qdf_mem_copy(he_cap->ppet.ppe_threshold.ppe_th,
|
||||
|
|
@ -17077,6 +17099,12 @@ QDF_STATUS csr_roam_open_session(struct mac_context *mac_ctx,
|
|||
|
||||
csr_update_session_he_cap(mac_ctx, session);
|
||||
|
||||
/*
|
||||
* Do not advertise requester role for SAP & responder role
|
||||
* for STA
|
||||
*/
|
||||
csr_init_session_twt_cap(session, session_param->type_of_persona);
|
||||
|
||||
return csr_issue_add_sta_for_session_req(mac_ctx,
|
||||
session_param->sme_session_id,
|
||||
session_param->self_mac_addr,
|
||||
|
|
|
|||
|
|
@ -968,11 +968,18 @@ bool csr_is_pmkid_found_for_peer(struct mac_context *mac,
|
|||
#ifdef WLAN_FEATURE_11AX
|
||||
void csr_update_session_he_cap(struct mac_context *mac_ctx,
|
||||
struct csr_roam_session *session);
|
||||
void csr_init_session_twt_cap(struct csr_roam_session *session,
|
||||
uint32_t type_of_persona);
|
||||
#else
|
||||
static inline void csr_update_session_he_cap(struct mac_context *mac_ctx,
|
||||
struct csr_roam_session *session)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void csr_init_session_twt_cap(struct csr_roam_session *session,
|
||||
uint32_t type_of_persona)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* csr_get_channel_for_hw_mode_change() - This function to find
|
||||
|
|
|
|||
Loading…
Reference in a new issue