diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-12-07 04:50:09 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-12-12 10:36:59 +0100 |
commit | 1261fefa647fc1a57621b0f12cef9c08e819a5dc (patch) | |
tree | f3cf8f9c4b612f3a71915fa25988a12195ab2132 /drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h | |
parent | 637bbd5b3cbd0fc6945ebd2e311315b6cca1f9c5 (diff) |
wifi: iwlwifi: refactor RX tracing
When there's not going to be any data in the data event, we
don't need to add it at all (unlike the TX version, it has
no data at all.)
Also combine the tracing into a separate inline so we only
call iwl_rx_trace_len() once, which also simplifies things,
and lets us have a single place to later add other checks.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20231207044813.13325a4848d2.Ic9e7d794fc4aebfe5ac5136b539ee62789f210f3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h index 347fd95c4e3a..2c280a2fe3df 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace-data.h @@ -3,7 +3,7 @@ * * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2015 Intel Deutschland GmbH - * Copyright(c) 2018 - 2019 Intel Corporation + * Copyright(c) 2018 - 2019, 2023 Intel Corporation *****************************************************************************/ #if !defined(__IWLWIFI_DEVICE_TRACE_DATA) || defined(TRACE_HEADER_MULTI_READ) @@ -36,20 +36,17 @@ TRACE_EVENT(iwlwifi_dev_tx_tb, TRACE_EVENT(iwlwifi_dev_rx_data, TP_PROTO(const struct device *dev, - const struct iwl_trans *trans, - void *rxbuf, size_t len), - TP_ARGS(dev, trans, rxbuf, len), + void *rxbuf, size_t len, size_t start), + TP_ARGS(dev, rxbuf, len, start), TP_STRUCT__entry( DEV_ENTRY - __dynamic_array(u8, data, - len - iwl_rx_trace_len(trans, rxbuf, len, NULL)) + __dynamic_array(u8, data, len - start) ), TP_fast_assign( - size_t offs = iwl_rx_trace_len(trans, rxbuf, len, NULL); DEV_ASSIGN; - if (offs < len) + if (start < len) memcpy(__get_dynamic_array(data), - ((u8 *)rxbuf) + offs, len - offs); + ((u8 *)rxbuf) + start, len - start); ), TP_printk("[%s] RX frame data", __get_str(dev)) ); |