qcacld-3.0: Use objmgr API to get 1st vdev from pdev

If Vdev id is not present driver tries to get vdev with vdev id 0
from pdev. Vdev with vdev_id 0 might not be present on pdev so use
objmgr API wlan_objmgr_pdev_get_first_vdev to get the first vdev.

Change-Id: I2ae0d6056709339a8167582ec327269aa84c93f4
CRs-Fixed: 2349702
This commit is contained in:
Abhishek Singh 2018-11-14 11:56:05 +05:30 • committed by nshrivas
commit cdd3d4c1d1

View file

@ -1811,8 +1811,8 @@ QDF_STATUS csr_scan_abort_mac_scan(tpAniSirGlobal mac_ctx, uint32_t vdev_id,
/* Get NL global context from objmgr*/
if (vdev_id == INVAL_VDEV_ID)
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev,
0, WLAN_LEGACY_SME_ID);
vdev = wlan_objmgr_pdev_get_first_vdev(mac_ctx->pdev,
WLAN_LEGACY_SME_ID);
else
vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac_ctx->pdev,
vdev_id, WLAN_LEGACY_SME_ID);