diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 923c94185e..c3dca28c29 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -1447,12 +1447,10 @@ struct cdp_tx_indication_mpdu_info { /** * struct cdp_tx_indication_info - Tx capture information - * @frame_payload: 802.11 payload is present already * @mpdu_info: Tx MPDU completion information * @mpdu_nbuf: reconstructed mpdu packet */ struct cdp_tx_indication_info { - uint8_t frame_payload; struct cdp_tx_indication_mpdu_info mpdu_info; qdf_nbuf_t mpdu_nbuf; }; diff --git a/dp/inc/cdp_txrx_mon.h b/dp/inc/cdp_txrx_mon.h index 19830a3516..1c8c9a8b1f 100644 --- a/dp/inc/cdp_txrx_mon.h +++ b/dp/inc/cdp_txrx_mon.h @@ -166,4 +166,28 @@ static inline void cdp_record_monitor_chan_num soc->ops->mon_ops->txrx_monitor_record_channel(pdev, chan_num); } + +/** + * cdp_deliver_tx_mgmt() - Deliver mgmt frame for tx capture + * @soc: Datapath SOC handle + * @pdev: Datapath PDEV handle + * @nbuf: Management frame buffer + */ +static inline void +cdp_deliver_tx_mgmt(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, + qdf_nbuf_t nbuf) +{ + if (!soc || !soc->ops) { + QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, + "%s: Invalid Instance", __func__); + QDF_BUG(0); + return; + } + + if (!soc->ops->mon_ops || + !soc->ops->mon_ops->txrx_deliver_tx_mgmt) + return; + + soc->ops->mon_ops->txrx_deliver_tx_mgmt(pdev, nbuf); +} #endif diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 9546886f7b..4bd1f15db1 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -752,6 +752,9 @@ struct cdp_mon_ops { void (*txrx_monitor_record_channel) (struct cdp_pdev *, int val); + + void (*txrx_deliver_tx_mgmt) + (struct cdp_pdev *pdev, qdf_nbuf_t nbuf); }; struct cdp_host_stats_ops { diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index c03b4a0559..24d065b04d 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -2691,7 +2691,7 @@ static void dp_process_ppdu_stats_user_compltn_flush_tlv(struct dp_pdev *pdev, * * return: void */ -static void dp_deliver_mgmt_frm(struct dp_pdev *pdev, qdf_nbuf_t nbuf) +void dp_deliver_mgmt_frm(struct dp_pdev *pdev, qdf_nbuf_t nbuf) { if (pdev->tx_sniffer_enable || pdev->mcopy_mode) { dp_wdi_event_handler(WDI_EVENT_TX_MGMT_CTRL, pdev->soc, diff --git a/dp/wifi3.0/dp_internal.h b/dp/wifi3.0/dp_internal.h index 43fe11008d..235da64376 100644 --- a/dp/wifi3.0/dp_internal.h +++ b/dp/wifi3.0/dp_internal.h @@ -1361,6 +1361,15 @@ QDF_STATUS dp_tx_add_to_comp_queue(struct dp_soc *soc, } #endif +#ifdef FEATURE_PERPKT_INFO +void dp_deliver_mgmt_frm(struct dp_pdev *pdev, qdf_nbuf_t nbuf); +#else +static inline +void dp_deliver_mgmt_frm(struct dp_pdev *pdev, qdf_nbuf_t nbuf) +{ +} +#endif + /** * dp_vdev_to_cdp_vdev() - typecast dp vdev to cdp vdev * @vdev: DP vdev handle diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 1fd121e73d..fd6d329712 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -6516,6 +6516,19 @@ void dp_pdev_set_monitor_channel(struct cdp_pdev *pdev_handle, int chan_num) pdev->mon_chan_num = chan_num; } +/** + * dp_deliver_tx_mgmt() - Deliver mgmt frame for tx capture + * @pdev_handle: Datapath PDEV handle + * @nbuf: Management frame buffer + */ +static void +dp_deliver_tx_mgmt(struct cdp_pdev *pdev_handle, qdf_nbuf_t nbuf) +{ + struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle; + + dp_deliver_mgmt_frm(pdev, nbuf); +} + /** * dp_get_pdev_id_frm_pdev() - get pdev_id * @pdev_handle: Datapath PDEV handle @@ -9145,6 +9158,7 @@ static struct cdp_mon_ops dp_ops_mon = { /* Added support for HK advance filter */ .txrx_set_advance_monitor_filter = dp_pdev_set_advance_monitor_filter, .txrx_monitor_record_channel = dp_pdev_set_monitor_channel, + .txrx_deliver_tx_mgmt = dp_deliver_tx_mgmt, }; static struct cdp_host_stats_ops dp_ops_host_stats = {