diff options
| author | Nirav Shah <nnshah@codeaurora.org> | 2016-08-01 14:39:23 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-08-20 10:36:59 -0700 |
| commit | d59b3b253eaaee7fb57fa573ce27a3c750ef4aac (patch) | |
| tree | a18f487f43ae58cd74467cf65cf5bc55266cb4dc /core | |
| parent | 9808c1d8efa82ed9bf3b60637e86a9215a4da9a1 (diff) | |
qcacld-3.0: Log rx packet in packetlog as per rx ind message
Log rx packet in packetlog as per HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND
message from firmware.
CRs-Fixed: 970647
Change-Id: I5773b67a9269063531d038d46ac404c978818dcc
Diffstat (limited to 'core')
| -rw-r--r-- | core/dp/htt/htt_rx.c | 8 | ||||
| -rw-r--r-- | core/dp/ol/inc/ol_htt_rx_api.h | 3 | ||||
| -rw-r--r-- | core/dp/txrx/ol_rx.c | 35 |
3 files changed, 42 insertions, 4 deletions
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 8283e60bffa2..3462c827dec9 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -1937,6 +1937,14 @@ void htt_rx_mon_note_capture_channel(htt_pdev_handle pdev, int mon_ch) extern void dump_pkt(qdf_nbuf_t nbuf, uint32_t nbuf_paddr, int len); +uint32_t htt_rx_amsdu_rx_in_order_get_pktlog(qdf_nbuf_t rx_ind_msg) +{ + uint32_t *msg_word; + + msg_word = (uint32_t *) qdf_nbuf_data(rx_ind_msg); + return HTT_RX_IN_ORD_PADDR_IND_PKTLOG_GET(*msg_word); +} + /* Return values: 1 - success, 0 - failure */ int htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev, diff --git a/core/dp/ol/inc/ol_htt_rx_api.h b/core/dp/ol/inc/ol_htt_rx_api.h index 303819a8732d..e2149be366df 100644 --- a/core/dp/ol/inc/ol_htt_rx_api.h +++ b/core/dp/ol/inc/ol_htt_rx_api.h @@ -862,4 +862,7 @@ htt_rx_offload_paddr_msdu_pop_ll(htt_pdev_handle pdev, int *tid, uint8_t *fw_desc, qdf_nbuf_t *head_buf, qdf_nbuf_t *tail_buf); + +uint32_t htt_rx_amsdu_rx_in_order_get_pktlog(qdf_nbuf_t rx_ind_msg); + #endif /* _OL_HTT_RX_API__H_ */ diff --git a/core/dp/txrx/ol_rx.c b/core/dp/txrx/ol_rx.c index d201313ac259..760500c71642 100644 --- a/core/dp/txrx/ol_rx.c +++ b/core/dp/txrx/ol_rx.c @@ -69,14 +69,19 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer, * @pdev: pdev handle * @peer: peer handle * @msdu: skb list + * @pktlog_bit: packetlog bit from firmware * * Return: none */ +#ifdef HELIUMPLUS void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev, - struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu) + struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit) { struct ol_rx_remote_data data; + if (!pktlog_bit) + return; + data.msdu = msdu; if (peer) data.mac_id = peer->vdev->mac_id; @@ -85,6 +90,21 @@ void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev, wdi_event_handler(WDI_EVENT_RX_DESC_REMOTE, pdev, &data); } +#else +void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev, + struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit) +{ + struct ol_rx_remote_data data; + + data.msdu = msdu; + if (peer) + data.mac_id = peer->vdev->mac_id; + else + data.mac_id = 0; + + wdi_event_handler(WDI_EVENT_RX_DESC_REMOTE, pdev, &data); +} +#endif #ifdef HTT_RX_RESTORE @@ -529,7 +549,7 @@ ol_rx_indication_handler(ol_txrx_pdev_handle pdev, /* Pktlog */ #ifdef WDI_EVENT_ENABLE - ol_rx_send_pktlog_event(pdev, peer, head_msdu); + ol_rx_send_pktlog_event(pdev, peer, head_msdu, 1); #endif if (msdu_chaining) { @@ -607,7 +627,7 @@ ol_rx_indication_handler(ol_txrx_pdev_handle pdev, if (status != htt_rx_status_ctrl_mgmt_null) { /* Pktlog */ ol_rx_send_pktlog_event(pdev, - peer, head_msdu); + peer, head_msdu, 1); } #endif if (status == htt_rx_status_err_inv_peer) { @@ -1309,6 +1329,9 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev, htt_pdev_handle htt_pdev = NULL; int status; qdf_nbuf_t head_msdu, tail_msdu = NULL; +#ifdef WDI_EVENT_ENABLE + uint8_t pktlog_bit; +#endif if (pdev) { if (qdf_unlikely(QDF_GLOBAL_MONITOR_MODE == cds_get_conparam())) @@ -1328,6 +1351,10 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev, __func__, __LINE__, rx_ind_msg, peer_id, tid, is_offload); #endif +#ifdef WDI_EVENT_ENABLE + pktlog_bit = (htt_rx_amsdu_rx_in_order_get_pktlog(rx_ind_msg) == 0x01); +#endif + /* * Get a linked list of the MSDUs in the rx in order indication. * This also attaches each rx MSDU descriptor to the @@ -1351,7 +1378,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev, /* Pktlog */ #ifdef WDI_EVENT_ENABLE - ol_rx_send_pktlog_event(pdev, peer, head_msdu); + ol_rx_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit); #endif /* if this is an offload indication, peer id is carried in the |
