qcacmn: Iterate vdev with "Create" state check

Use safe API - wlan_objmgr_iterate_obj_list to enumerate
vdev. It will check vdev in "create" state by
wlan_objmgr_vdev_try_get_ref.

Change-Id: I650801c07846e22f1863925ed4316c0a24bd9cae
CRs-Fixed: 2849177
This commit is contained in:
Liangwei Dong
2021-01-06 10:36:07 +08:00
committed by snandini
parent f9ead26a48
commit 22151e9f26

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2021 The Linux Foundation. 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
@@ -2123,9 +2123,9 @@ static bool wlan_get_connected_vdev_by_bssid(struct wlan_objmgr_pdev *pdev,
psoc = wlan_pdev_get_psoc(pdev);
qdf_mem_zero(&context, sizeof(struct wlan_check_bssid_context));
qdf_mem_copy(context.bssid.bytes, bssid, QDF_MAC_ADDR_SIZE);
wlan_objmgr_iterate_obj_list_all(psoc, WLAN_VDEV_OP,
wlan_get_connected_vdev_handler,
&context, true, WLAN_OSIF_SCAN_ID);
wlan_objmgr_iterate_obj_list(psoc, WLAN_VDEV_OP,
wlan_get_connected_vdev_handler,
&context, true, WLAN_OSIF_SCAN_ID);
if (context.connected)
*vdev_id = context.vdev_id;