diff --git a/components/mlme/core/inc/wlan_mlme_main.h b/components/mlme/core/inc/wlan_mlme_main.h index 15beca7ace3b..5c76180b5d0c 100644 --- a/components/mlme/core/inc/wlan_mlme_main.h +++ b/components/mlme/core/inc/wlan_mlme_main.h @@ -39,9 +39,11 @@ /** * struct wlan_mlme_psoc_ext_obj -MLME ext psoc priv object * @cfg: cfg items + * @rso_tx_ops: Roam Tx ops to send roam offload commands to firmware */ struct wlan_mlme_psoc_ext_obj { struct wlan_mlme_cfg cfg; + struct wlan_cm_roam_tx_ops rso_tx_ops; }; /** diff --git a/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c b/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c index 4d943ad71bf2..65fe2230a2a1 100644 --- a/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c +++ b/components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c @@ -1072,8 +1072,6 @@ QDF_STATUS vdevmgr_mlme_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme) } vdev_mlme->ext_vdev_ptr->fils_con_info = NULL; - target_if_cm_roam_register_tx_ops( - &vdev_mlme->ext_vdev_ptr->cm_roam.tx_ops); sme_get_vdev_type_nss(wlan_vdev_mlme_get_opmode(vdev_mlme->vdev), &vdev_mlme->proto.generic.nss_2g, @@ -1321,6 +1319,8 @@ QDF_STATUS psoc_mlme_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme) mlme_legacy_err("Failed to allocate memory"); return QDF_STATUS_E_NOMEM; } + target_if_cm_roam_register_tx_ops( + &psoc_mlme->ext_psoc_ptr->rso_tx_ops); return QDF_STATUS_SUCCESS; } diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h index 7fa224f25fe2..6e18b33b1580 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h @@ -1323,7 +1323,6 @@ struct wlan_cm_rso_configs { /** * struct wlan_cm_roam - Connection manager roam configs, state and roam * data related structure - * @tx_ops: Roam Tx ops to send roam offload commands to firmware * @pcl_vdev_cmd_active: Flag to check if vdev level pcl command needs to be * sent or PDEV level PCL command needs to be sent * @control_param: vendor configured roam control param @@ -1331,7 +1330,6 @@ struct wlan_cm_rso_configs { * legacy tpCsrNeighborRoamControlInfo structure. */ struct wlan_cm_roam { - struct wlan_cm_roam_tx_ops tx_ops; bool pcl_vdev_cmd_active; struct wlan_cm_roam_vendor_btm_params vendor_btm_param; struct wlan_cm_rso_configs vdev_rso_config; diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c index 43a11990ebad..2f6f1231aa95 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c @@ -21,6 +21,7 @@ */ #include "wlan_objmgr_psoc_obj.h" +#include "wlan_psoc_mlme_api.h" #include "wlan_policy_mgr_api.h" #include "wlan_mlme_ucfg_api.h" #include "wlan_reg_services_api.h" @@ -32,16 +33,22 @@ static inline struct wlan_cm_roam_tx_ops *wlan_cm_roam_get_tx_ops_from_vdev( struct wlan_objmgr_vdev *vdev) { - struct mlme_legacy_priv *mlme_priv; + struct wlan_mlme_psoc_ext_obj *psoc_ext_priv; struct wlan_cm_roam_tx_ops *tx_ops; + struct wlan_objmgr_psoc *psoc; - mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); - if (!mlme_priv) { - mlme_legacy_err("vdev legacy private object is NULL"); + psoc = wlan_vdev_get_psoc(vdev); + if (!psoc) { + mlme_legacy_err("psoc object is NULL"); + return NULL; + } + psoc_ext_priv = wlan_psoc_mlme_get_ext_hdl(psoc); + if (!psoc_ext_priv) { + mlme_legacy_err("psoc legacy private object is NULL"); return NULL; } - tx_ops = &mlme_priv->cm_roam.tx_ops; + tx_ops = &psoc_ext_priv->rso_tx_ops; return tx_ops; }