qcacld-3.0: Fix NULL VDEV point during peer remove in monitor mode

After gerrit#2436786, vdev in monitor mode is removed from vdev
list of pdev. So it is needed to use the new cdp api, which is
cdp_get_mon_vdev_from_pdev in stead of cdp_get_vdev_from_vdev_id
in monitor mode to register vdev.

CRs-Fixed: 2359997
Change-Id: I75cad531e161748a3830104516e44079dee636ec
This commit is contained in:
chenguo 2018-12-12 18:46:13 +08:00 • committed by nshrivas
commit ede57cd0cc

View file

@ -1736,7 +1736,10 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
QDF_BUG(0);
return QDF_STATUS_E_INVAL;
}
vdev = cdp_get_vdev_from_vdev_id(soc, pdev, vdev_id);
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
vdev = cdp_get_mon_vdev_from_pdev(soc, pdev);
else
vdev = cdp_get_vdev_from_vdev_id(soc, pdev, vdev_id);
if (!vdev) {
WMA_LOGE("%s vdev is null for peer peer->mac_addr %pM",
__func__, peer_mac_addr);