qcacld-3.0: Featurize packet log
Featurize packet log. Change-Id: Id747d142d72d02759b20bcf3091fd769261b8f67 CRs-Fixed: 2245422
This commit is contained in:

gecommit door
nshrivas

bovenliggende
73713f7e80
commit
bb8e47c200
@@ -1770,7 +1770,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
|
||||
/* calling callback function for packet logging */
|
||||
if (pdev->rx_pkt_dump_cb) {
|
||||
if (qdf_unlikely(RX_DESC_MIC_ERR_IS_SET &&
|
||||
!RX_DESC_DISCARD_IS_SET))
|
||||
!RX_DESC_DISCARD_IS_SET))
|
||||
status = RX_PKT_FATE_FW_DROP_INVALID;
|
||||
pdev->rx_pkt_dump_cb(msdu, peer_id, status);
|
||||
}
|
||||
@@ -2904,6 +2904,7 @@ int htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev)
|
||||
}
|
||||
#endif /* IPA_OFFLOAD */
|
||||
|
||||
#ifndef REMOVE_PKT_LOG
|
||||
/**
|
||||
* htt_register_rx_pkt_dump_callback() - registers callback to
|
||||
* get rx pkt status and call callback to do rx packet dump
|
||||
@@ -2954,4 +2955,4 @@ void htt_deregister_rx_pkt_dump_callback(struct htt_pdev_t *pdev)
|
||||
}
|
||||
pdev->rx_pkt_dump_cb = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -388,11 +388,30 @@ static inline void htt_clear_bundle_stats(struct htt_pdev_t *pdev)
|
||||
#endif
|
||||
|
||||
void htt_mark_first_wakeup_packet(htt_pdev_handle pdev, uint8_t value);
|
||||
|
||||
typedef void (*tp_rx_pkt_dump_cb)(qdf_nbuf_t msdu, uint8_t peer_id,
|
||||
uint8_t status);
|
||||
#ifdef REMOVE_PKT_LOG
|
||||
static inline
|
||||
void htt_register_rx_pkt_dump_callback(struct htt_pdev_t *pdev,
|
||||
tp_rx_pkt_dump_cb ol_rx_pkt_dump_call);
|
||||
tp_rx_pkt_dump_cb ol_rx_pkt_dump_call)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void htt_deregister_rx_pkt_dump_callback(struct htt_pdev_t *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void ol_rx_pkt_dump_call(qdf_nbuf_t msdu, uint8_t peer_id, uint8_t status)
|
||||
{
|
||||
}
|
||||
#else
|
||||
void htt_register_rx_pkt_dump_callback(struct htt_pdev_t *pdev,
|
||||
tp_rx_pkt_dump_cb ol_rx_pkt_dump_call);
|
||||
void htt_deregister_rx_pkt_dump_callback(struct htt_pdev_t *pdev);
|
||||
void ol_rx_pkt_dump_call(qdf_nbuf_t msdu, uint8_t peer_id, uint8_t status);
|
||||
#endif
|
||||
|
||||
#endif /* _OL_HTT_API__H_ */
|
||||
|
@@ -120,6 +120,7 @@ void ol_rx_ind_record_event(uint32_t value, enum ol_rx_ind_record_type type)
|
||||
void ol_rx_data_process(struct ol_txrx_peer_t *peer,
|
||||
qdf_nbuf_t rx_buf_list);
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
/**
|
||||
* ol_rx_send_pktlog_event() - send rx packetlog event
|
||||
* @pdev: pdev handle
|
||||
@@ -176,6 +177,7 @@ void ol_rx_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
|
||||
&data);
|
||||
}
|
||||
#endif
|
||||
#endif /* WDI_EVENT_ENABLE */
|
||||
|
||||
#ifdef HTT_RX_RESTORE
|
||||
|
||||
@@ -257,6 +259,7 @@ void ol_rx_update_histogram_stats(uint32_t msdu_count, uint8_t frag_ind,
|
||||
|
||||
}
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
static void ol_rx_process_inv_peer(ol_txrx_pdev_handle pdev,
|
||||
void *rx_mpdu_desc, qdf_nbuf_t msdu)
|
||||
{
|
||||
@@ -293,11 +296,16 @@ static void ol_rx_process_inv_peer(ol_txrx_pdev_handle pdev,
|
||||
msg.wh = wh;
|
||||
msg.msdu = msdu;
|
||||
msg.vdev_id = vdev->vdev_id;
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
wdi_event_handler(WDI_EVENT_RX_PEER_INVALID, (struct cdp_pdev *)pdev,
|
||||
&msg);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
void ol_rx_process_inv_peer(ol_txrx_pdev_handle pdev,
|
||||
void *rx_mpdu_desc, qdf_nbuf_t msdu)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QCA_SUPPORT_PEER_DATA_RX_RSSI
|
||||
static inline int16_t
|
||||
@@ -624,9 +632,8 @@ ol_rx_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
}
|
||||
|
||||
/* Pktlog */
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
ol_rx_send_pktlog_event(pdev, peer, head_msdu, 1);
|
||||
#endif
|
||||
ol_rx_send_pktlog_event(pdev, peer,
|
||||
head_msdu, 1);
|
||||
|
||||
if (msdu_chaining) {
|
||||
/*
|
||||
@@ -702,19 +709,20 @@ ol_rx_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
key_id);
|
||||
}
|
||||
}
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
|
||||
if (status != htt_rx_status_ctrl_mgmt_null) {
|
||||
/* Pktlog */
|
||||
ol_rx_send_pktlog_event(pdev,
|
||||
peer, msdu, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (status == htt_rx_status_err_inv_peer) {
|
||||
/* once per mpdu */
|
||||
ol_rx_process_inv_peer(pdev,
|
||||
rx_mpdu_desc,
|
||||
msdu);
|
||||
}
|
||||
|
||||
while (1) {
|
||||
/* Free the nbuf */
|
||||
qdf_nbuf_t next;
|
||||
@@ -970,24 +978,6 @@ ol_rx_offload_deliver_ind_handler(ol_txrx_pdev_handle pdev,
|
||||
htt_rx_msdu_buff_replenish(htt_pdev);
|
||||
}
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
static inline
|
||||
void ol_rx_mic_error_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
|
||||
struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit)
|
||||
{
|
||||
ol_rx_send_pktlog_event(pdev, peer, msdu, pktlog_bit);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline
|
||||
void ol_rx_mic_error_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
|
||||
struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
ol_rx_mic_error_handler(
|
||||
ol_txrx_pdev_handle pdev,
|
||||
@@ -1023,7 +1013,7 @@ ol_rx_mic_error_handler(
|
||||
}
|
||||
}
|
||||
/* Pktlog */
|
||||
ol_rx_mic_error_send_pktlog_event(pdev, peer, msdu, 1);
|
||||
ol_rx_send_pktlog_event(pdev, peer, msdu, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1477,10 +1467,9 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
uint8_t *rx_ind_data;
|
||||
uint32_t *msg_word;
|
||||
uint32_t msdu_count;
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
uint8_t pktlog_bit;
|
||||
#endif
|
||||
uint32_t filled = 0;
|
||||
|
||||
if (tid >= OL_TXRX_NUM_EXT_TIDS) {
|
||||
ol_txrx_err("%s: invalid tid, %u\n", __FUNCTION__, tid);
|
||||
WARN_ON(1);
|
||||
@@ -1504,10 +1493,7 @@ 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
|
||||
|
||||
rx_ind_data = qdf_nbuf_data(rx_ind_msg);
|
||||
msg_word = (uint32_t *)rx_ind_data;
|
||||
/* Get the total number of MSDUs */
|
||||
@@ -1547,9 +1533,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
qdf_nbuf_set_next(tail_msdu, NULL);
|
||||
|
||||
/* Pktlog */
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
ol_rx_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* if this is an offload indication, peer id is carried in the
|
||||
@@ -1575,6 +1559,7 @@ ol_rx_in_order_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
peer->rx_opt_proc(vdev, peer, tid, head_msdu);
|
||||
}
|
||||
|
||||
#ifndef REMOVE_PKT_LOG
|
||||
/**
|
||||
* ol_rx_pkt_dump_call() - updates status and
|
||||
* calls packetdump callback to log rx packet
|
||||
@@ -1616,6 +1601,7 @@ void ol_rx_pkt_dump_call(
|
||||
if (packetdump_cb)
|
||||
packetdump_cb(msdu, status, peer->vdev->vdev_id, RX_DATA_PKT);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* the msdu_list passed here must be NULL terminated */
|
||||
void
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011, 2014-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -40,8 +40,18 @@ void ol_rx_peer_init(struct ol_txrx_pdev_t *pdev, struct ol_txrx_peer_t *peer);
|
||||
void
|
||||
ol_rx_peer_cleanup(struct ol_txrx_vdev_t *vdev, struct ol_txrx_peer_t *peer);
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
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_txrx_peer_t *peer, qdf_nbuf_t msdu,
|
||||
uint8_t pktlog_bit);
|
||||
#else
|
||||
static inline
|
||||
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)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
|
@@ -289,23 +289,6 @@ void ol_rx_defrag_push_rx_desc(qdf_nbuf_t nbuf,
|
||||
}
|
||||
#endif /* CONFIG_HL_SUPPORT */
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
static inline
|
||||
void ol_rx_frag_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
|
||||
struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit)
|
||||
{
|
||||
ol_rx_send_pktlog_event(pdev, peer, msdu, pktlog_bit);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline
|
||||
void ol_rx_frag_send_pktlog_event(struct ol_txrx_pdev_t *pdev,
|
||||
struct ol_txrx_peer_t *peer, qdf_nbuf_t msdu, uint8_t pktlog_bit)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Process incoming fragments
|
||||
*/
|
||||
@@ -366,7 +349,7 @@ ol_rx_frag_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
seq_num = htt_rx_mpdu_desc_seq_num(htt_pdev, rx_mpdu_desc);
|
||||
OL_RX_ERR_STATISTICS_1(pdev, peer->vdev, peer, rx_mpdu_desc,
|
||||
OL_RX_ERR_NONE_FRAG);
|
||||
ol_rx_frag_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
|
||||
ol_rx_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
|
||||
ol_rx_reorder_store_frag(pdev, peer, tid, seq_num, head_msdu);
|
||||
} else {
|
||||
/* invalid frame - discard it */
|
||||
@@ -375,7 +358,7 @@ ol_rx_frag_indication_handler(ol_txrx_pdev_handle pdev,
|
||||
else
|
||||
htt_rx_mpdu_desc_list_next(htt_pdev, rx_frag_ind_msg);
|
||||
|
||||
ol_rx_frag_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
|
||||
ol_rx_send_pktlog_event(pdev, peer, head_msdu, pktlog_bit);
|
||||
htt_rx_desc_frame_free(htt_pdev, head_msdu);
|
||||
}
|
||||
/* request HTT to provide new rx MSDU buffers for the target to fill. */
|
||||
|
@@ -5872,6 +5872,11 @@ static void ol_txrx_soc_detach(void *soc)
|
||||
*
|
||||
* Return: noe
|
||||
*/
|
||||
#ifdef REMOVE_PKT_LOG
|
||||
static void ol_txrx_pkt_log_con_service(struct cdp_pdev *ppdev, void *scn)
|
||||
{
|
||||
}
|
||||
#else
|
||||
static void ol_txrx_pkt_log_con_service(struct cdp_pdev *ppdev, void *scn)
|
||||
{
|
||||
struct ol_txrx_pdev_t *pdev = (struct ol_txrx_pdev_t *)ppdev;
|
||||
@@ -5879,6 +5884,7 @@ static void ol_txrx_pkt_log_con_service(struct cdp_pdev *ppdev, void *scn)
|
||||
htt_pkt_log_init((struct cdp_pdev *)pdev, scn);
|
||||
pktlog_htc_attach();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* OL wrapper functions for CDP abstraction */
|
||||
/**
|
||||
|
@@ -86,6 +86,7 @@ ol_txrx_hl_tdls_flag_reset(struct cdp_vdev *vdev, bool flag)
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
void *ol_get_pldev(struct cdp_pdev *txrx_pdev);
|
||||
#else
|
||||
static inline
|
||||
void *ol_get_pldev(struct cdp_pdev *txrx_pdev)
|
||||
{
|
||||
return NULL;
|
||||
|
@@ -18,8 +18,6 @@
|
||||
|
||||
#include "ol_txrx_types.h"
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
|
||||
static inline wdi_event_subscribe *wdi_event_next_sub(wdi_event_subscribe *
|
||||
wdi_sub)
|
||||
{
|
||||
@@ -233,5 +231,3 @@ A_STATUS wdi_event_detach(struct ol_txrx_pdev_t *txrx_pdev)
|
||||
txrx_pdev->wdi_event_list = NULL;
|
||||
return A_OK;
|
||||
}
|
||||
|
||||
#endif /* WDI_EVENT_ENABLE */
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <cdp_txrx_handle.h>
|
||||
struct ol_txrx_pdev_t;
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
/**
|
||||
* @brief Subscribe to a specified WDI event.
|
||||
* @details
|
||||
@@ -59,7 +60,6 @@ A_STATUS wdi_event_unsub(struct cdp_pdev *ppdev,
|
||||
void *event_cb_sub,
|
||||
uint32_t event);
|
||||
|
||||
#ifdef WDI_EVENT_ENABLE
|
||||
|
||||
void wdi_event_handler(enum WDI_EVENT event,
|
||||
struct cdp_pdev *txrx_pdev, void *data);
|
||||
@@ -72,14 +72,29 @@ static inline void wdi_event_handler(enum WDI_EVENT event,
|
||||
struct cdp_pdev *txrx_pdev, void *data)
|
||||
{
|
||||
}
|
||||
|
||||
static inline A_STATUS wdi_event_attach(struct ol_txrx_pdev_t *txrx_pdev)
|
||||
{
|
||||
return A_OK;
|
||||
}
|
||||
|
||||
static inline A_STATUS wdi_event_detach(struct ol_txrx_pdev_t *txrx_pdev)
|
||||
{
|
||||
return A_OK;
|
||||
}
|
||||
|
||||
static inline A_STATUS wdi_event_sub(struct cdp_pdev *ppdev, void *event_cb_sub,
|
||||
uint32_t event)
|
||||
{
|
||||
return A_OK;
|
||||
}
|
||||
|
||||
static inline A_STATUS wdi_event_unsub(struct cdp_pdev *ppdev,
|
||||
void *event_cb_sub,
|
||||
uint32_t event)
|
||||
{
|
||||
return A_OK;
|
||||
}
|
||||
#endif /* WDI_EVENT_ENABLE */
|
||||
|
||||
#endif /* _WDI_EVENT_API_H_ */
|
||||
|
Verwijs in nieuw issue
Block a user