From 53d2d231fcf590d0ac77edeb0b18088dd001dd6b Mon Sep 17 00:00:00 2001 From: Santosh Anbu Date: Wed, 16 Nov 2022 16:05:19 +0530 Subject: [PATCH] qcacmn: Add callback to notify if vdev is in mlo_sync_wait Add vdev callback to notify once the vdev has entered into MLO_SYNC_WAIT state. Change-Id: I655bfa68d666807468cacf1a0a052ac6ddf0b8d6 CRs-Fixed: 3338519 --- umac/mlme/include/wlan_vdev_mlme.h | 3 ++- umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c | 1 + umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h | 25 ++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/umac/mlme/include/wlan_vdev_mlme.h b/umac/mlme/include/wlan_vdev_mlme.h index 8dfcdb9208..33cad6c8c8 100644 --- a/umac/mlme/include/wlan_vdev_mlme.h +++ b/umac/mlme/include/wlan_vdev_mlme.h @@ -770,7 +770,8 @@ struct vdev_mlme_ops { QDF_STATUS (*mlme_vdev_sta_disconn_start)( struct vdev_mlme_obj *vdev_mlme, uint16_t event_data_len, void *event_data); - + QDF_STATUS (*mlme_vdev_notify_mlo_sync_wait_entry)( + struct vdev_mlme_obj *vdev_mlme); }; /** diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c index d0e3efdc93..2b2fe1c144 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c +++ b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c @@ -1658,6 +1658,7 @@ static void mlme_vdev_subst_mlo_sync_wait_entry(void *ctx) QDF_BUG(0); mlme_vdev_set_substate(vdev, WLAN_VDEV_SS_MLO_SYNC_WAIT); + mlme_vdev_notify_mlo_sync_wait_entry(vdev_mlme); } /** diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h index 121a4690e9..e40a170a28 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h +++ b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.h @@ -693,6 +693,25 @@ static inline void mlme_vdev_up_active_notify_mlo_mgr( wlan_vdev_mlme_is_mlo_vdev(vdev_mlme->vdev)) mlo_sta_up_active_notify(vdev_mlme->vdev); } + +/** + * mlme_vdev_notify_mlo_sync_wait_entry - Notifies mlo sync wait state + * @vdev_mlme_obj: VDEV MLME comp object + * + * Return: NO_SUPPORT if the callback is not supported. + * SUCCESS if notification is handled by caller + */ +static inline QDF_STATUS mlme_vdev_notify_mlo_sync_wait_entry( + struct vdev_mlme_obj *vdev_mlme) +{ + QDF_STATUS ret = QDF_STATUS_E_NOSUPPORT; + + if (vdev_mlme->ops && + vdev_mlme->ops->mlme_vdev_notify_mlo_sync_wait_entry) + ret = vdev_mlme->ops->mlme_vdev_notify_mlo_sync_wait_entry( + vdev_mlme); + return ret; +} #else static inline void mlme_vdev_up_notify_mlo_mgr(struct vdev_mlme_obj *vdev_mlme) { @@ -712,6 +731,12 @@ static inline void mlme_vdev_up_active_notify_mlo_mgr( struct vdev_mlme_obj *vdev_mlme) { } + +static inline QDF_STATUS mlme_vdev_notify_mlo_sync_wait_entry( + struct vdev_mlme_obj *vdev_mlme) +{ + return QDF_STATUS_SUCCESS; +} #endif #ifdef VDEV_SM_LOCK_SUPPORT