qcacmn: CDP interface to deliver Tx mgmt frames

Add CDP interface to pass on host generated mgmt
frames to DP, to be included in Tx capture.

Change-Id: Ic1a63c137ca546b0ad2b94d92fd5d489e9512a6f
This commit is contained in:
Karunakar Dasineni
2019-09-10 12:40:41 -07:00
committed by nshrivas
parent db7271fbd4
commit 13abde98f1
6 changed files with 51 additions and 3 deletions

View File

@@ -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;
};

View File

@@ -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

View File

@@ -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 {

View File

@@ -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,

View File

@@ -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

View File

@@ -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 = {