diff --git a/umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h b/umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h index d8330a0fe7..6e58972332 100644 --- a/umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h +++ b/umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h @@ -26,6 +26,7 @@ #include #ifdef WLAN_FEATURE_11BE_MLO #include +#include /** * mlo_connect - Start the connection process @@ -294,14 +295,30 @@ static inline void mlo_clear_bridge_sta_ctx(struct wlan_objmgr_vdev *vdev) { struct wlan_mlo_dev_context *ml_dev = NULL; + struct wlan_objmgr_vdev *tmp_vdev = NULL; + uint8_t bridge_umac_id = -1; if (!vdev || !vdev->mlo_dev_ctx) return; ml_dev = vdev->mlo_dev_ctx; - if (ml_dev->bridge_sta_ctx) + if (ml_dev->bridge_sta_ctx) { + bridge_umac_id = ml_dev->bridge_sta_ctx->bridge_umac_id; qdf_mem_zero(ml_dev->bridge_sta_ctx, - sizeof(ml_dev->bridge_sta_ctx)); + sizeof(struct wlan_mlo_bridge_sta)); + } + if (mlo_is_force_central_primary(vdev)) { + tmp_vdev = mlo_get_link_vdev_from_psoc_id(ml_dev, + bridge_umac_id, + false); + if (!tmp_vdev) { + mlo_err("VDEV derivation failed for %u psoc wds bridge", + bridge_umac_id); + return; + } + tmp_vdev->vdev_objmgr.mlo_central_vdev = false; + wlan_objmgr_vdev_release_ref(tmp_vdev, WLAN_MLO_MGR_ID); + } } #else