qcacmn: fix mvdev NULL issue

set mvdev to null only if mvdev is pointing to vdev
for which monitor vdev detach is called.

Change-Id: I5c82db4e8ea192636a8c322c36f55a5574f9dcee
CRs-Fixed: 3015003
This commit is contained in:
aloksing
2021-08-16 16:17:12 +05:30
committed by Madan Koyyalamudi
parent a32acb5027
commit 00832d6f5b

View File

@@ -5690,7 +5690,10 @@ static QDF_STATUS dp_mon_vdev_detach(struct dp_vdev *vdev)
qdf_mem_free(mon_vdev);
vdev->monitor_vdev = NULL;
pdev->monitor_pdev->mvdev = NULL;
/* set mvdev to NULL only if detach is called for monitor/special vap
*/
if (pdev->monitor_pdev->mvdev == vdev)
pdev->monitor_pdev->mvdev = NULL;
return QDF_STATUS_SUCCESS;
}