qcacmn: Add API to check state of all mlo vdev

Add API to check state of all mlo vdev to avoid roaming and disconnect
race issue.

Change-Id: Idc9a9a57f433aeff185fe78826faa84e08c09ddb
CRs-Fixed: 3372132
This commit is contained in:
Jianmin Zhu
2023-01-03 18:23:44 +08:00
committed by Madan Koyyalamudi
vanhempi 88dd4c6970
commit b98a087c60
2 muutettua tiedostoa jossa 34 lisäystä ja 1 poistoa

Näytä tiedosto

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -106,6 +106,15 @@ bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev);
*/
bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev);
/**
* mlo_is_mld_disconnecting_connecting - Check whether MLD is disconnecting or
* connecting
* @vdev: pointer to vdev
*
* Return: true if mld is disconnecting or connecting, false otherwise
*/
bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev);
#ifndef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
/**
* ucfg_mlo_is_mld_connected - Check whether MLD is connected
@@ -632,6 +641,12 @@ bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
}
#endif
static inline
bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev)
{
return false;
}
static inline
bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev)
{

Näytä tiedosto

@@ -151,6 +151,24 @@ bool mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
return true;
}
bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev)
{
struct wlan_mlo_dev_context *mlo_dev_ctx = vdev->mlo_dev_ctx;
uint8_t i = 0;
if (!mlo_dev_ctx || !wlan_vdev_mlme_is_mlo_vdev(vdev))
return false;
for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
if (!mlo_dev_ctx->wlan_vdev_list[i])
continue;
if (wlan_cm_is_vdev_disconnecting(mlo_dev_ctx->wlan_vdev_list[i]) ||
wlan_cm_is_vdev_connecting(mlo_dev_ctx->wlan_vdev_list[i]))
return true;
}
return false;
}
bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
{
return mlo_is_mld_disconnected(vdev);