qcacld-3.0: Add link removal flag in link info

At present, the link removal flag is in vdev object, but vdev may
repurpose to other link, the link removal flag has to be in link
info struct.
Add link removal flag in link info data struct and remove
it from vdev struct.

Change-Id: I6116e89f2bb065979f4e405ef0fac386abebcf17
CRs-Fixed: 3572836
This commit is contained in:
Liangwei Dong
2023-07-26 13:44:00 +08:00
committed by Rahul Choudhary
parent 444ee71217
commit 20b3165adb
4 changed files with 48 additions and 54 deletions

View File

@@ -759,7 +759,6 @@ struct enhance_roam_info {
* @connect_info: mlme connect information * @connect_info: mlme connect information
* @wait_key_timer: wait key timer * @wait_key_timer: wait key timer
* @eht_config: Eht capability configuration * @eht_config: Eht capability configuration
* @is_mlo_sta_link_removed: link on vdev has been removed by AP
* @last_delba_sent_time: Last delba sent time to handle back to back delba * @last_delba_sent_time: Last delba sent time to handle back to back delba
* requests from some IOT APs * requests from some IOT APs
* @ba_2k_jump_iot_ap: This is set to true if connected to the ba 2k jump IOT AP * @ba_2k_jump_iot_ap: This is set to true if connected to the ba 2k jump IOT AP
@@ -827,9 +826,6 @@ struct mlme_legacy_priv {
struct wait_for_key_timer wait_key_timer; struct wait_for_key_timer wait_key_timer;
#ifdef WLAN_FEATURE_11BE #ifdef WLAN_FEATURE_11BE
tDot11fIEeht_cap eht_config; tDot11fIEeht_cap eht_config;
#endif
#if defined(WLAN_FEATURE_11BE_MLO)
bool is_mlo_sta_link_removed;
#endif #endif
qdf_time_t last_delba_sent_time; qdf_time_t last_delba_sent_time;
bool ba_2k_jump_iot_ap; bool ba_2k_jump_iot_ap;

View File

@@ -2410,22 +2410,21 @@ static void mlme_init_sta_mlo_cfg(struct wlan_objmgr_psoc *psoc,
static bool static bool
wlan_get_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev) wlan_get_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev)
{ {
struct mlme_legacy_priv *mlme_priv; bool is_mlo_link_removed = false;
bool is_mlo_link_removed; uint8_t link_id;
struct mlo_link_info *link_info;
if (!mlo_is_mld_sta(vdev)) if (!mlo_is_mld_sta(vdev))
return false; return false;
wlan_vdev_obj_lock(vdev); link_id = wlan_vdev_get_link_id(vdev);
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); link_info = mlo_mgr_get_ap_link_by_link_id(vdev, link_id);
if (!mlme_priv) { if (link_info)
wlan_vdev_obj_unlock(vdev); is_mlo_link_removed =
mlme_legacy_err("vdev legacy private object is NULL"); !!qdf_atomic_test_bit(LS_F_AP_REMOVAL_BIT,
return false; &link_info->link_status_flags);
} else
mlme_legacy_err("link info null, id %d", link_id);
is_mlo_link_removed = mlme_priv->is_mlo_sta_link_removed;
wlan_vdev_obj_unlock(vdev);
return is_mlo_link_removed; return is_mlo_link_removed;
} }
@@ -2452,7 +2451,9 @@ bool wlan_get_vdev_link_removed_flag_by_vdev_id(struct wlan_objmgr_psoc *psoc,
static QDF_STATUS static QDF_STATUS
wlan_set_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev, bool removed) wlan_set_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev, bool removed)
{ {
struct mlme_legacy_priv *mlme_priv; uint8_t link_id;
struct mlo_link_info *link_info;
bool is_mlo_link_removed;
if (!vdev) { if (!vdev) {
mlme_legacy_err("vdev NULL"); mlme_legacy_err("vdev NULL");
@@ -2464,23 +2465,26 @@ wlan_set_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev, bool removed)
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
} }
wlan_vdev_obj_lock(vdev); link_id = wlan_vdev_get_link_id(vdev);
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); link_info = mlo_mgr_get_ap_link_by_link_id(vdev, link_id);
if (!mlme_priv) { if (!link_info) {
wlan_vdev_obj_unlock(vdev); mlme_legacy_err("link info null, id %d", link_id);
mlme_legacy_err("vdev legacy private object is NULL");
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
} }
is_mlo_link_removed =
if (removed == mlme_priv->is_mlo_sta_link_removed) { !!qdf_atomic_test_bit(LS_F_AP_REMOVAL_BIT,
wlan_vdev_obj_unlock(vdev); &link_info->link_status_flags);
if (removed == is_mlo_link_removed)
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
}
mlme_legacy_debug("mlo sta vdev %d link removed flag %d", mlme_legacy_debug("mlo sta vdev %d link %d link removed flag %d",
wlan_vdev_get_id(vdev), removed); wlan_vdev_get_id(vdev), link_id, removed);
mlme_priv->is_mlo_sta_link_removed = removed; if (removed)
wlan_vdev_obj_unlock(vdev); qdf_atomic_set_bit(LS_F_AP_REMOVAL_BIT,
&link_info->link_status_flags);
else
qdf_atomic_clear_bit(LS_F_AP_REMOVAL_BIT,
&link_info->link_status_flags);
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }
@@ -2514,31 +2518,19 @@ wlan_set_vdev_link_removed_flag_by_vdev_id(struct wlan_objmgr_psoc *psoc,
void wlan_clear_mlo_sta_link_removed_flag(struct wlan_objmgr_vdev *vdev) void wlan_clear_mlo_sta_link_removed_flag(struct wlan_objmgr_vdev *vdev)
{ {
struct wlan_objmgr_vdev *wlan_vdev_list[WLAN_UMAC_MLO_MAX_VDEVS] = {0};
uint16_t vdev_count = 0;
uint8_t i; uint8_t i;
struct mlo_link_info *link_info;
if (!vdev || !mlo_is_mld_sta(vdev)) if (!vdev || !mlo_is_mld_sta(vdev))
return; return;
mlo_get_ml_vdev_list(vdev, &vdev_count, wlan_vdev_list); link_info = mlo_mgr_get_ap_link(vdev);
if (!vdev_count) { if (!link_info)
mlme_legacy_err("vdev num 0 in mld dev");
return; return;
}
for (i = 0; i < vdev_count; i++) { for (i = 0; i < WLAN_MAX_ML_BSS_LINKS; i++)
if (!wlan_vdev_list[i]) { qdf_atomic_clear_bit(LS_F_AP_REMOVAL_BIT,
mlme_legacy_err("vdev is null in mld"); &link_info[i].link_status_flags);
goto release_ref;
}
wlan_set_vdev_link_removed_flag(wlan_vdev_list[i], false);
}
release_ref:
for (i = 0; i < vdev_count; i++)
mlo_release_vdev_ref(wlan_vdev_list[i]);
} }
bool wlan_drop_mgmt_frame_on_link_removal(struct wlan_objmgr_vdev *vdev) bool wlan_drop_mgmt_frame_on_link_removal(struct wlan_objmgr_vdev *vdev)

View File

@@ -258,10 +258,12 @@ cm_disconnect_complete_ind(struct wlan_objmgr_vdev *vdev,
cm_disconnect_diag_event(vdev, rsp); cm_disconnect_diag_event(vdev, rsp);
wlan_tdls_notify_sta_disconnect(vdev_id, false, false, vdev); wlan_tdls_notify_sta_disconnect(vdev_id, false, false, vdev);
policy_mgr_decr_session_set_pcl(psoc, op_mode, vdev_id); policy_mgr_decr_session_set_pcl(psoc, op_mode, vdev_id);
wlan_clear_mlo_sta_link_removed_flag(vdev); if (rsp->req.req.source != CM_MLO_LINK_SWITCH_DISCONNECT) {
ml_nlink_conn_change_notify( wlan_clear_mlo_sta_link_removed_flag(vdev);
psoc, vdev_id, ml_nlink_disconnect_completion_evt, ml_nlink_conn_change_notify(
NULL); psoc, vdev_id, ml_nlink_disconnect_completion_evt,
NULL);
}
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }

View File

@@ -481,13 +481,17 @@ ml_nlink_get_standby_link_info(struct wlan_objmgr_psoc *psoc,
} }
if ((flag & NLINK_EXCLUDE_REMOVED_LINK) && if ((flag & NLINK_EXCLUDE_REMOVED_LINK) &&
link_info->link_status_flags) { qdf_atomic_test_bit(
LS_F_AP_REMOVAL_BIT,
&link_info->link_status_flags)) {
mlo_debug("standby link %d is removed", mlo_debug("standby link %d is removed",
link_info->link_id); link_info->link_id);
continue; continue;
} }
if ((flag & NLINK_INCLUDE_REMOVED_LINK_ONLY) && if ((flag & NLINK_INCLUDE_REMOVED_LINK_ONLY) &&
!link_info->link_status_flags) { !qdf_atomic_test_bit(
LS_F_AP_REMOVAL_BIT,
&link_info->link_status_flags)) {
continue; continue;
} }