Commit 65f4a8e0 authored by Eliad Peller's avatar Eliad Peller Committed by Emmanuel Grumbach

iwlwifi: tracing: add rx cmd header fields

Having explicit rx cmd header fields is useful, as it can
be used for event filtering (e.g. saving only debug logs,
rather than the whole data)
Signed-off-by: default avatarEliad Peller <eliadx.peller@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 7ccc7241
/****************************************************************************** /******************************************************************************
* *
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 Intel Mobile Communications GmbH
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as * under the terms of version 2 of the GNU General Public License as
...@@ -64,19 +65,21 @@ TRACE_EVENT(iwlwifi_dev_hcmd, ...@@ -64,19 +65,21 @@ TRACE_EVENT(iwlwifi_dev_hcmd,
TRACE_EVENT(iwlwifi_dev_rx, TRACE_EVENT(iwlwifi_dev_rx,
TP_PROTO(const struct device *dev, const struct iwl_trans *trans, TP_PROTO(const struct device *dev, const struct iwl_trans *trans,
void *rxbuf, size_t len), struct iwl_rx_packet *pkt, size_t len),
TP_ARGS(dev, trans, rxbuf, len), TP_ARGS(dev, trans, pkt, len),
TP_STRUCT__entry( TP_STRUCT__entry(
DEV_ENTRY DEV_ENTRY
__dynamic_array(u8, rxbuf, iwl_rx_trace_len(trans, rxbuf, len)) __field(u8, cmd)
__dynamic_array(u8, rxbuf, iwl_rx_trace_len(trans, pkt, len))
), ),
TP_fast_assign( TP_fast_assign(
DEV_ASSIGN; DEV_ASSIGN;
memcpy(__get_dynamic_array(rxbuf), rxbuf, __entry->cmd = pkt->hdr.cmd;
iwl_rx_trace_len(trans, rxbuf, len)); memcpy(__get_dynamic_array(rxbuf), pkt,
iwl_rx_trace_len(trans, pkt, len));
), ),
TP_printk("[%s] RX cmd %#.2x", TP_printk("[%s] RX cmd %#.2x",
__get_str(dev), ((u8 *)__get_dynamic_array(rxbuf))[4]) __get_str(dev), __entry->cmd)
); );
TRACE_EVENT(iwlwifi_dev_tx, TRACE_EVENT(iwlwifi_dev_tx,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment