8573ac7c0b5e4de952eab3f4164e05be2dea695e
[GitHub/exynos8895/android_kernel_samsung_universal8895.git] / drivers / net / wireless / bcmdhd4361 / include / event_log_tag.h
1 /*
2 * EVENT_LOG system definitions
3 *
4 * Copyright (C) 1999-2019, Broadcom.
5 *
6 * Unless you and Broadcom execute a separate written software license
7 * agreement governing use of this software, this software is licensed to you
8 * under the terms of the GNU General Public License version 2 (the "GPL"),
9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10 * following added to such license:
11 *
12 * As a special exception, the copyright holders of this software give you
13 * permission to link this software with independent modules, and to copy and
14 * distribute the resulting executable under terms of your choice, provided that
15 * you also meet, for each linked independent module, the terms and conditions of
16 * the license of that module. An independent module is a module which is not
17 * derived from this software. The special exception does not apply to any
18 * modifications of the software.
19 *
20 * Notwithstanding the above, under no circumstances may you combine this
21 * software in any way with any other Broadcom software provided under a license
22 * other than the GPL, without Broadcom's express prior written consent.
23 *
24 *
25 * <<Broadcom-WL-IPTag/Open:>>
26 *
27 * $Id: event_log_tag.h 759112 2018-04-24 01:34:08Z $
28 */
29
30 #ifndef _EVENT_LOG_TAG_H_
31 #define _EVENT_LOG_TAG_H_
32
33 #include <typedefs.h>
34
35 /* Define new event log tags here */
36 #define EVENT_LOG_TAG_NULL 0 /* Special null tag */
37 #define EVENT_LOG_TAG_TS 1 /* Special timestamp tag */
38
39 /* HSIC Legacy support */
40 /* Possible candidates for reuse */
41 #define EVENT_LOG_TAG_BUS_OOB 2
42 #define EVENT_LOG_TAG_BUS_STATE 3
43 #define EVENT_LOG_TAG_BUS_PROTO 4
44 #define EVENT_LOG_TAG_BUS_CTL 5
45 #define EVENT_LOG_TAG_BUS_EVENT 6
46 #define EVENT_LOG_TAG_BUS_PKT 7
47 #define EVENT_LOG_TAG_BUS_FRAME 8
48 #define EVENT_LOG_TAG_BUS_DESC 9
49 #define EVENT_LOG_TAG_BUS_SETUP 10
50 #define EVENT_LOG_TAG_BUS_MISC 11
51
52 #define EVENT_LOG_TAG_SRSCAN 22
53 #define EVENT_LOG_TAG_PWRSTATS_INFO 23
54
55 /* Possible candidates for reuse */
56 #define EVENT_LOG_TAG_UCODE_WATCHDOG 26
57 #define EVENT_LOG_TAG_UCODE_FIFO 27
58
59 #define EVENT_LOG_TAG_SCAN_TRACE_LOW 28
60 #define EVENT_LOG_TAG_SCAN_TRACE_HIGH 29
61 #define EVENT_LOG_TAG_SCAN_ERROR 30
62 #define EVENT_LOG_TAG_SCAN_WARN 31
63 #define EVENT_LOG_TAG_MPF_ERR 32
64 #define EVENT_LOG_TAG_MPF_WARN 33
65 #define EVENT_LOG_TAG_MPF_INFO 34
66 #define EVENT_LOG_TAG_MPF_DEBUG 35
67 #define EVENT_LOG_TAG_EVENT_INFO 36
68 #define EVENT_LOG_TAG_EVENT_ERR 37
69 #define EVENT_LOG_TAG_PWRSTATS_ERROR 38
70 #define EVENT_LOG_TAG_EXCESS_PM_ERROR 39
71 #define EVENT_LOG_TAG_IOCTL_LOG 40
72 #define EVENT_LOG_TAG_PFN_ERR 41
73 #define EVENT_LOG_TAG_PFN_WARN 42
74 #define EVENT_LOG_TAG_PFN_INFO 43
75 #define EVENT_LOG_TAG_PFN_DEBUG 44
76 #define EVENT_LOG_TAG_BEACON_LOG 45
77 #define EVENT_LOG_TAG_WNM_BSSTRANS_INFO 46
78 #define EVENT_LOG_TAG_TRACE_CHANSW 47
79 #define EVENT_LOG_TAG_PCI_ERROR 48
80 #define EVENT_LOG_TAG_PCI_TRACE 49
81 #define EVENT_LOG_TAG_PCI_WARN 50
82 #define EVENT_LOG_TAG_PCI_INFO 51
83 #define EVENT_LOG_TAG_PCI_DBG 52
84 #define EVENT_LOG_TAG_PCI_DATA 53
85 #define EVENT_LOG_TAG_PCI_RING 54
86 /* EVENT_LOG_TAG_AWDL_TRACE_RANGING will be removed after wlc_ranging merge from IGUANA
87 * keeping it here to avoid compilation error on trunk
88 */
89 #define EVENT_LOG_TAG_AWDL_TRACE_RANGING 55
90 #define EVENT_LOG_TAG_RANGING_TRACE 55
91 #define EVENT_LOG_TAG_WL_ERROR 56
92 #define EVENT_LOG_TAG_PHY_ERROR 57
93 #define EVENT_LOG_TAG_OTP_ERROR 58
94 #define EVENT_LOG_TAG_NOTIF_ERROR 59
95 #define EVENT_LOG_TAG_MPOOL_ERROR 60
96 #define EVENT_LOG_TAG_OBJR_ERROR 61
97 #define EVENT_LOG_TAG_DMA_ERROR 62
98 #define EVENT_LOG_TAG_PMU_ERROR 63
99 #define EVENT_LOG_TAG_BSROM_ERROR 64
100 #define EVENT_LOG_TAG_SI_ERROR 65
101 #define EVENT_LOG_TAG_ROM_PRINTF 66
102 #define EVENT_LOG_TAG_RATE_CNT 67
103 #define EVENT_LOG_TAG_CTL_MGT_CNT 68
104 #define EVENT_LOG_TAG_AMPDU_DUMP 69
105 #define EVENT_LOG_TAG_MEM_ALLOC_SUCC 70
106 #define EVENT_LOG_TAG_MEM_ALLOC_FAIL 71
107 #define EVENT_LOG_TAG_MEM_FREE 72
108 #define EVENT_LOG_TAG_WL_ASSOC_LOG 73
109 #define EVENT_LOG_TAG_WL_PS_LOG 74
110 #define EVENT_LOG_TAG_WL_ROAM_LOG 75
111 #define EVENT_LOG_TAG_WL_MPC_LOG 76
112 #define EVENT_LOG_TAG_WL_WSEC_LOG 77
113 #define EVENT_LOG_TAG_WL_WSEC_DUMP 78
114 #define EVENT_LOG_TAG_WL_MCNX_LOG 79
115 #define EVENT_LOG_TAG_HEALTH_CHECK_ERROR 80
116 #define EVENT_LOG_TAG_HNDRTE_EVENT_ERROR 81
117 #define EVENT_LOG_TAG_ECOUNTERS_ERROR 82
118 #define EVENT_LOG_TAG_WL_COUNTERS 83
119 #define EVENT_LOG_TAG_ECOUNTERS_IPCSTATS 84
120 #define EVENT_LOG_TAG_WL_P2P_LOG 85
121 #define EVENT_LOG_TAG_SDIO_ERROR 86
122 #define EVENT_LOG_TAG_SDIO_TRACE 87
123 #define EVENT_LOG_TAG_SDIO_DBG 88
124 #define EVENT_LOG_TAG_SDIO_PRHDRS 89
125 #define EVENT_LOG_TAG_SDIO_PRPKT 90
126 #define EVENT_LOG_TAG_SDIO_INFORM 91
127 #define EVENT_LOG_TAG_MIMO_PS_ERROR 92
128 #define EVENT_LOG_TAG_MIMO_PS_TRACE 93
129 #define EVENT_LOG_TAG_MIMO_PS_INFO 94
130 #define EVENT_LOG_TAG_BTCX_STATS 95
131 #define EVENT_LOG_TAG_LEAKY_AP_STATS 96
132 #define EVENT_LOG_TAG_AWDL_TRACE_ELECTION 97
133 #define EVENT_LOG_TAG_MIMO_PS_STATS 98
134 #define EVENT_LOG_TAG_PWRSTATS_PHY 99
135 #define EVENT_LOG_TAG_PWRSTATS_SCAN 100
136 #define EVENT_LOG_TAG_PWRSTATS_AWDL 101
137 #define EVENT_LOG_TAG_PWRSTATS_WAKE_V2 102
138 #define EVENT_LOG_TAG_LQM 103
139 #define EVENT_LOG_TAG_TRACE_WL_INFO 104
140 #define EVENT_LOG_TAG_TRACE_BTCOEX_INFO 105
141 #define EVENT_LOG_TAG_ECOUNTERS_TIME_DATA 106
142 #define EVENT_LOG_TAG_NAN_ERROR 107
143 #define EVENT_LOG_TAG_NAN_INFO 108
144 #define EVENT_LOG_TAG_NAN_DBG 109
145 #define EVENT_LOG_TAG_STF_ARBITRATOR_ERROR 110
146 #define EVENT_LOG_TAG_STF_ARBITRATOR_TRACE 111
147 #define EVENT_LOG_TAG_STF_ARBITRATOR_WARN 112
148 #define EVENT_LOG_TAG_SCAN_SUMMARY 113
149 #define EVENT_LOG_TAG_PROXD_SAMPLE_COLLECT 114
150 #define EVENT_LOG_TAG_OCL_INFO 115
151 #define EVENT_LOG_TAG_RSDB_PMGR_DEBUG 116
152 #define EVENT_LOG_TAG_RSDB_PMGR_ERR 117
153 #define EVENT_LOG_TAG_NAT_ERR 118
154 #define EVENT_LOG_TAG_NAT_WARN 119
155 #define EVENT_LOG_TAG_NAT_INFO 120
156 #define EVENT_LOG_TAG_NAT_DEBUG 121
157 #define EVENT_LOG_TAG_STA_INFO 122
158 #define EVENT_LOG_TAG_PROXD_ERROR 123
159 #define EVENT_LOG_TAG_PROXD_TRACE 124
160 #define EVENT_LOG_TAG_PROXD_INFO 125
161 #define EVENT_LOG_TAG_IE_ERROR 126
162 #define EVENT_LOG_TAG_ASSOC_ERROR 127
163 #define EVENT_LOG_TAG_SCAN_ERR 128
164 #define EVENT_LOG_TAG_AMSDU_ERROR 129
165 #define EVENT_LOG_TAG_AMPDU_ERROR 130
166 #define EVENT_LOG_TAG_KM_ERROR 131
167 #define EVENT_LOG_TAG_DFS 132
168 #define EVENT_LOG_TAG_REGULATORY 133
169 #define EVENT_LOG_TAG_CSA 134
170 #define EVENT_LOG_TAG_WNM_BSSTRANS_ERR 135
171 #define EVENT_LOG_TAG_SUP_INFO 136
172 #define EVENT_LOG_TAG_SUP_ERROR 137
173 #define EVENT_LOG_TAG_CHANCTXT_TRACE 138
174 #define EVENT_LOG_TAG_CHANCTXT_INFO 139
175 #define EVENT_LOG_TAG_CHANCTXT_ERROR 140
176 #define EVENT_LOG_TAG_CHANCTXT_WARN 141
177 #define EVENT_LOG_TAG_MSCHPROFILE 142
178 #define EVENT_LOG_TAG_4WAYHANDSHAKE 143
179 #define EVENT_LOG_TAG_MSCHPROFILE_TLV 144
180 #define EVENT_LOG_TAG_ADPS 145
181 #define EVENT_LOG_TAG_MBO_DBG 146
182 #define EVENT_LOG_TAG_MBO_INFO 147
183 #define EVENT_LOG_TAG_MBO_ERR 148
184 #define EVENT_LOG_TAG_TXDELAY 149
185 #define EVENT_LOG_TAG_BCNTRIM_INFO 150
186 #define EVENT_LOG_TAG_BCNTRIM_TRACE 151
187 #define EVENT_LOG_TAG_OPS_INFO 152
188 #define EVENT_LOG_TAG_STATS 153
189 #define EVENT_LOG_TAG_BAM 154
190 #define EVENT_LOG_TAG_TXFAIL 155
191 #define EVENT_LOG_TAG_AWDL_CONFIG_DBG 156
192 #define EVENT_LOG_TAG_AWDL_SYNC_DBG 157
193 #define EVENT_LOG_TAG_AWDL_PEER_DBG 158
194 #define EVENT_LOG_TAG_RANDMAC_INFO 159
195 #define EVENT_LOG_TAG_RANDMAC_DBG 160
196 #define EVENT_LOG_TAG_RANDMAC_ERR 161
197 #define EVENT_LOG_TAG_AWDL_DFSP_DBG 162
198 #define EVENT_LOG_TAG_MSCH_CAL 163
199 #define EVENT_LOG_TAG_MSCH_OPP_CAL 164
200 #define EVENT_LOG_TAG_MSCH 165
201 #define EVENT_LOG_TAG_NAN_SYNC 166
202 #define EVENT_LOG_TAG_NAN_DPE 167
203 #define EVENT_LOG_TAG_NAN_SCHED 168
204 #define EVENT_LOG_TAG_NAN_RNG 169
205 #define EVENT_LOG_TAG_NAN_DAM 170
206 #define EVENT_LOG_TAG_NAN_NA 171
207 #define EVENT_LOG_TAG_NAN_NDL 172
208 #define EVENT_LOG_TAG_NAN_NDP 173
209 #define EVENT_LOG_TAG_NAN_SEC 174
210 #define EVENT_LOG_TAG_NAN_MAC 175
211 #define EVENT_LOG_TAG_NAN_FSM 176
212
213 #define EVENT_LOG_TAG_TPA_ERR 192
214 #define EVENT_LOG_TAG_TPA_INFO 193
215 #define EVENT_LOG_TAG_OCE_DBG 194
216 #define EVENT_LOG_TAG_OCE_INFO 195
217 #define EVENT_LOG_TAG_OCE_ERR 196
218 #define EVENT_LOG_TAG_WL_WARN 197
219 #define EVENT_LOG_TAG_SB_ERR 198
220 #define EVENT_LOG_TAG_SB_INFO 199
221 #define EVENT_LOG_TAG_SB_SCHED 200
222 #define EVENT_LOG_TAG_ADPS_INFO 201
223 #define EVENT_LOG_TAG_SB_CMN_SYNC_INFO 202
224 #define EVENT_LOG_TAG_PHY_CAL_INFO 203 /* PHY CALs scheduler info */
225 #define EVENT_LOG_TAG_EVT_NOTIF_INFO 204
226 #define EVENT_LOG_TAG_PHY_HC_ERROR 205
227 #define EVENT_LOG_TAG_PHY_TXPWR_WARN 206
228 #define EVENT_LOG_TAG_PHY_TXPWR_INFO 207
229 #define EVENT_LOG_TAG_PHY_ACI_INFO 208
230 #define EVENT_LOG_TAG_WL_COUNTERS_AUX 209
231 #define EVENT_LOG_TAG_AMPDU_DUMP_AUX 210
232 #define EVENT_LOG_TAG_PWRSTATS_AWDL_AUX 211
233 #define EVENT_LOG_TAG_PWRSTATS_PHY_AUX 212
234 #define EVENT_LOG_TAG_PWRSTATS_SCAN_AUX 213
235 #define EVENT_LOG_TAG_PWRSTATS_WAKE_V2_AUX 214
236 #define EVENT_LOG_TAG_SVT_TESTING 215 /* SVT testing/verification */
237 #define EVENT_LOG_TAG_HND_SMD_ERROR 216
238 #define EVENT_LOG_TAG_PSBW_INFO 217
239 #define EVENT_LOG_TAG_PHY_CAL_DBG 218
240 #define EVENT_LOG_TAG_FILS_DBG 219
241 #define EVENT_LOG_TAG_FILS_INFO 220
242 #define EVENT_LOG_TAG_FILS_ERROR 221
243 #define EVENT_LOG_TAG_HWA_TXPOST 222
244 #define EVENT_LOG_TAG_HWA_TXDMA 223
245
246 /* Debug tags for making debug builds */
247 #define EVENT_LOG_TAG_DBG1 251
248 #define EVENT_LOG_TAG_DBG2 252
249 #define EVENT_LOG_TAG_DBG3 253
250 #define EVENT_LOG_TAG_DBG4 254
251 #define EVENT_LOG_TAG_DBG5 255
252
253 /* Insert new tags here for Koala onwards */
254
255 /* NAN INFO/ERR evnt tags */
256 #define EVENT_LOG_TAG_NAN_SYNC_INFO 256
257 #define EVENT_LOG_TAG_NAN_DPE_INFO 257
258 #define EVENT_LOG_TAG_NAN_SCHED_INFO 258
259 #define EVENT_LOG_TAG_NAN_RNG_INFO 259
260 #define EVENT_LOG_TAG_NAN_DAM_INFO 260
261 #define EVENT_LOG_TAG_NAN_NA_INFO 261
262 #define EVENT_LOG_TAG_NAN_NDL_INFO 262
263 #define EVENT_LOG_TAG_NAN_NDP_INFO 263
264 #define EVENT_LOG_TAG_NAN_SEC_INFO 264
265 #define EVENT_LOG_TAG_NAN_MAC_INFO 265
266 #define EVENT_LOG_TAG_NAN_FSM_INFO 266
267 #define EVENT_LOG_TAG_NAN_PEER_INFO 267
268 #define EVENT_LOG_TAG_NAN_AVAIL_INFO 268
269 #define EVENT_LOG_TAG_NAN_CMN_INFO 269
270 #define EVENT_LOG_TAG_NAN_SYNC_ERR 270
271 #define EVENT_LOG_TAG_NAN_DPE_ERR 271
272 #define EVENT_LOG_TAG_NAN_SCHED_ERR 272
273 #define EVENT_LOG_TAG_NAN_RNG_ERR 273
274 #define EVENT_LOG_TAG_NAN_DAM_ERR 274
275 #define EVENT_LOG_TAG_NAN_NA_ERR 275
276 #define EVENT_LOG_TAG_NAN_NDL_ERR 276
277 #define EVENT_LOG_TAG_NAN_NDP_ERR 277
278 #define EVENT_LOG_TAG_NAN_SEC_ERR 278
279 #define EVENT_LOG_TAG_NAN_MAC_ERR 279
280 #define EVENT_LOG_TAG_NAN_FSM_ERR 280
281 #define EVENT_LOG_TAG_NAN_PEER_ERR 281
282 #define EVENT_LOG_TAG_NAN_AVAIL_ERR 282
283 #define EVENT_LOG_TAG_NAN_CMN_ERR 283
284
285 /* More NAN DBG evt Tags */
286 #define EVENT_LOG_TAG_NAN_PEER 284
287 #define EVENT_LOG_TAG_NAN_AVAIL 285
288 #define EVENT_LOG_TAG_NAN_CMN 286
289
290 #define EVENT_LOG_TAG_SAE_ERROR 287
291 #define EVENT_LOG_TAG_SAE_INFO 288
292
293 /* rxsig module logging */
294 #define EVENT_LOG_TAG_RXSIG_ERROR 289
295 #define EVENT_LOG_TAG_RXSIG_DEBUG 290
296 #define EVENT_LOG_TAG_RXSIG_INFO 291
297
298 /* HE TWT HEB EVEVNT_LOG_TAG */
299 #define EVENT_LOG_TAG_WL_HE_INFO 292
300 #define EVENT_LOG_TAG_WL_HE_TRACE 293
301 #define EVENT_LOG_TAG_WL_HE_WARN 294
302 #define EVENT_LOG_TAG_WL_HE_ERROR 295
303 #define EVENT_LOG_TAG_WL_TWT_INFO 296
304 #define EVENT_LOG_TAG_WL_TWT_TRACE 297
305 #define EVENT_LOG_TAG_WL_TWT_WARN 298
306 #define EVENT_LOG_TAG_WL_TWT_ERROR 299
307 #define EVENT_LOG_TAG_WL_HEB_ERROR 300
308 #define EVENT_LOG_TAG_WL_HEB_TRACE 301
309
310 /* EVENT_LOG_TAG_MAX = Set to the same value of last tag, not last tag + 1 */
311 #define EVENT_LOG_TAG_MAX 301
312 #define EVENT_LOG_TAG_MAX_LEGACY_FORMAT 255
313 /* Note: New event should be added/reserved in trunk before adding it to branches */
314
315 typedef enum wl_el_set_type_def {
316 EVENT_LOG_SET_TYPE_DEFAULT = 0, /* flush the log buffer when it is full - Default option */
317 EVENT_LOG_SET_TYPE_PRSRV = 1, /* flush the log buffer based on fw or host trigger */
318 EVENT_LOG_SET_TYPE_DFLUSH = 2 /* flush the log buffer once the watermark is reached */
319 } wl_el_set_type_def_t;
320
321 #define EVENT_LOG_TAG_FLUSH_NONE 0x00 /* No flush */
322 #define EVENT_LOG_TAG_FLUSH_ALL 0x40 /* Flush all preserved sets */
323 #define EVENT_LOG_TAG_FLUSH_SETNUM 0x80 /* Flush preserved set */
324 #define EVENT_LOG_TAG_FLUSH_MASK 0x3f /* SetNum Mask */
325
326 typedef enum wl_el_flush_type {
327 EL_TAG_PRSRV_FLUSH_NONE = 0, /* No flush of preserve buf on this tag */
328 EL_TAG_PRSRV_FLUSH_SETNUM, /* Flush the buffer set specifid on this tag */
329 EL_TAG_PRSRV_FLUSH_ALL /* Flush all preserved buffer set on this tag */
330 } wl_el_flush_type_t;
331
332 #define EVENT_LOG_FLUSH_CURRENT_VERSION 0
333 typedef struct wl_el_set_flush_prsrv_s {
334 uint16 version;
335 uint16 len;
336 uint16 tag; /* Tag for which preserve flush should be done */
337 uint8 flush_type; /* Check wl_el_flush_type_t */
338 uint8 set_num; /* Log set num to flush. Max is NUM_EVENT_LOG_SETS. Valid only when
339 * action is EVENT_LOG_TAG_FLUSH_SETNUM
340 */
341 } wl_el_set_flush_prsrv_t;
342
343 #define SD_PRHDRS(i, s, h, p, n, l)
344 #define SD_PRPKT(m, b, n)
345 #define SD_INFORM(args)
346
347 /* Flags for tag control */
348 #define EVENT_LOG_TAG_FLAG_NONE 0
349 #define EVENT_LOG_TAG_FLAG_LOG 0x80
350 #define EVENT_LOG_TAG_FLAG_PRINT 0x40
351 #define EVENT_LOG_TAG_FLAG_SET_MASK 0x3f
352
353 /* Each event log entry has a type. The type is the LAST word of the
354 * event log. The printing code walks the event entries in reverse
355 * order to find the first entry.
356 */
357 typedef union event_log_hdr {
358 struct {
359 uint8 tag; /* Event_log entry tag */
360 uint8 count; /* Count of 4-byte entries */
361 uint16 fmt_num; /* Format number */
362 };
363 uint32 t; /* Type cheat */
364 } event_log_hdr_t;
365
366 /*
367 * The position of the extended header in the event log stream will be as follows:
368 * <event log payload><ARM cycle count timestamp><extended header><regular header>
369 * Extended header could be due to count > 255 or tag > 255.
370 *
371 * Extended count: 6 bits long. 8 bits (existing) + 6 bits =>
372 * 2^14 words = 65536 bytes payload max
373 * Extended count field is currently reserved
374 * Extended tag: 8 (existing) + 4 bits = 12 bits =>2^12 = 4096 tags
375 * bits[7..4] of extended tags are reserved.
376 * MSB 16 bits of the extended header are reserved for future use.
377 */
378
379 typedef union event_log_extended_hdr {
380 struct {
381 uint8 extended_tag; /* Extended tag, bits[7..4] are reserved */
382 uint8 extended_count; /* Extended count. Reserved for now. */
383 uint16 rsvd; /* Reserved */
384 };
385
386 uint32 t; /* Type cheat */
387 } event_log_extended_hdr_t;
388 #endif /* _EVENT_LOG_TAG_H_ */