diff options
| author | Johannes Berg <[email protected]> | 2023-12-07 02:50:09 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2023-12-12 09:36:59 +0000 |
| commit | 1261fefa647fc1a57621b0f12cef9c08e819a5dc (patch) | |
| tree | f3cf8f9c4b612f3a71915fa25988a12195ab2132 /drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c | |
| parent | wifi: iwlwifi: don't support triggered EHT CQI feedback (diff) | |
| download | kernel-1261fefa647fc1a57621b0f12cef9c08e819a5dc.tar.gz kernel-1261fefa647fc1a57621b0f12cef9c08e819a5dc.zip | |
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 <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20231207044813.13325a4848d2.Ic9e7d794fc4aebfe5ac5136b539ee62789f210f3@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c index e46639b097f4..7e686297963d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. - * Copyright (C) 2018 Intel Corporation + * Copyright (C) 2018, 2023 Intel Corporation *****************************************************************************/ #include <linux/module.h> @@ -20,4 +20,17 @@ EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_event); EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_cont_event); EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_wrap_event); -#endif +#else +#include "iwl-devtrace.h" +#endif /* __CHECKER__ */ + +void __trace_iwlwifi_dev_rx(struct iwl_trans *trans, void *pkt, size_t len) +{ + size_t hdr_offset = 0, trace_len; + + trace_len = iwl_rx_trace_len(trans, pkt, len, &hdr_offset); + trace_iwlwifi_dev_rx(trans->dev, pkt, len, trace_len, hdr_offset); + + if (trace_len < len) + trace_iwlwifi_dev_rx_data(trans->dev, pkt, len, trace_len); +} |
