qcacld-3.0: Add logic to share 11BE mode selection with FW
Add checks to see if STA supports eMLSR mode and also vendor command selection. If both support eMLSR, then set eMLSR support bit. This value is shared with FW via wmi_vdev_set_ie. Change-Id: I9ea3bebfcaf90bb83d8811924afd8805530e40dc CRs-Fixed: 3220949
This commit is contained in:

committed by
Madan Koyyalamudi

부모
61dfd77555
커밋
1fd34c640f
@@ -4812,7 +4812,7 @@ bool policy_mgr_is_mlo_in_mode_emlsr(struct wlan_objmgr_psoc *psoc,
|
||||
mlo_idx++;
|
||||
}
|
||||
/* Check if existing vdev is eMLSR STA */
|
||||
if (wlan_vdev_mlme_get_emlsr_caps(temp_vdev))
|
||||
if (wlan_vdev_mlme_cap_get(temp_vdev, WLAN_VDEV_C_EMLSR_CAP))
|
||||
emlsr_connection = true;
|
||||
|
||||
wlan_objmgr_vdev_release_ref(temp_vdev, WLAN_POLICY_MGR_ID);
|
||||
|
@@ -422,12 +422,16 @@ void lim_objmgr_update_emlsr_caps(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
ap_emlsr_cap =
|
||||
assoc_rsp->mlo_ie.mlo_ie.eml_capabilities_info.emlsr_support;
|
||||
if (!ap_emlsr_cap)
|
||||
if (!ap_emlsr_cap) {
|
||||
pe_debug("eMLSR cap not present in assoc rsp");
|
||||
|
||||
wlan_vdev_obj_lock(vdev);
|
||||
wlan_vdev_mlme_set_emlsr_caps(vdev, ap_emlsr_cap);
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
wlan_vdev_obj_lock(vdev);
|
||||
wlan_vdev_mlme_cap_clear(vdev, WLAN_VDEV_C_EMLSR_CAP);
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
} else {
|
||||
wlan_vdev_obj_lock(vdev);
|
||||
wlan_vdev_mlme_cap_set(vdev, WLAN_VDEV_C_EMLSR_CAP);
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
}
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
||||
}
|
||||
#endif
|
||||
|
@@ -8875,7 +8875,7 @@ void lim_intersect_ap_emlsr_caps(struct pe_session *session,
|
||||
return;
|
||||
}
|
||||
|
||||
if (wlan_vdev_mlme_get_emlsr_caps(session->vdev)) {
|
||||
if (wlan_vdev_mlme_cap_get(session->vdev, WLAN_VDEV_C_EMLSR_CAP)) {
|
||||
add_bss->staContext.emlsr_support = true;
|
||||
add_bss->staContext.link_id =
|
||||
assoc_rsp->mlo_ie.mlo_ie.link_id;
|
||||
|
@@ -9735,6 +9735,7 @@ populate_dot11f_mlo_caps(struct mac_context *mac_ctx,
|
||||
{
|
||||
uint8_t *mld_addr;
|
||||
uint8_t common_info_len = 0;
|
||||
bool emlsr_cap, emlsr_enabled, emlsr_allowed = false;
|
||||
|
||||
mlo_ie->type = 0;
|
||||
/* Common Info Length */
|
||||
@@ -9747,7 +9748,29 @@ populate_dot11f_mlo_caps(struct mac_context *mac_ctx,
|
||||
|
||||
mlo_ie->bss_param_change_cnt_present = 0;
|
||||
mlo_ie->medium_sync_delay_info_present = 0;
|
||||
mlo_ie->eml_capab_present = 0;
|
||||
|
||||
/* Check if HW supports eMLSR mode */
|
||||
emlsr_cap = policy_mgr_is_hw_emlsr_capable(mac_ctx->psoc);
|
||||
|
||||
/* Check if vendor command chooses eMLSR mode */
|
||||
wlan_mlme_get_emlsr_mode_enabled(mac_ctx->psoc, &emlsr_enabled);
|
||||
|
||||
emlsr_allowed = emlsr_cap && emlsr_enabled;
|
||||
|
||||
if (emlsr_allowed) {
|
||||
wlan_vdev_obj_lock(session->vdev);
|
||||
wlan_vdev_mlme_cap_set(session->vdev, WLAN_VDEV_C_EMLSR_CAP);
|
||||
wlan_vdev_obj_unlock(session->vdev);
|
||||
mlo_ie->eml_capab_present = 1;
|
||||
mlo_ie->eml_capabilities_info.emlsr_support = 1;
|
||||
} else {
|
||||
wlan_vdev_obj_lock(session->vdev);
|
||||
wlan_vdev_mlme_cap_clear(session->vdev, WLAN_VDEV_C_EMLSR_CAP);
|
||||
wlan_vdev_obj_unlock(session->vdev);
|
||||
mlo_ie->eml_capab_present = 0;
|
||||
mlo_ie->eml_capabilities_info.emlsr_support = 0;
|
||||
}
|
||||
|
||||
mlo_ie->mld_capab_present = 1;
|
||||
common_info_len += WLAN_ML_BV_CINFO_MLDCAP_SIZE;
|
||||
mlo_ie->reserved = 0;
|
||||
@@ -10769,9 +10792,7 @@ QDF_STATUS populate_dot11f_assoc_req_mlo_ie(struct mac_context *mac_ctx,
|
||||
uint32_t len_consumed;
|
||||
uint16_t len_remaining, len;
|
||||
QDF_STATUS status;
|
||||
bool emlsr_cap, emlsr_enabled = false;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct vdev_mlme_obj *mlme_obj;
|
||||
tDot11fIEnon_inheritance sta_prof_non_inherit;
|
||||
tDot11fFfCapabilities mlo_cap;
|
||||
tDot11fIEHTCaps ht_caps;
|
||||
@@ -10794,12 +10815,6 @@ QDF_STATUS populate_dot11f_assoc_req_mlo_ie(struct mac_context *mac_ctx,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(pe_session->vdev);
|
||||
if (!mlme_obj) {
|
||||
pe_err(" VDEV MLME component object is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
pe_debug("Populate Assoc req MLO IEs");
|
||||
|
||||
mlo_ie = &pe_session->mlo_ie;
|
||||
@@ -10827,17 +10842,11 @@ QDF_STATUS populate_dot11f_assoc_req_mlo_ie(struct mac_context *mac_ctx,
|
||||
mlo_ie->mld_capabilities_info.aar_support = 0;
|
||||
}
|
||||
|
||||
/* Check if HW supports eMLSR mode */
|
||||
emlsr_cap = policy_mgr_is_hw_emlsr_capable(psoc);
|
||||
|
||||
/* Check if eMLSR is selected through vendor cmd */
|
||||
wlan_mlme_get_emlsr_mode_enabled(psoc, &emlsr_enabled);
|
||||
|
||||
wlan_vdev_mlme_set_emlsr_caps(pe_session->vdev,
|
||||
emlsr_cap && emlsr_enabled);
|
||||
|
||||
/* If there is an existing connection, then do not allow eMLSR */
|
||||
if (emlsr_cap && emlsr_enabled &&
|
||||
/*
|
||||
* Check if STA supports eMLSR and vendor command prefers eMLSR mode.
|
||||
* Also, if there is an existing connection, then do not allow eMLSR.
|
||||
*/
|
||||
if (wlan_vdev_mlme_cap_get(pe_session->vdev, WLAN_VDEV_C_EMLSR_CAP) &&
|
||||
!policy_mgr_get_connection_count(psoc)) {
|
||||
mlo_ie->eml_capab_present = 1;
|
||||
presence_bitmap |= WLAN_ML_BV_CTRL_PBM_EMLCAP_P;
|
||||
|
Reference in New Issue
Block a user