ath11k: add tracing support for pktlog
PATCH 1/1 ath11k: add tracing support for pktlog
Add trace events on htt_pktlog and htt_ppdu_stats
and rx statistics.
Signed-off-by Anilkumar Kolli <[email protected]>
--- drivers/net/wireless/ath/ath11k/Kconfig | 6 ++ drivers/net/wireless/ath/ath11k/Makefile | 4 ++ drivers/net/wireless/ath/ath11k/debug.h | 1 + drivers/net/wireless/ath/ath11k/dp_rx.c | 11 ++-- drivers/net/wireless/ath/ath11k/trace.c | 9 +++ drivers/net/wireless/ath/ath11k/trace.h | 110 +++++++++++++++++++++++++++++++ 6 files changed, 135 insertions(+), 6 deletions(-) create mode 100644 drivers/net/wireless/ath/ath11k/trace.c create mode 100644 drivers/net/wireless/ath/ath11k/trace.h
drivers/net/wireless/ath/ath11k/Kconfig +6 -0
@@ -26,3 +26,9 @@ config ATH11K_DEBUGFS Enable ath11k debugfs support If unsure, say Y to make it easier to debug problems. + +config ATH11K_TRACING + bool "ath11k tracing support" + depends on ATH11K && EVENT_TRACING + ---help--- + Select this to ath11k use tracing infrastructure.
drivers/net/wireless/ath/ath11k/Makefile +4 -0
@@ -19,3 +19,7 @@ ath11k-y += core.o \ ath11k-$(CONFIG_ATH11K_DEBUGFS) += debug_htt_stats.o ath11k-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o ath11k-$(CONFIG_NL80211_TESTMODE) += testmode.o +ath11k-$(CONFIG_ATH11K_TRACING) += trace.o + +# for tracing framework to find trace.h +CFLAGS_trace.o := -I$(src)
drivers/net/wireless/ath/ath11k/debug.h +1 -0
@@ -7,6 +7,7 @@#define _ATH11K_DEBUG_H_#include "hal_tx.h" +#include "trace.h" enum ath11k_debug_mask {ATH11K_DBG_AHB =0x00000001 ,
drivers/net/wireless/ath/ath11k/dp_rx.c +5 -6
@@ -989,7 +989,7 @@ static int ath11k_htt_pull_ppdu_stats(struct ath11k_base *ab, ar = ab->pdevs[pdev_id].ar;if (ath11k_debug_is_pktlog_lite_mode_enabled (ar)) { -/* TODO update the pktlog tracing */ +trace_ath11k_htt_ppdu_stats (ar, skb->data, len); }/* TLV info starts after 16bytes of header */
@@ -1014,10 +1014,9 @@ static int ath11k_htt_pull_ppdu_stats(struct ath11k_base *ab,static void ath11k_htt_pktlog (struct ath11k_base *ab,struct sk_buff *skb) { -u32 *data = (u32 *)skb->data; +u32 *data = (u32 *)skb->data, len;struct ath11k *ar;u8 pdev_id; -u32 len; len =FIELD_GET (HTT_T2H_PPDU_STATS_PAYLOAD_SIZE_M , *data); pdev_id =FIELD_GET (HTT_T2H_PPDU_STATS_PDEV_ID_M , *data);
@@ -1025,7 +1024,7 @@ static void ath11k_htt_pktlog(struct ath11k_base *ab, ar = ab->pdevs[pdev_id].ar; ++data; -/* TODO add pktlog tracing */ +trace_ath11k_htt_pktlog (ar, data, len); } void ath11k_dp_htt_htc_t2h_msg_handler(struct ath11k_base *ab,
@@ -2301,7 +2300,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, ppdu_info.peer_id =HAL_INVALID_PEERID ;if (ath11k_debug_is_pktlog_rx_stats_enabled (ar)) { -/* TODO update the pktlog tracing */ +trace_ath11k_htt_rxdesc (ar, skb->data,DP_RX_BUFFER_SIZE ); } hal_status = ath11k_hal_rx_parse_mon_status(ab, &ppdu_info,
@@ -2330,7 +2329,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,ath11k_dp_rx_update_peer_stats (arsta, &ppdu_info);if (ath11k_debug_is_pktlog_peer_vaild (ar, peer->addr)) { -/* TODO update the pktlog tracing for one peer*/ +trace_ath11k_htt_rxdesc (ar, skb->data,DP_RX_BUFFER_SIZE ); }spin_unlock_bh (&ab->data_lock);rcu_read_unlock ();
drivers/net/wireless/ath/ath11k/trace.c new file +9 -0
@@ -0,0 +1,9 @@ +// SPDX-License-Identifier: ISC +/* +* Copyright (c) 2019 The Linux Foundation. All rights reserved. +*/ + +#include <linux/module.h> + +#define CREATE_TRACE_POINTS +#include "trace.h"
drivers/net/wireless/ath/ath11k/trace.h new file +110 -0
110 lines not on this page · raw message
Signature · 7 lines
1.9.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 4 lines · Anilkumar Kolli
Add trace events on
htt_pktlogandhtt_ppdu_stats
and rx statistics.Signed-off-by Anilkumar Kolli <[email protected]>
Patch applied to ath.git, thanks.
71fddee85686 ath11k: add tracing support for pktlog
Signature · 9 lines
https://patchwork.kernel.org/patch/10931203/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k