From 9b146aa11a7e1894f266bf608bbfd3d220aeba7c Mon Sep 17 00:00:00 2001 From: Ananya Gupta Date: Tue, 25 Feb 2020 19:38:01 +0530 Subject: [PATCH] qcacmn: Iterate over all vdev ids to check if peer exists Currently when checking for duplicate peer, only the vdev id on which peer is going to be created is checked and not on other vdev ids. So correct it by iterating over all vdev ids. Change-Id: Ie05ecc125d3285a522021b630fc7244501b6a797 CRs-Fixed: 2629146 --- dp/wifi3.0/dp_peer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index 2c975b06e0..d173099a5f 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -3559,7 +3559,7 @@ bool dp_find_peer_exist_on_other_vdev(struct cdp_soc_t *soc_hdl, struct dp_vdev *vdev; for (i = 0; i < max_bssid; i++) { - vdev = dp_get_vdev_from_soc_vdev_id_wifi3(soc, vdev_id); + vdev = dp_get_vdev_from_soc_vdev_id_wifi3(soc, i); /* Need to check vdevs other than the vdev_id */ if (vdev_id == i || !vdev) continue; @@ -3567,9 +3567,8 @@ bool dp_find_peer_exist_on_other_vdev(struct cdp_soc_t *soc_hdl, dp_pdev_to_cdp_pdev(vdev->pdev), dp_vdev_to_cdp_vdev(vdev), peer_addr)) { - QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO_HIGH, - "%s: Duplicate peer %pM already exist on vdev %d", - __func__, peer_addr, i); + dp_err("%s: Duplicate peer %pM already exist on vdev %d", + __func__, peer_addr, i); return true; } }