qcacmn: check monitor vdev is valid before attaching

Monitor vdev attach is called both AP and Monitor VAPs
AP vap creation are started prior to monitor install.
So, add the check to determine whether valid monitor vdev or ap vdev.

Change-Id: If7a83a6826499574f88a4a1220ba3642c028f66a
CRs-Fixed: 3240300
This commit is contained in:
Madhavan Ganesan
2022-07-22 17:05:00 +05:30
committed by Madan Koyyalamudi
parent a2f709fa4f
commit 60b98ddd10

View File

@@ -5281,7 +5281,8 @@ QDF_STATUS dp_mon_vdev_attach(struct dp_vdev *vdev)
return QDF_STATUS_E_NOMEM; return QDF_STATUS_E_NOMEM;
} }
if (pdev->monitor_pdev->scan_spcl_vap_configured) if (pdev && pdev->monitor_pdev &&
pdev->monitor_pdev->scan_spcl_vap_configured)
dp_scan_spcl_vap_stats_attach(mon_vdev); dp_scan_spcl_vap_stats_attach(mon_vdev);
vdev->monitor_vdev = mon_vdev; vdev->monitor_vdev = mon_vdev;