diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-03-18 07:42:20 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-03-18 07:42:20 -0400 |
commit | e60c81543fd4edabe5b6fd2ea68d2db6f6204177 (patch) | |
tree | f6c0e30b115e32ebd3d2e805423c62a31345c8f3 /drivers/net | |
parent | 416cf0b49e67254676b4762d1bab88df5130f909 (diff) |
ath6kl: add tracing points for sdio transfers
Add tracing points for sdio transfers, just dump the address, flags and the
buffer.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/sdio.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/trace.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/trace.h | 90 |
3 files changed, 105 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 0bd8ff69461a..fb141454c6d2 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "target.h" | 28 | #include "target.h" |
29 | #include "debug.h" | 29 | #include "debug.h" |
30 | #include "cfg80211.h" | 30 | #include "cfg80211.h" |
31 | #include "trace.h" | ||
31 | 32 | ||
32 | struct ath6kl_sdio { | 33 | struct ath6kl_sdio { |
33 | struct sdio_func *func; | 34 | struct sdio_func *func; |
@@ -179,6 +180,8 @@ static int ath6kl_sdio_io(struct sdio_func *func, u32 request, u32 addr, | |||
179 | request & HIF_FIXED_ADDRESS ? " (fixed)" : "", buf, len); | 180 | request & HIF_FIXED_ADDRESS ? " (fixed)" : "", buf, len); |
180 | ath6kl_dbg_dump(ATH6KL_DBG_SDIO_DUMP, NULL, "sdio ", buf, len); | 181 | ath6kl_dbg_dump(ATH6KL_DBG_SDIO_DUMP, NULL, "sdio ", buf, len); |
181 | 182 | ||
183 | trace_ath6kl_sdio(addr, request, buf, len); | ||
184 | |||
182 | return ret; | 185 | return ret; |
183 | } | 186 | } |
184 | 187 | ||
@@ -309,6 +312,13 @@ static int ath6kl_sdio_scat_rw(struct ath6kl_sdio *ar_sdio, | |||
309 | sdio_claim_host(ar_sdio->func); | 312 | sdio_claim_host(ar_sdio->func); |
310 | 313 | ||
311 | mmc_set_data_timeout(&data, ar_sdio->func->card); | 314 | mmc_set_data_timeout(&data, ar_sdio->func->card); |
315 | |||
316 | trace_ath6kl_sdio_scat(scat_req->addr, | ||
317 | scat_req->req, | ||
318 | scat_req->len, | ||
319 | scat_req->scat_entries, | ||
320 | scat_req->scat_list); | ||
321 | |||
312 | /* synchronous call to process request */ | 322 | /* synchronous call to process request */ |
313 | mmc_wait_for_req(ar_sdio->func->card->host, &mmc_req); | 323 | mmc_wait_for_req(ar_sdio->func->card->host, &mmc_req); |
314 | 324 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/trace.c b/drivers/net/wireless/ath/ath6kl/trace.c index 4118a29500c1..e7d64b1285cb 100644 --- a/drivers/net/wireless/ath/ath6kl/trace.c +++ b/drivers/net/wireless/ath/ath6kl/trace.c | |||
@@ -14,5 +14,10 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/module.h> | ||
18 | |||
17 | #define CREATE_TRACE_POINTS | 19 | #define CREATE_TRACE_POINTS |
18 | #include "trace.h" | 20 | #include "trace.h" |
21 | |||
22 | EXPORT_TRACEPOINT_SYMBOL(ath6kl_sdio); | ||
23 | EXPORT_TRACEPOINT_SYMBOL(ath6kl_sdio_scat); | ||
diff --git a/drivers/net/wireless/ath/ath6kl/trace.h b/drivers/net/wireless/ath/ath6kl/trace.h index 07876190ce05..9db616c2ac96 100644 --- a/drivers/net/wireless/ath/ath6kl/trace.h +++ b/drivers/net/wireless/ath/ath6kl/trace.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/skbuff.h> | 4 | #include <linux/skbuff.h> |
5 | #include <linux/tracepoint.h> | 5 | #include <linux/tracepoint.h> |
6 | #include "wmi.h" | 6 | #include "wmi.h" |
7 | #include "hif.h" | ||
7 | 8 | ||
8 | #if !defined(_ATH6KL_TRACE_H) | 9 | #if !defined(_ATH6KL_TRACE_H) |
9 | static inline unsigned int ath6kl_get_wmi_id(void *buf, size_t buf_len) | 10 | static inline unsigned int ath6kl_get_wmi_id(void *buf, size_t buf_len) |
@@ -75,6 +76,95 @@ TRACE_EVENT(ath6kl_wmi_event, | |||
75 | ) | 76 | ) |
76 | ); | 77 | ); |
77 | 78 | ||
79 | TRACE_EVENT(ath6kl_sdio, | ||
80 | TP_PROTO(unsigned int addr, int flags, | ||
81 | void *buf, size_t buf_len), | ||
82 | |||
83 | TP_ARGS(addr, flags, buf, buf_len), | ||
84 | |||
85 | TP_STRUCT__entry( | ||
86 | __field(unsigned int, tx) | ||
87 | __field(unsigned int, addr) | ||
88 | __field(int, flags) | ||
89 | __field(size_t, buf_len) | ||
90 | __dynamic_array(u8, buf, buf_len) | ||
91 | ), | ||
92 | |||
93 | TP_fast_assign( | ||
94 | __entry->addr = addr; | ||
95 | __entry->flags = flags; | ||
96 | __entry->buf_len = buf_len; | ||
97 | memcpy(__get_dynamic_array(buf), buf, buf_len); | ||
98 | |||
99 | if (flags & HIF_WRITE) | ||
100 | __entry->tx = 1; | ||
101 | else | ||
102 | __entry->tx = 0; | ||
103 | ), | ||
104 | |||
105 | TP_printk( | ||
106 | "%s addr 0x%x flags 0x%x len %d\n", | ||
107 | __entry->tx ? "tx" : "rx", | ||
108 | __entry->addr, | ||
109 | __entry->flags, | ||
110 | __entry->buf_len | ||
111 | ) | ||
112 | ); | ||
113 | |||
114 | TRACE_EVENT(ath6kl_sdio_scat, | ||
115 | TP_PROTO(unsigned int addr, int flags, unsigned int total_len, | ||
116 | unsigned int entries, struct hif_scatter_item *list), | ||
117 | |||
118 | TP_ARGS(addr, flags, total_len, entries, list), | ||
119 | |||
120 | TP_STRUCT__entry( | ||
121 | __field(unsigned int, tx) | ||
122 | __field(unsigned int, addr) | ||
123 | __field(int, flags) | ||
124 | __field(unsigned int, entries) | ||
125 | __field(size_t, total_len) | ||
126 | __dynamic_array(unsigned int, len_array, entries) | ||
127 | __dynamic_array(u8, data, total_len) | ||
128 | ), | ||
129 | |||
130 | TP_fast_assign( | ||
131 | unsigned int *len_array; | ||
132 | int i, offset = 0; | ||
133 | size_t len; | ||
134 | |||
135 | __entry->addr = addr; | ||
136 | __entry->flags = flags; | ||
137 | __entry->entries = entries; | ||
138 | __entry->total_len = total_len; | ||
139 | |||
140 | if (flags & HIF_WRITE) | ||
141 | __entry->tx = 1; | ||
142 | else | ||
143 | __entry->tx = 0; | ||
144 | |||
145 | len_array = __get_dynamic_array(len_array); | ||
146 | |||
147 | for (i = 0; i < entries; i++) { | ||
148 | len = list[i].len; | ||
149 | |||
150 | memcpy((u8 *) __get_dynamic_array(data) + offset, | ||
151 | list[i].buf, len); | ||
152 | |||
153 | len_array[i] = len; | ||
154 | offset += len; | ||
155 | } | ||
156 | ), | ||
157 | |||
158 | TP_printk( | ||
159 | "%s addr 0x%x flags 0x%x entries %d total_len %d\n", | ||
160 | __entry->tx ? "tx" : "rx", | ||
161 | __entry->addr, | ||
162 | __entry->flags, | ||
163 | __entry->entries, | ||
164 | __entry->total_len | ||
165 | ) | ||
166 | ); | ||
167 | |||
78 | #endif /* _ ATH6KL_TRACE_H || TRACE_HEADER_MULTI_READ*/ | 168 | #endif /* _ ATH6KL_TRACE_H || TRACE_HEADER_MULTI_READ*/ |
79 | 169 | ||
80 | /* we don't want to use include/trace/events */ | 170 | /* we don't want to use include/trace/events */ |