qcacmn: Define an API to check if any MLO link is disconnecting

Add an MLO API to check connection manager state machine if
any MLO link is in disconnecting.

Change-Id: I411ed9c9ab7cc0378147b5a4cf930b43cd3f7814
CRs-Fixed: 3628519
This commit is contained in:
Srinivas Dasari
2023-09-29 00:31:56 +05:30
committed by Rahul Choudhary
parent 379833c37a
commit fa6e3838d9
2 changed files with 36 additions and 0 deletions

View File

@@ -1175,6 +1175,15 @@ void mlo_defer_set_keys(struct wlan_objmgr_vdev *vdev,
bool mlo_is_set_key_defered(struct wlan_objmgr_vdev *vdev,
uint8_t link_id);
/**
* mlo_is_any_link_disconnecting: Check if any ML link is disconnecting
* @vdev: vdev obj
*
* Check connection manager state machine if any ML link is disconnecting
*
* Return: boolean value true or false
*/
bool mlo_is_any_link_disconnecting(struct wlan_objmgr_vdev *vdev);
#else
static inline
void mlo_defer_set_keys(struct wlan_objmgr_vdev *vdev,
@@ -1188,5 +1197,11 @@ bool mlo_is_set_key_defered(struct wlan_objmgr_vdev *vdev,
{
return false;
}
static inline
bool mlo_is_any_link_disconnecting(struct wlan_objmgr_vdev *vdev)
{
return false;
}
#endif
#endif

View File

@@ -2783,4 +2783,25 @@ wlan_mlo_send_vdev_pause(struct wlan_objmgr_psoc *psoc,
if (QDF_IS_STATUS_ERROR(status))
mlo_err("Failed to send vdev pause to FW");
}
#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
bool mlo_is_any_link_disconnecting(struct wlan_objmgr_vdev *vdev)
{
struct wlan_objmgr_vdev *wlan_vdev_list[WLAN_UMAC_MLO_MAX_VDEVS];
uint16_t vdev_count = 0, i;
bool status = false;
if (!vdev)
return status;
mlo_sta_get_vdev_list(vdev, &vdev_count, wlan_vdev_list);
for (i = 0; i < vdev_count; i++) {
if (!status && wlan_cm_is_vdev_disconnecting(wlan_vdev_list[i]))
status = true;
mlo_release_vdev_ref(wlan_vdev_list[i]);
}
return status;
}
#endif
#endif