qcacmn: Add WDI event for rx packet to packet capture mode

Add WDI event and call wdi event handler for to deliver rx packet
to packet capture mode.

Change-Id: I856ac07f292047136431f67bb2654c855767e5e8
CRs-Fixed: 2844728
This commit is contained in:
Vulupala Shashank Reddy
2020-11-18 19:51:26 +05:30
committed by snandini
parent 0366025b7f
commit 6735c84cff
3 changed files with 49 additions and 1 deletions

View File

@@ -364,6 +364,7 @@ enum WDI_EVENT {
WDI_EVENT_HMWDS_AST_ADD_STATUS, WDI_EVENT_HMWDS_AST_ADD_STATUS,
WDI_EVENT_PEER_QOS_STATS, WDI_EVENT_PEER_QOS_STATS,
WDI_EVENT_PKT_CAPTURE_TX_DATA, WDI_EVENT_PKT_CAPTURE_TX_DATA,
WDI_EVENT_PKT_CAPTURE_RX_DATA,
/* End of new event items */ /* End of new event items */
WDI_EVENT_LAST WDI_EVENT_LAST
}; };

View File

@@ -2203,6 +2203,27 @@ static inline void dp_rx_update_stats(struct dp_soc *soc,
{ {
} }
#endif #endif
#ifdef WLAN_FEATURE_PKT_CAPTURE_LITHIUM
/**
* dp_rx_deliver_to_pkt_capture() - deliver rx packet to packet capture
* @soc : dp_soc handle
* @pdev: dp_pdev handle
* @peer_id: peer_id of the peer for which completion came
* @ppdu_id: ppdu_id
* @netbuf: Buffer pointer
*
* This function is used to deliver rx packet to packet capture
*/
void dp_rx_deliver_to_pkt_capture(struct dp_soc *soc, struct dp_pdev *pdev,
uint16_t peer_id, uint32_t ppdu_id,
qdf_nbuf_t netbuf)
{
dp_wdi_event_handler(WDI_EVENT_PKT_CAPTURE_RX_DATA, soc, netbuf,
peer_id, WDI_NO_VAL, pdev->pdev_id);
}
#endif
/** /**
* dp_rx_process() - Brain of the Rx processing functionality * dp_rx_process() - Brain of the Rx processing functionality
* Called from the bottom half (tasklet/NET_RX_SOFTIRQ) * Called from the bottom half (tasklet/NET_RX_SOFTIRQ)
@@ -2852,10 +2873,13 @@ done:
} }
if (qdf_likely(deliver_list_head)) { if (qdf_likely(deliver_list_head)) {
if (qdf_likely(peer)) if (qdf_likely(peer)) {
dp_rx_deliver_to_pkt_capture(soc, vdev->pdev, peer_id,
0, deliver_list_head);
dp_rx_deliver_to_stack(soc, vdev, peer, dp_rx_deliver_to_stack(soc, vdev, peer,
deliver_list_head, deliver_list_head,
deliver_list_tail); deliver_list_tail);
}
else { else {
nbuf = deliver_list_head; nbuf = deliver_list_head;
while (nbuf) { while (nbuf) {

View File

@@ -1600,4 +1600,27 @@ void dp_rx_link_desc_refill_duplicate_check(
struct dp_soc *soc, struct dp_soc *soc,
struct hal_buf_info *buf_info, struct hal_buf_info *buf_info,
hal_buff_addrinfo_t ring_buf_info); hal_buff_addrinfo_t ring_buf_info);
#ifdef WLAN_FEATURE_PKT_CAPTURE_LITHIUM
/**
* dp_rx_deliver_to_pkt_capture() - deliver rx packet to packet capture
* @soc : dp_soc handle
* @pdev: dp_pdev handle
* @peer_id: peer_id of the peer for which completion came
* @ppdu_id: ppdu_id
* @netbuf: Buffer pointer
*
* This function is used to deliver rx packet to packet capture
*/
void dp_rx_deliver_to_pkt_capture(struct dp_soc *soc, struct dp_pdev *pdev,
uint16_t peer_id, uint32_t ppdu_id,
qdf_nbuf_t netbuf);
#else
static inline void
dp_rx_deliver_to_pkt_capture(struct dp_soc *soc, struct dp_pdev *pdev,
uint16_t peer_id, uint32_t ppdu_id,
qdf_nbuf_t netbuf)
{
}
#endif
#endif /* _DP_RX_H */ #endif /* _DP_RX_H */