Commit 9d42be9b authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: simplify TX tracing

There's no need to calculate again whether data should
be included or be handled externally, just check if any
space for it was already reserved.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240512152312.a3d3b4796460.I85bd3029baee24ebf0be04db7d6bf01834090869@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent bdaae563
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2015 Intel Deutschland GmbH * Copyright(c) 2015 Intel Deutschland GmbH
* Copyright(c) 2018 - 2019, 2023 Intel Corporation * Copyright(c) 2018 - 2019, 2023-2024 Intel Corporation
*****************************************************************************/ *****************************************************************************/
#if !defined(__IWLWIFI_DEVICE_TRACE_DATA) || defined(TRACE_HEADER_MULTI_READ) #if !defined(__IWLWIFI_DEVICE_TRACE_DATA) || defined(TRACE_HEADER_MULTI_READ)
...@@ -28,7 +28,7 @@ TRACE_EVENT(iwlwifi_dev_tx_tb, ...@@ -28,7 +28,7 @@ TRACE_EVENT(iwlwifi_dev_tx_tb,
TP_fast_assign( TP_fast_assign(
DEV_ASSIGN; DEV_ASSIGN;
__entry->phys = phys; __entry->phys = phys;
if (iwl_trace_data(skb)) if (__get_dynamic_array_len(data))
memcpy(__get_dynamic_array(data), data_src, data_len); memcpy(__get_dynamic_array(data), data_src, data_len);
), ),
TP_printk("[%s] TX frame data", __get_str(dev)) TP_printk("[%s] TX frame data", __get_str(dev))
......
...@@ -99,7 +99,7 @@ TRACE_EVENT(iwlwifi_dev_tx, ...@@ -99,7 +99,7 @@ TRACE_EVENT(iwlwifi_dev_tx,
__entry->framelen += skb->len - hdr_len; __entry->framelen += skb->len - hdr_len;
memcpy(__get_dynamic_array(tfd), tfd, tfdlen); memcpy(__get_dynamic_array(tfd), tfd, tfdlen);
memcpy(__get_dynamic_array(buf0), buf0, buf0_len); memcpy(__get_dynamic_array(buf0), buf0, buf0_len);
if (hdr_len > 0 && !iwl_trace_data(skb)) if (__get_dynamic_array_len(buf1))
skb_copy_bits(skb, hdr_len, skb_copy_bits(skb, hdr_len,
__get_dynamic_array(buf1), __get_dynamic_array(buf1),
skb->len - hdr_len); skb->len - hdr_len);
......
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