qcacmn: Add API to get ML vdev list
Add API to get ML vdev list Change-Id: Ie4a001dc5b1906f2236f54335e3867727fd25e02
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9f659010f4
commit
dff5855dd9
@@ -273,4 +273,39 @@ wlan_mlo_get_pdev_by_hw_link_id(uint16_t hw_link_id,
|
||||
|
||||
return itr.pdev;
|
||||
}
|
||||
|
||||
void mlo_get_ml_vdev_list(struct wlan_objmgr_vdev *vdev,
|
||||
uint16_t *vdev_count,
|
||||
struct wlan_objmgr_vdev **wlan_vdev_list)
|
||||
{
|
||||
struct wlan_mlo_dev_context *dev_ctx;
|
||||
int i;
|
||||
QDF_STATUS status;
|
||||
|
||||
*vdev_count = 0;
|
||||
|
||||
if (!vdev || !vdev->mlo_dev_ctx) {
|
||||
mlo_err("Invalid input");
|
||||
return;
|
||||
}
|
||||
|
||||
dev_ctx = vdev->mlo_dev_ctx;
|
||||
|
||||
mlo_dev_lock_acquire(dev_ctx);
|
||||
*vdev_count = 0;
|
||||
for (i = 0; i < QDF_ARRAY_SIZE(dev_ctx->wlan_vdev_list); i++) {
|
||||
if (dev_ctx->wlan_vdev_list[i] &&
|
||||
wlan_vdev_mlme_is_mlo_vdev(dev_ctx->wlan_vdev_list[i])) {
|
||||
status = wlan_objmgr_vdev_try_get_ref(
|
||||
dev_ctx->wlan_vdev_list[i],
|
||||
WLAN_MLO_MGR_ID);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
break;
|
||||
wlan_vdev_list[*vdev_count] =
|
||||
dev_ctx->wlan_vdev_list[i];
|
||||
(*vdev_count) += 1;
|
||||
}
|
||||
}
|
||||
mlo_dev_lock_release(dev_ctx);
|
||||
}
|
||||
#endif /*WLAN_MLO_MULTI_CHIP*/
|
||||
|
Reference in New Issue
Block a user