mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 22:17:10 +07:00
ath10k: add tracing for ath10k_htt_pktlog
This is useful for collecting pktlog statistics of tx, rx and rate information, so add tracing for the API call. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
90174455ae
commit
bfdd7937ab
@ -69,7 +69,6 @@ struct ath10k_fw_crash_data *
|
||||
ath10k_debug_get_new_fw_crash_data(struct ath10k *ar);
|
||||
|
||||
void ath10k_debug_dbglog_add(struct ath10k *ar, u8 *buffer, int len);
|
||||
|
||||
#define ATH10K_DFS_STAT_INC(ar, c) (ar->debug.dfs_stats.c++)
|
||||
|
||||
void ath10k_debug_get_et_strings(struct ieee80211_hw *hw,
|
||||
|
@ -725,7 +725,7 @@ static inline u8 *htt_rx_test_get_chars(struct htt_rx_test *rx_test)
|
||||
*/
|
||||
struct htt_pktlog_msg {
|
||||
u8 pad[3];
|
||||
__le32 payload[1 /* or more */];
|
||||
u8 payload[0];
|
||||
} __packed;
|
||||
|
||||
struct htt_dbg_stats_rx_reorder_stats {
|
||||
|
@ -1674,6 +1674,15 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb)
|
||||
case HTT_T2H_MSG_TYPE_RX_DELBA:
|
||||
ath10k_htt_rx_delba(ar, resp);
|
||||
break;
|
||||
case HTT_T2H_MSG_TYPE_PKTLOG: {
|
||||
struct ath10k_pktlog_hdr *hdr =
|
||||
(struct ath10k_pktlog_hdr *)resp->pktlog_msg.payload;
|
||||
|
||||
trace_ath10k_htt_pktlog(ar, resp->pktlog_msg.payload,
|
||||
sizeof(*hdr) +
|
||||
__le16_to_cpu(hdr->size));
|
||||
break;
|
||||
}
|
||||
case HTT_T2H_MSG_TYPE_RX_FLUSH: {
|
||||
/* Ignore this event because mac80211 takes care of Rx
|
||||
* aggregation reordering.
|
||||
|
@ -80,6 +80,15 @@ enum ath10k_mcast2ucast_mode {
|
||||
ATH10K_MCAST2UCAST_ENABLED = 1,
|
||||
};
|
||||
|
||||
struct ath10k_pktlog_hdr {
|
||||
__le16 flags;
|
||||
__le16 missed_cnt;
|
||||
__le16 log_type;
|
||||
__le16 size;
|
||||
__le32 timestamp;
|
||||
u8 payload[0];
|
||||
} __packed;
|
||||
|
||||
/* Target specific defines for MAIN firmware */
|
||||
#define TARGET_NUM_VDEVS 8
|
||||
#define TARGET_NUM_PEER_AST 2
|
||||
|
@ -254,6 +254,33 @@ TRACE_EVENT(ath10k_wmi_dbglog,
|
||||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(ath10k_htt_pktlog,
|
||||
TP_PROTO(struct ath10k *ar, void *buf, u16 buf_len),
|
||||
|
||||
TP_ARGS(ar, buf, buf_len),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device, dev_name(ar->dev))
|
||||
__string(driver, dev_driver_string(ar->dev))
|
||||
__field(u16, buf_len)
|
||||
__dynamic_array(u8, pktlog, buf_len)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(device, dev_name(ar->dev));
|
||||
__assign_str(driver, dev_driver_string(ar->dev));
|
||||
__entry->buf_len = buf_len;
|
||||
memcpy(__get_dynamic_array(pktlog), buf, buf_len);
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"%s %s size %hu",
|
||||
__get_str(driver),
|
||||
__get_str(device),
|
||||
__entry->buf_len
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_H_ || TRACE_HEADER_MULTI_READ*/
|
||||
|
||||
/* we don't want to use include/trace/events */
|
||||
|
Loading…
Reference in New Issue
Block a user