diff --git a/components/mlme/core/inc/wlan_mlme_main.h b/components/mlme/core/inc/wlan_mlme_main.h index 0ebb5ebcca27..b8fc6c324718 100644 --- a/components/mlme/core/inc/wlan_mlme_main.h +++ b/components/mlme/core/inc/wlan_mlme_main.h @@ -666,11 +666,21 @@ mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); * @reqs: RSO stop requestor * @clear: clear bit if true else set bit * - * Return: bitmap value + * Return: None */ void mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, enum wlan_cm_rso_control_requestor reqs, bool clear); +/** + * mlme_clear_operations_bitmap() - Clear mlme operations bitmap which + * indicates what mlme operations are in progress + * @psoc: PSOC pointer + * @vdev_id: vdev for which the mlme operation bitmap is requested + * + * Return: None + */ +void +mlme_clear_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id); #define MLME_IS_ROAM_STATE_RSO_ENABLED(psoc, vdev_id) \ (mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_RSO_ENABLED) diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 5017ef821e25..f45c7d1924c1 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -2832,6 +2832,8 @@ mlme_get_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id) } bitmap = mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap; + mlme_legacy_debug("vdev[%d] bitmap[0x%x]", vdev_id, + mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap); wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); return bitmap; @@ -2862,6 +2864,34 @@ mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id, mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap &= ~reqs; else mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap |= reqs; + + mlme_legacy_debug("vdev[%d] bitmap[0x%x], reqs: %d, clear: %d", vdev_id, + mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap, + reqs, clear); + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); +} + +void +mlme_clear_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id) +{ + struct wlan_objmgr_vdev *vdev; + struct mlme_legacy_priv *mlme_priv; + + vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id, + WLAN_MLME_OBJMGR_ID); + if (!vdev) { + mlme_legacy_err("vdev object is NULL"); + return; + } + + mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); + if (!mlme_priv) { + mlme_legacy_err("vdev legacy private object is NULL"); + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); + return; + } + + mlme_priv->mlme_roam.roam_sm.mlme_operations_bitmap = 0; wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); } diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c index 6c761f41f566..9841f99ba09e 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c @@ -877,6 +877,7 @@ cm_roam_switch_to_deinit(struct wlan_objmgr_pdev *pdev, return status; mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_DEINIT); + mlme_clear_operations_bitmap(psoc, vdev_id); if (reason != REASON_SUPPLICANT_INIT_ROAMING) wlan_cm_enable_roaming_on_connected_sta(pdev, vdev_id);