| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /****************************************************************************** |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved. |
|---|
| 4 | 5 | * Copyright(c) 2015 Intel Mobile Communications GmbH |
|---|
| 5 | 6 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 8 | | - * under the terms of version 2 of the GNU General Public License as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 12 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 13 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 14 | | - * more details. |
|---|
| 15 | | - * |
|---|
| 16 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 17 | | - * this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 18 | | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA |
|---|
| 19 | | - * |
|---|
| 20 | | - * The full GNU General Public License is included in this distribution in the |
|---|
| 21 | | - * file called LICENSE. |
|---|
| 7 | + * Copyright(c) 2018 Intel Corporation |
|---|
| 22 | 8 | * |
|---|
| 23 | 9 | * Contact Information: |
|---|
| 24 | 10 | * Intel Linux Wireless <linuxwifi@intel.com> |
|---|
| .. | .. |
|---|
| 75 | 61 | TP_STRUCT__entry( |
|---|
| 76 | 62 | DEV_ENTRY |
|---|
| 77 | 63 | __field(u16, cmd) |
|---|
| 78 | | - __dynamic_array(u8, rxbuf, iwl_rx_trace_len(trans, pkt, len)) |
|---|
| 64 | + __field(u8, hdr_offset) |
|---|
| 65 | + __dynamic_array(u8, rxbuf, |
|---|
| 66 | + iwl_rx_trace_len(trans, pkt, len, NULL)) |
|---|
| 79 | 67 | ), |
|---|
| 80 | 68 | TP_fast_assign( |
|---|
| 69 | + size_t hdr_offset = 0; |
|---|
| 70 | + |
|---|
| 81 | 71 | DEV_ASSIGN; |
|---|
| 82 | 72 | __entry->cmd = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd); |
|---|
| 83 | 73 | memcpy(__get_dynamic_array(rxbuf), pkt, |
|---|
| 84 | | - iwl_rx_trace_len(trans, pkt, len)); |
|---|
| 74 | + iwl_rx_trace_len(trans, pkt, len, &hdr_offset)); |
|---|
| 75 | + __entry->hdr_offset = hdr_offset; |
|---|
| 85 | 76 | ), |
|---|
| 86 | 77 | TP_printk("[%s] RX cmd %#.2x", |
|---|
| 87 | 78 | __get_str(dev), __entry->cmd) |
|---|
| .. | .. |
|---|
| 124 | 115 | TP_printk("[%s] TX %.2x (%zu bytes) skbaddr=%p", |
|---|
| 125 | 116 | __get_str(dev), ((u8 *)__get_dynamic_array(buf0))[0], |
|---|
| 126 | 117 | __entry->framelen, __entry->skbaddr) |
|---|
| 127 | | -); |
|---|
| 128 | | - |
|---|
| 129 | | -struct iwl_error_event_table; |
|---|
| 130 | | -TRACE_EVENT(iwlwifi_dev_ucode_error, |
|---|
| 131 | | - TP_PROTO(const struct device *dev, const struct iwl_error_event_table *table, |
|---|
| 132 | | - u32 hw_ver, u32 brd_ver), |
|---|
| 133 | | - TP_ARGS(dev, table, hw_ver, brd_ver), |
|---|
| 134 | | - TP_STRUCT__entry( |
|---|
| 135 | | - DEV_ENTRY |
|---|
| 136 | | - __field(u32, desc) |
|---|
| 137 | | - __field(u32, tsf_low) |
|---|
| 138 | | - __field(u32, data1) |
|---|
| 139 | | - __field(u32, data2) |
|---|
| 140 | | - __field(u32, line) |
|---|
| 141 | | - __field(u32, blink2) |
|---|
| 142 | | - __field(u32, ilink1) |
|---|
| 143 | | - __field(u32, ilink2) |
|---|
| 144 | | - __field(u32, bcon_time) |
|---|
| 145 | | - __field(u32, gp1) |
|---|
| 146 | | - __field(u32, gp2) |
|---|
| 147 | | - __field(u32, rev_type) |
|---|
| 148 | | - __field(u32, major) |
|---|
| 149 | | - __field(u32, minor) |
|---|
| 150 | | - __field(u32, hw_ver) |
|---|
| 151 | | - __field(u32, brd_ver) |
|---|
| 152 | | - ), |
|---|
| 153 | | - TP_fast_assign( |
|---|
| 154 | | - DEV_ASSIGN; |
|---|
| 155 | | - __entry->desc = table->error_id; |
|---|
| 156 | | - __entry->tsf_low = table->tsf_low; |
|---|
| 157 | | - __entry->data1 = table->data1; |
|---|
| 158 | | - __entry->data2 = table->data2; |
|---|
| 159 | | - __entry->line = table->line; |
|---|
| 160 | | - __entry->blink2 = table->blink2; |
|---|
| 161 | | - __entry->ilink1 = table->ilink1; |
|---|
| 162 | | - __entry->ilink2 = table->ilink2; |
|---|
| 163 | | - __entry->bcon_time = table->bcon_time; |
|---|
| 164 | | - __entry->gp1 = table->gp1; |
|---|
| 165 | | - __entry->gp2 = table->gp2; |
|---|
| 166 | | - __entry->rev_type = table->gp3; |
|---|
| 167 | | - __entry->major = table->ucode_ver; |
|---|
| 168 | | - __entry->minor = table->hw_ver; |
|---|
| 169 | | - __entry->hw_ver = hw_ver; |
|---|
| 170 | | - __entry->brd_ver = brd_ver; |
|---|
| 171 | | - ), |
|---|
| 172 | | - TP_printk("[%s] #%02d %010u data 0x%08X 0x%08X line %u, " |
|---|
| 173 | | - "blink2 0x%05X ilink 0x%05X 0x%05X " |
|---|
| 174 | | - "bcon_tm %010u gp 0x%08X 0x%08X rev_type 0x%08X major 0x%08X " |
|---|
| 175 | | - "minor 0x%08X hw 0x%08X brd 0x%08X", |
|---|
| 176 | | - __get_str(dev), __entry->desc, __entry->tsf_low, |
|---|
| 177 | | - __entry->data1, __entry->data2, __entry->line, |
|---|
| 178 | | - __entry->blink2, __entry->ilink1, __entry->ilink2, |
|---|
| 179 | | - __entry->bcon_time, __entry->gp1, __entry->gp2, |
|---|
| 180 | | - __entry->rev_type, __entry->major, __entry->minor, |
|---|
| 181 | | - __entry->hw_ver, __entry->brd_ver) |
|---|
| 182 | 118 | ); |
|---|
| 183 | 119 | |
|---|
| 184 | 120 | TRACE_EVENT(iwlwifi_dev_ucode_event, |
|---|