|
@@ -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;
|