.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: ISC */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2018 Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> |
---|
3 | | - * |
---|
4 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
5 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
6 | | - * copyright notice and this permission notice appear in all copies. |
---|
7 | | - * |
---|
8 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
9 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
10 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
11 | | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
12 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
13 | | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
14 | | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
15 | 4 | */ |
---|
16 | 5 | |
---|
17 | 6 | #if !defined(__MT76_USB_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) |
---|
.. | .. |
---|
24 | 13 | #define TRACE_SYSTEM mt76_usb |
---|
25 | 14 | |
---|
26 | 15 | #define MAXNAME 32 |
---|
27 | | -#define DEV_ENTRY __array(char, wiphy_name, 32) |
---|
28 | | -#define DEV_ASSIGN strlcpy(__entry->wiphy_name, wiphy_name(dev->hw->wiphy), MAXNAME) |
---|
29 | | -#define DEV_PR_FMT "%s" |
---|
30 | | -#define DEV_PR_ARG __entry->wiphy_name |
---|
| 16 | +#define DEV_ENTRY __array(char, wiphy_name, 32) |
---|
| 17 | +#define DEV_ASSIGN strlcpy(__entry->wiphy_name, \ |
---|
| 18 | + wiphy_name(dev->hw->wiphy), MAXNAME) |
---|
| 19 | +#define DEV_PR_FMT "%s " |
---|
| 20 | +#define DEV_PR_ARG __entry->wiphy_name |
---|
31 | 21 | |
---|
32 | 22 | #define REG_ENTRY __field(u32, reg) __field(u32, val) |
---|
33 | 23 | #define REG_ASSIGN __entry->reg = reg; __entry->val = val |
---|
34 | | -#define REG_PR_FMT " %04x=%08x" |
---|
| 24 | +#define REG_PR_FMT "reg:0x%04x=0x%08x" |
---|
35 | 25 | #define REG_PR_ARG __entry->reg, __entry->val |
---|
36 | 26 | |
---|
37 | 27 | DECLARE_EVENT_CLASS(dev_reg_evt, |
---|
.. | .. |
---|
61 | 51 | TP_ARGS(dev, reg, val) |
---|
62 | 52 | ); |
---|
63 | 53 | |
---|
| 54 | +DECLARE_EVENT_CLASS(urb_transfer, |
---|
| 55 | + TP_PROTO(struct mt76_dev *dev, struct urb *u), |
---|
| 56 | + TP_ARGS(dev, u), |
---|
| 57 | + TP_STRUCT__entry( |
---|
| 58 | + DEV_ENTRY __field(unsigned int, pipe) __field(u32, len) |
---|
| 59 | + ), |
---|
| 60 | + TP_fast_assign( |
---|
| 61 | + DEV_ASSIGN; |
---|
| 62 | + __entry->pipe = u->pipe; |
---|
| 63 | + __entry->len = u->transfer_buffer_length; |
---|
| 64 | + ), |
---|
| 65 | + TP_printk(DEV_PR_FMT "p:%08x len:%u", |
---|
| 66 | + DEV_PR_ARG, __entry->pipe, __entry->len) |
---|
| 67 | +); |
---|
| 68 | + |
---|
| 69 | +DEFINE_EVENT(urb_transfer, submit_urb, |
---|
| 70 | + TP_PROTO(struct mt76_dev *dev, struct urb *u), |
---|
| 71 | + TP_ARGS(dev, u) |
---|
| 72 | +); |
---|
| 73 | + |
---|
| 74 | +DEFINE_EVENT(urb_transfer, rx_urb, |
---|
| 75 | + TP_PROTO(struct mt76_dev *dev, struct urb *u), |
---|
| 76 | + TP_ARGS(dev, u) |
---|
| 77 | +); |
---|
| 78 | + |
---|
64 | 79 | #endif |
---|
65 | 80 | |
---|
66 | 81 | #undef TRACE_INCLUDE_PATH |
---|