iwlwifi: simplify data tracepoint

There's no need to calculate the data_len outside of the tracepoint,
since it's always skb->len - hdr_len, which are both available inside.
Simplify the callers and move the calculation in.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Johannes Berg
2017-05-03 12:53:22 +02:00
committed by Luca Coelho
parent 550aba9b8d
commit 78c1acf35f
3 changed files with 8 additions and 9 deletions

View File

@@ -35,19 +35,20 @@
TRACE_EVENT(iwlwifi_dev_tx_data,
TP_PROTO(const struct device *dev,
struct sk_buff *skb,
u8 hdr_len, size_t data_len),
TP_ARGS(dev, skb, hdr_len, data_len),
struct sk_buff *skb, u8 hdr_len),
TP_ARGS(dev, skb, hdr_len),
TP_STRUCT__entry(
DEV_ENTRY
__dynamic_array(u8, data, iwl_trace_data(skb) ? data_len : 0)
__dynamic_array(u8, data,
iwl_trace_data(skb) ? skb->len - hdr_len : 0)
),
TP_fast_assign(
DEV_ASSIGN;
if (iwl_trace_data(skb))
skb_copy_bits(skb, hdr_len,
__get_dynamic_array(data), data_len);
__get_dynamic_array(data),
skb->len - hdr_len);
),
TP_printk("[%s] TX frame data", __get_str(dev))
);