From 8dd2d4f80804696f51fb327303be5beb31682b20 Mon Sep 17 00:00:00 2001 From: Nandha Kishore Easwaran Date: Wed, 22 Jun 2022 13:37:50 +0530 Subject: [PATCH] qcacmn: Fill up the lite monitor vdev Fill up the lite monitor vdev which is needed to deliver the tx monitor frames to the configured vap. Change-Id: I298abde095fef44e67a741f48f2f73a6998efc7a CRs-Fixed: 3226335 --- dp/inc/cdp_txrx_cmn_struct.h | 3 +++ dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 234bea1702..5dea2f4aef 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -2084,6 +2084,9 @@ struct cdp_tx_indication_info { struct cdp_tx_indication_mpdu_info mpdu_info; qdf_nbuf_t mpdu_nbuf; struct cdp_tx_completion_ppdu *ppdu_desc; +#ifdef QCA_SUPPORT_LITE_MONITOR + ol_osif_vdev_handle osif_vdev; +#endif }; /** diff --git a/dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c b/dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c index 4f5070a0c9..8ad00ea62f 100644 --- a/dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c +++ b/dp/wifi3.0/monitor/2.0/dp_tx_mon_2.0.c @@ -515,6 +515,26 @@ QDF_STATUS dp_peer_set_tx_capture_enabled_2_0(struct dp_pdev *pdev_handle, return QDF_STATUS_SUCCESS; } +#ifdef QCA_SUPPORT_LITE_MONITOR +static void dp_fill_lite_mon_vdev(struct cdp_tx_indication_info *tx_cap_info, + struct dp_mon_pdev_be *mon_pdev_be) +{ + struct dp_lite_mon_config *config; + struct dp_vdev *lite_mon_vdev; + + config = &mon_pdev_be->lite_mon_tx_config->tx_config; + lite_mon_vdev = config->lite_mon_vdev; + + if (lite_mon_vdev) + tx_cap_info->osif_vdev = lite_mon_vdev->osif_vdev; +} +#else +static void dp_fill_lite_mon_vdev(struct cdp_tx_indication_info *tx_cap_info, + struct dp_mon_pdev_be *mon_pdev_be) +{ +} +#endif + /** * dp_tx_mon_send_to_stack() - API to send to stack * @pdev: pdev Handle @@ -540,6 +560,7 @@ dp_tx_mon_send_to_stack(struct dp_pdev *pdev, qdf_nbuf_t mpdu) WDI_NO_VAL, pdev->pdev_id); } else { + dp_fill_lite_mon_vdev(&tx_capture_info, mon_pdev_be); dp_wdi_event_handler(WDI_EVENT_LITE_MON_TX, pdev->soc, &tx_capture_info,