qcacld-3.0: Process pkt_capture APIs based on packet capture mode

Process pkt_capture APIs only if packet capture mode is present.

Change-Id: Ibf08e550a829c266fd108c0023c016ab36728589
CRs-Fixed: 2640309
This commit is contained in:
Dundi Raviteja
2020-03-06 12:46:16 +05:30
committed by Gerrit - the friendly Code Review server
parent a14d64d378
commit 25a77e7f71
6 changed files with 15 additions and 11 deletions

View File

@@ -159,10 +159,8 @@ pkt_capture_get_pktcap_mode(struct wlan_objmgr_psoc *psoc)
vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc,
QDF_STA_MODE,
WLAN_PKT_CAPTURE_ID);
if (!vdev) {
pkt_capture_err("vdev is NULL");
if (!vdev)
return 0;
}
vdev_priv = pkt_capture_vdev_get_priv(vdev);
if (!vdev_priv)

View File

@@ -201,10 +201,9 @@ pkt_capture_process_mgmt_tx_data(struct wlan_objmgr_pdev *pdev,
vdev = wlan_objmgr_get_vdev_by_macaddr_from_pdev(pdev,
wh->i_addr2,
WLAN_PKT_CAPTURE_ID);
if (!vdev) {
pkt_capture_err("vdev is NULL");
if (!vdev)
return QDF_STATUS_E_FAILURE;
}
vdev_id = wlan_vdev_get_id(vdev);
wlan_objmgr_vdev_release_ref(vdev, WLAN_PKT_CAPTURE_ID);