xref: /freebsd/sys/contrib/dev/athk/ath10k/fwlog.c (revision ccfd87fe2ac0e2e6aeb1911a7d7cce6712a8564f)
1 /*
2  * Copyright (c) 2015, The Linux Foundation. All rights reserved.
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  */
16 
17 #include "core.h"
18 #include "debug.h"
19 #if defined(__FreeBSD__)
20 #include "fwlog.h"
21 #endif
22 
23 #define FW_DBGLOG_TIMESTAMP_OFFSET	0
24 #define FW_DBGLOG_TIMESTAMP_MASK	0xFFFFFFFF /* Bit 0-15. Contains bit
25                                                        8-23 of the LF0 timer */
26 #define FW_DBGLOG_DBGID_OFFSET		0
27 #define FW_DBGLOG_DBGID_MASK		0x000003FF /* Bit 0-9 */
28 #define FW_DBGLOG_DBGID_NUM_MAX		256 /* Upper limit is width of mask */
29 
30 #define FW_DBGLOG_MODULEID_OFFSET	10
31 #define FW_DBGLOG_MODULEID_MASK		0x0003FC00 /* Bit 10-17 */
32 #define FW_DBGLOG_MODULEID_NUM_MAX	32 /* Upper limit is width of mask */
33 
34 #define FW_DBGLOG_VAPID_OFFSET		18
35 #define FW_DBGLOG_VAPID_MASK		0x03FC0000 /* Bit 20-25*/
36 #define FW_DBGLOG_VAPID_NUM_MAX		16
37 
38 #define FW_DBGLOG_NUM_ARGS_OFFSET	26
39 #define FW_DBGLOG_NUM_ARGS_MASK		0xFC000000 /* Bit 26-31 */
40 #define FW_DBGLOG_NUM_ARGS_MAX		5 /* it is limited bcoz of limitatios
41                                              with Xtensa tool */
42 
43 
44 
45 #define FW_DBGLOG_GET_DBGID(arg) \
46     ((arg & FW_DBGLOG_DBGID_MASK) >> FW_DBGLOG_DBGID_OFFSET)
47 
48 #define FW_DBGLOG_GET_MODULEID(arg) \
49     ((arg & FW_DBGLOG_MODULEID_MASK) >> FW_DBGLOG_MODULEID_OFFSET)
50 
51 #define FW_DBGLOG_GET_VAPID(arg) \
52     ((arg & FW_DBGLOG_VAPID_MASK) >> FW_DBGLOG_VAPID_OFFSET)
53 
54 #define FW_DBGLOG_GET_NUMARGS(arg) \
55     ((arg & FW_DBGLOG_NUM_ARGS_MASK) >> FW_DBGLOG_NUM_ARGS_OFFSET)
56 
57 #define FW_DBGLOG_GET_TIME_STAMP(arg) \
58     ((arg & FW_DBGLOG_TIMESTAMP_MASK) >> FW_DBGLOG_TIMESTAMP_OFFSET)
59 
60 #define ATH10K_FWLOG_MAX_EVT_QUEUE 100
61 #define FW_DBGLOG_PRINT_PREFIX "FWLOG: "
62 #define MAX_DBG_MSGS 256
63 
64 typedef enum {
65   WLAN_MODULE_ID_MIN = 0,
66   WLAN_MODULE_INF = WLAN_MODULE_ID_MIN,
67   WLAN_MODULE_WMI,
68   WLAN_MODULE_STA_PWRSAVE,
69   WLAN_MODULE_WHAL,
70   WLAN_MODULE_COEX,
71   WLAN_MODULE_ROAM,
72   WLAN_MODULE_RESMGR_CHAN_MANAGER,
73   WLAN_MODULE_RESMGR_OCS,
74   WLAN_MODULE_VDEV_MGR,
75   WLAN_MODULE_SCAN,
76   WLAN_MODULE_RATECTRL,
77   WLAN_MODULE_AP_PWRSAVE,
78   WLAN_MODULE_BLOCKACK,
79   WLAN_MODULE_MGMT_TXRX,
80   WLAN_MODULE_DATA_TXRX,
81   WLAN_MODULE_HTT,
82   WLAN_MODULE_HOST,
83   WLAN_MODULE_BEACON,
84   WLAN_MODULE_OFFLOAD,
85   WLAN_MODULE_WAL,
86   WAL_MODULE_DE,
87   WLAN_MODULE_PCIELP,
88   WLAN_MODULE_RTT,
89   WLAN_MODULE_RESOURCE,
90   WLAN_MODULE_DCS,
91   WLAN_MODULE_ANI,
92   WLAN_MODULE_CACHEMGR,
93   WLAN_MODULE_DEBUG,
94   WLAN_MODULE_ID_MAX,
95   WLAN_MODULE_ID_INVALID = WLAN_MODULE_ID_MAX,
96 } WLAN_MODULE_ID;
97 
98 typedef enum {
99 	/* Add various modules supported by 10.4 fw
100 	 * when module IDs are needed to be used
101 	 */
102 	WLAN_10_4_MODULE_ID_MAX = 35,
103 	WLAN_10_4_MODULE_ID_INVALID = WLAN_10_4_MODULE_ID_MAX,
104 } WLAN_10_4_MODULE_ID;
105 
106 
107 char * DBG_MSG_ARR[WLAN_MODULE_ID_MAX][MAX_DBG_MSGS] =
108 {
109 {
110 	"INF_MSG_START",
111 	"INF_ASSERTION_FAILED",
112 	"INF_TARGET_ID",
113 	"INF_MSG_END"
114 },
115 {
116 	"WMI_DBGID_DEFINITION_START",
117 	"WMI_CMD_RX_XTND_PKT_TOO_SHORT",
118 	"WMI_EXTENDED_CMD_NOT_HANDLED",
119 	"WMI_CMD_RX_PKT_TOO_SHORT",
120 	"WMI_CALLING_WMI_EXTENSION_FN",
121 	"WMI_CMD_NOT_HANDLED",
122 	"WMI_IN_SYNC",
123 	"WMI_TARGET_WMI_SYNC_CMD",
124 	"WMI_SET_SNR_THRESHOLD_PARAMS",
125 	"WMI_SET_RSSI_THRESHOLD_PARAMS",
126 	"WMI_SET_LQ_TRESHOLD_PARAMS",
127 	"WMI_TARGET_CREATE_PSTREAM_CMD",
128 	"WMI_WI_DTM_INUSE",
129 	"WMI_TARGET_DELETE_PSTREAM_CMD",
130 	"WMI_TARGET_IMPLICIT_DELETE_PSTREAM_CMD",
131 	"WMI_TARGET_GET_BIT_RATE_CMD",
132 	"WMI_GET_RATE_MASK_CMD_FIX_RATE_MASK_IS",
133 	"WMI_TARGET_GET_AVAILABLE_CHANNELS_CMD",
134 	"WMI_TARGET_GET_TX_PWR_CMD",
135 	"WMI_FREE_EVBUF_WMIBUF",
136 	"WMI_FREE_EVBUF_DATABUF",
137 	"WMI_FREE_EVBUF_BADFLAG",
138 	"WMI_HTC_RX_ERROR_DATA_PACKET",
139         "WMI_HTC_RX_SYNC_PAUSING_FOR_MBOX",
140 	"WMI_INCORRECT_WMI_DATA_HDR_DROPPING_PKT",
141 	"WMI_SENDING_READY_EVENT",
142 	"WMI_SETPOWER_MDOE_TO_MAXPERF",
143 	"WMI_SETPOWER_MDOE_TO_REC",
144 	"WMI_BSSINFO_EVENT_FROM",
145 	"WMI_TARGET_GET_STATS_CMD",
146 	"WMI_SENDING_SCAN_COMPLETE_EVENT",
147 	"WMI_SENDING_RSSI_INDB_THRESHOLD_EVENT ",
148 	"WMI_SENDING_RSSI_INDBM_THRESHOLD_EVENT",
149 	"WMI_SENDING_LINK_QUALITY_THRESHOLD_EVENT",
150 	"WMI_SENDING_ERROR_REPORT_EVENT",
151 	"WMI_SENDING_CAC_EVENT",
152 	"WMI_TARGET_GET_ROAM_TABLE_CMD",
153 	"WMI_TARGET_GET_ROAM_DATA_CMD",
154 	"WMI_SENDING_GPIO_INTR_EVENT",
155 	"WMI_SENDING_GPIO_ACK_EVENT",
156 	"WMI_SENDING_GPIO_DATA_EVENT",
157 	"WMI_CMD_RX",
158 	"WMI_CMD_RX_XTND",
159 	"WMI_EVENT_SEND",
160 	"WMI_EVENT_SEND_XTND",
161 	"WMI_CMD_PARAMS_DUMP_START",
162 	"WMI_CMD_PARAMS_DUMP_END",
163 	"WMI_CMD_PARAMS",
164 	"WMI_EVENT_ALLOC_FAILURE",
165 	"WMI_DBGID_DCS_PARAM_CMD",
166 	"WMI_DBGOD_DEFNITION_END",
167 },
168 {
169 	"PS_STA_DEFINITION_START",
170 	"PS_STA_PM_ARB_REQUEST",
171 },
172 {
173 	"WHAL_DBGID_DEFINITION_START",
174 	"WHAL_ERROR_ANI_CONTROL",
175 	"WHAL_ERROR_CHIP_TEST1",
176 	"WHAL_ERROR_CHIP_TEST2",
177 	"WHAL_ERROR_EEPROM_CHECKSUM",
178 	"WHAL_ERROR_EEPROM_MACADDR",
179 	"WHAL_ERROR_INTERRUPT_HIU",
180 	"WHAL_ERROR_KEYCACHE_RESET",
181 	"WHAL_ERROR_KEYCACHE_SET",
182 	"WHAL_ERROR_KEYCACHE_TYPE",
183 	"WHAL_ERROR_KEYCACHE_TKIPENTRY",
184 	"WHAL_ERROR_KEYCACHE_WEPLENGTH",
185 	"WHAL_ERROR_PHY_INVALID_CHANNEL",
186 	"WHAL_ERROR_POWER_AWAKE",
187 	"WHAL_ERROR_POWER_SET",
188 	"WHAL_ERROR_RECV_STOPDMA",
189 	"WHAL_ERROR_RECV_STOPPCU",
190 	"WHAL_ERROR_RESET_CHANNF1",
191 	"WHAL_ERROR_RESET_CHANNF2",
192 	"WHAL_ERROR_RESET_PM",
193 	"WHAL_ERROR_RESET_OFFSETCAL",
194 	"WHAL_ERROR_RESET_RFGRANT",
195 	"WHAL_ERROR_RESET_RXFRAME",
196         "WHAL_ERROR_RESET_STOPDMA",
197 	"WHAL_ERROR_RESET_ERRID",
198 	"WHAL_ERROR_RESET_ADCDCCAL1",
199 	"WHAL_ERROR_RESET_ADCDCCAL2",
200 	"WHAL_ERROR_RESET_TXIQCAL",
201 	"WHAL_ERROR_RESET_RXIQCAL",
202 	"WHAL_ERROR_RESET_CARRIERLEAK",
203 	"WHAL_ERROR_XMIT_COMPUTE",
204 	"WHAL_ERROR_XMIT_NOQUEUE",
205 	"WHAL_ERROR_XMIT_ACTIVEQUEUE",
206 	"WHAL_ERROR_XMIT_BADTYPE",
207 	"WHAL_ERROR_XMIT_STOPDMA",
208 	"WHAL_ERROR_INTERRUPT_BB_PANIC",
209 	"WHAL_ERROR_PAPRD_MAXGAIN_ABOVE_WINDOW",
210 	"WHAL_SMARTANT_CONFIGURE",
211 	"WHAL_SMARTANT_RXANTENNA",
212 	"WHAL_TX_ENQUEUE",
213 	"WHAL_COEX_RESET",
214 	"WHAL_COEX_SELF_GEN_MASK",
215 	"WHAL_ERROR_COEX_MCI_ISR",
216 	"WHAL_COEX_MCI_ISR_IntRaw",
217 	"WHAL_COEX_MCI_ISR_Int1Raw",
218 	"WHAL_COEX_MCI_ISR_RxMsgRaw",
219 	"WHAL_COEX_SENDMSG_QUEUE",
220 	"WHAL_COEX_TX_MCI_REMOTE_RESET",
221 	"WHAL_COEX_TX_MCI_TYPE_UNKNOWN",
222 	"WHAL_COEX_TX_MCI_SYS_SLEEPING",
223 	"WHAL_COEX_TX_MCI_REQ_WAKE",
224 	"WHAL_COEX_TX_MCI_SYS_WAKING",
225 	"WHAL_COEX_TX_MCI_LNA_TAKE",
226 	"WHAL_COEX_TX_MCI_LNA_TRANS",
227 	"WHAL_COEX_TX_MCI_GPM_UNKNOWN",
228 	"WHAL_COEX_TX_MCI_GPM_WLAN_SET_ACL_INACTIVITY",
229 	"WHAL_COEX_TX_MCI_GPM_BT_PAUSE_PROFILE",
230 	"WHAL_COEX_TX_MCI_GPM_WLAN_PRIO",
231 	"WHAL_COEX_TX_MCI_GPM_BT_STATUS_UPDATE",
232 	"WHAL_COEX_TX_MCI_GPM_BT_UPDATE_FLAGS",
233 	"WHAL_COEX_TX_MCI_GPM_VERSION_QUERY",
234 	"WHAL_COEX_TX_MCI_GPM_VERSION_RESPONSE",
235 	"WHAL_COEX_TX_MCI_GPM_STATUS_QUERY",
236 	"WHAL_COEX_TX_MCI_GPM_HALT_BT_GPM",
237 	"WHAL_COEX_TX_MCI_GPM_WLAN_CHANNELS",
238 	"WHAL_COEX_TX_MCI_GPM_BT_PROFILE_INFO",
239 	"WHAL_COEX_TX_MCI_GPM_BT_CAL_REQ ",
240 	"WHAL_COEX_TX_MCI_GPM_BT_CAL_GRANT",
241 	"WHAL_COEX_TX_MCI_GPM_BT_CAL_DONE",
242 	"WHAL_COEX_TX_MCI_GPM_WLAN_CAL_REQ",
243 	"WHAL_COEX_TX_MCI_GPM_WLAN_CAL_GRANT",
244 	"WHAL_COEX_TX_MCI_GPM_WLAN_CAL_DONE",
245 	"WHAL_COEX_TX_MCI_GPM_BT_DEBUG",
246 	"WHAL_COEX_WHAL_MCI_RESET",
247 	"WHAL_COEX_POLL_BT_CAL_DONE_TIMEOUT",
248 	"WHAL_COEX_WHAL_PAUSE",
249 	"WHAL_COEX_RX_MCI_GPM_BT_CAL_REQ",
250 	"WHAL_COEX_RX_MCI_GPM_BT_CAL_DONE",
251 	"WHAL_COEX_RX_MCI_GPM_BT_CAL_GRANT",
252 	"WHAL_COEX_WLAN_CAL_START",
253 	"WHAL_COEX_WLAN_CAL_RESULT ",
254 	"WHAL_COEX_BtMciState",
255 	"WHAL_COEX_BtCalState",
256 	"WHAL_COEX_WlanCalState",
257 	"WHAL_COEX_RxReqWakeCount",
258 	"WHAL_COEX_RxRemoteResetCount",
259 	"WHAL_COEX_RESTART_CAL",
260 	"WHAL_COEX_WHAL_COEX_RESET",
261         "WHAL_COEX_SELF_GEN_MASK",
262 	"WHAL_DBGID_DEFINITION_END"
263 },
264 {
265 	"COEX_DEBUGID_START",
266 	"BTCOEX_DBG_MCI_1",
267 	"BTCOEX_DBG_MCI_2",
268 	"BTCOEX_DBG_MCI_3",
269 	"BTCOEX_DBG_MCI_4",
270 	"BTCOEX_DBG_MCI_5",
271 	"BTCOEX_DBG_MCI_6",
272 	"BTCOEX_DBG_MCI_7",
273 	"BTCOEX_DBG_MCI_8",
274 	"BTCOEX_DBG_MCI_9",
275 	"BTCOEX_DBG_MCI_10",
276 	"COEX_WAL_BTCOEX_INIT",
277 	"COEX_WAL_PAUSE",
278 	"COEX_WAL_RESUME",
279 	"COEX_UPDATE_AFH",
280 	"COEX_HWQ_EMPTY_CB",
281 	"COEX_MCI_TIMER_HANDLER",
282 	"COEX_MCI_RECOVER",
283 	"ERROR_COEX_MCI_ISR",
284 	"ERROR_COEX_MCI_GPM",
285 	"COEX_ProfileType",
286 	"COEX_LinkID",
287 	"COEX_LinkState",
288 	"COEX_LinkRole",
289 	"COEX_LinkRate",
290 	"COEX_VoiceType",
291 	"COEX_TInterval",
292 	"COEX_WRetrx",
293 	"COEX_Attempts",
294 	"COEX_PerformanceState",
295 	"COEX_LinkType",
296 	"COEX_RX_MCI_GPM_VERSION_QUERY",
297 	"COEX_RX_MCI_GPM_VERSION_RESPONSE",
298 	"COEX_RX_MCI_GPM_STATUS_QUERY",
299 	"COEX_STATE_WLAN_VDEV_DOWN",
300 	"COEX_STATE_WLAN_VDEV_START",
301 	"COEX_STATE_WLAN_VDEV_CONNECTED",
302 	"COEX_STATE_WLAN_VDEV_SCAN_STARTED",
303 	"COEX_STATE_WLAN_VDEV_SCAN_END",
304 	"COEX_STATE_WLAN_DEFAULT",
305 	"COEX_CHANNEL_CHANGE",
306 	"COEX_POWER_CHANGE",
307 	"COEX_CONFIG_MGR",
308 	"COEX_TX_MCI_GPM_BT_CAL_REQ",
309 	"COEX_TX_MCI_GPM_BT_CAL_GRANT",
310 	"COEX_TX_MCI_GPM_BT_CAL_DONE",
311 	"COEX_TX_MCI_GPM_WLAN_CAL_REQ",
312 	"COEX_TX_MCI_GPM_WLAN_CAL_GRANT",
313 	"COEX_TX_MCI_GPM_WLAN_CAL_DONE",
314 	"COEX_TX_MCI_GPM_BT_DEBUG",
315 	"COEX_TX_MCI_GPM_VERSION_QUERY",
316 	"COEX_TX_MCI_GPM_VERSION_RESPONSE",
317 	"COEX_TX_MCI_GPM_STATUS_QUERY",
318 	"COEX_TX_MCI_GPM_HALT_BT_GPM",
319 	"COEX_TX_MCI_GPM_WLAN_CHANNELS",
320 	"COEX_TX_MCI_GPM_BT_PROFILE_INFO",
321 	"COEX_TX_MCI_GPM_BT_STATUS_UPDATE",
322 	"COEX_TX_MCI_GPM_BT_UPDATE_FLAGS",
323 	"COEX_TX_MCI_GPM_UNKNOWN",
324 	"COEX_TX_MCI_SYS_WAKING",
325 	"COEX_TX_MCI_LNA_TAKE",
326 	"COEX_TX_MCI_LNA_TRANS",
327 	"COEX_TX_MCI_SYS_SLEEPING",
328 	"COEX_TX_MCI_REQ_WAKE",
329 	"COEX_TX_MCI_REMOTE_RESET",
330 	"COEX_TX_MCI_TYPE_UNKNOWN",
331 	"COEX_WHAL_MCI_RESET",
332 	"COEX_POLL_BT_CAL_DONE_TIMEOUT",
333 	"COEX_WHAL_PAUSE",
334 	"COEX_RX_MCI_GPM_BT_CAL_REQ",
335 	"COEX_RX_MCI_GPM_BT_CAL_DONE",
336 	"COEX_RX_MCI_GPM_BT_CAL_GRANT",
337 	"COEX_WLAN_CAL_START",
338 	"COEX_WLAN_CAL_RESULT",
339 	"COEX_BtMciState",
340 	"COEX_BtCalState",
341 	"COEX_WlanCalState",
342 	"COEX_RxReqWakeCount",
343 	"COEX_RxRemoteResetCount",
344 	"COEX_RESTART_CAL",
345 	"COEX_SENDMSG_QUEUE",
346 	"COEX_RESETSEQ_LNAINFO_TIMEOUT",
347 	"COEX_MCI_ISR_IntRaw",
348 	"COEX_MCI_ISR_Int1Raw",
349 	"COEX_MCI_ISR_RxMsgRaw",
350 	"COEX_WHAL_COEX_RESET",
351 	"COEX_WAL_COEX_INIT",
352 	"COEX_TXRX_CNT_LIMIT_ISR",
353 	"COEX_CH_BUSY",
354 	"COEX_REASSESS_WLAN_STATE",
355 	"COEX_BTCOEX_WLAN_STATE_UPDATE",
356 	"COEX_BT_NUM_OF_PROFILES",
357 	"COEX_BT_NUM_OF_HID_PROFILES",
358 	"COEX_BT_NUM_OF_ACL_PROFILES",
359 	"COEX_BT_NUM_OF_HI_ACL_PROFILES",
360 	"COEX_BT_NUM_OF_VOICE_PROFILES",
361 	"COEX_WLAN_AGGR_LIMIT",
362 	"COEX_BT_LOW_PRIO_BUDGET",
363 	"COEX_BT_HI_PRIO_BUDGET",
364 	"COEX_BT_IDLE_TIME",
365 	"COEX_SET_COEX_WEIGHT",
366 	"COEX_WLAN_WEIGHT_GROUP",
367 	"COEX_BT_WEIGHT_GROUP",
368 	"COEX_BT_INTERVAL_ALLOC",
369 	"COEX_BT_SCHEME",
370 	"COEX_BT_MGR",
371 	"COEX_BT_SM_ERROR",
372 	"COEX_SYSTEM_UPDATE",
373 	"COEX_LOW_PRIO_LIMIT",
374 	"COEX_HI_PRIO_LIMIT",
375 	"COEX_BT_INTERVAL_START",
376 	"COEX_WLAN_INTERVAL_START",
377 	"COEX_NON_LINK_BUDGET",
378 	"COEX_CONTENTION_MSG",
379 	"COEX_SET_NSS",
380 	"COEX_SELF_GEN_MASK",
381 	"COEX_PROFILE_ERROR",
382 	"COEX_WLAN_INIT",
383 	"COEX_BEACON_MISS",
384 	"COEX_BEACON_OK",
385 	"COEX_BTCOEX_SCAN_ACTIVITY",
386 	"COEX_SCAN_ACTIVITY",
387 	"COEX_FORCE_QUIETTIME",
388 	"COEX_BT_MGR_QUIETTIME",
389 	"COEX_BT_INACTIVITY_TRIGGER",
390 	"COEX_BT_INACTIVITY_REPORTED",
391 	"COEX_TX_MCI_GPM_WLAN_PRIO",
392 	"COEX_TX_MCI_GPM_BT_PAUSE_PROFILE",
393 	"COEX_TX_MCI_GPM_WLAN_SET_ACL_INACTIVITY",
394 	"COEX_RX_MCI_GPM_BT_ACL_INACTIVITY_REPORT",
395 	"COEX_GENERIC_ERROR",
396 	"COEX_RX_RATE_THRESHOLD",
397 	"COEX_RSSI",
398 	"COEX_WLAN_VDEV_NOTIF_START", //                 133
399 	"COEX_WLAN_VDEV_NOTIF_UP", //                    134
400 	"COEX_WLAN_VDEV_NOTIF_DOWN",   //                135
401 	"COEX_WLAN_VDEV_NOTIF_STOP",    //               136
402 	"COEX_WLAN_VDEV_NOTIF_ADD_PEER",    //           137
403 	"COEX_WLAN_VDEV_NOTIF_DELETE_PEER",  //          138
404 	"COEX_WLAN_VDEV_NOTIF_CONNECTED_PEER",  //       139
405 	"COEX_WLAN_VDEV_NOTIF_PAUSE",   //        140
406 	"COEX_WLAN_VDEV_NOTIF_UNPAUSED",    //        141
407 	"COEX_STATE_WLAN_VDEV_PEER_ADD",    //           142
408 	"COEX_STATE_WLAN_VDEV_CONNECTED_PEER",    //     143
409 	"COEX_STATE_WLAN_VDEV_DELETE_PEER",  //          144
410 	"COEX_STATE_WLAN_VDEV_PAUSE",  //         145
411 	"COEX_STATE_WLAN_VDEV_UNPAUSED",    //        146
412 	"COEX_SCAN_CALLBACK",           //    147
413 	"COEX_DEBUG_MESSAGE_END"
414 },
415 {
416 	"RO_DBGID_DEFINITION_START",
417 	"RO_REFRESH_ROAM_TABLE",
418 	"RO_UPDATE_ROAM_CANDIDATE",
419 	"RO_UPDATE_ROAM_CANDIDATE_CB",
420 	"RO_UPDATE_ROAM_CANDIDATE_FINISH",
421 	"RO_REFRESH_ROAM_TABLE_DONE",
422 	"RO_PERIODIC_SEARCH_CB",
423 	"RO_PERIODIC_SEARCH_TIMEOUT",
424 	"RO_INIT",
425 	"RO_BMISS_STATE1",
426 	"RO_BMISS_STATE2",
427 	"RO_SET_PERIODIC_SEARCH_ENABLE",
428 	"RO_SET_PERIODIC_SEARCH_DISABLE",
429 	"RO_ENABLE_SQ_THRESHOLD",
430 	"RO_DISABLE_SQ_THRESHOLD",
431 	"RO_ADD_BSS_TO_ROAM_TABLE",
432 	"RO_SET_PERIODIC_SEARCH_MODE",
433 	"RO_CONFIGURE_SQ_THRESHOLD1",
434 	"RO_CONFIGURE_SQ_THRESHOLD2",
435 	"RO_CONFIGURE_SQ_PARAMS",
436 	"RO_LOW_SIGNAL_QUALITY_EVENT",
437 	"RO_HIGH_SIGNAL_QUALITY_EVENT",
438 	"RO_REMOVE_BSS_FROM_ROAM_TABLE",
439 	"RO_UPDATE_CONNECTION_STATE_METRIC",
440 	"RO_LOWRSSI_SCAN_PARAMS",
441 	"RO_LOWRSSI_SCAN_START",
442 	"RO_LOWRSSI_SCAN_END",
443 	"RO_LOWRSSI_SCAN_CANCEL",
444 	"RO_LOWRSSI_ROAM_CANCEL",
445 	"RO_REFRESH_ROAM_CANDIDATE",
446 	"RO_DBGID_DEFINITION_END"
447 },
448 {
449 	"RESMGR_CHMGR_DEFINITION_START",
450 	"RESMGR_CHMGR_PAUSE_COMPLETE",
451 	"RESMGR_CHMGR_CHANNEL_CHANGE",
452 	"RESMGR_CHMGR_RESUME_COMPLETE",
453 	"RESMGR_CHMGR_VDEV_PAUSE",
454 	"RESMGR_CHMGR_VDEV_UNPAUSE",
455 	"RESMGR_CHMGR_DEFINITION_END"
456 },
457 {
458 	"RESMGR_OCS_DEFINITION_START",
459 	"RESMGR_OCS_ALLOCRAM_SIZE",
460 	"RESMGR_OCS_RESOURCES",
461 	"RESMGR_OCS_LINK_CREATE",
462 	"RESMGR_OCS_LINK_DELETE",
463 	"RESMGR_OCS_CHREQ_CREATE",
464 	"RESMGR_OCS_CHREQ_DELETE",
465 	"RESMGR_OCS_CHREQ_START",
466 	"RESMGR_OCS_CHREQ_STOP",
467 	"RESMGR_OCS_SCHEDULER_INVOKED",
468 	"RESMGR_OCS_CHREQ_GRANT",
469 	"RESMGR_OCS_CHREQ_COMPLETE",
470 	"RESMGR_OCS_NEXT_TSFTIME",
471 	"RESMGR_OCS_TSF_TIMEOUT_US",
472 	"RESMGR_OCS_CURR_CAT_WINDOW",
473 	"RESMGR_OCS_CURR_CAT_WINDOW_REQ",
474 	"RESMGR_OCS_CURR_CAT_WINDOW_TIMESLOT",
475 	"RESMGR_OCS_CHREQ_RESTART",
476 	"RESMGR_OCS_CLEANUP_CH_ALLOCATORS",
477 	"RESMGR_OCS_PURGE_CHREQ",
478 	"RESMGR_OCS_CH_ALLOCATOR_FREE",
479 	"RESMGR_OCS_RECOMPUTE_SCHEDULE",
480 	"RESMGR_OCS_NEW_CAT_WINDOW_REQ",
481 	"RESMGR_OCS_NEW_CAT_WINDOW_TIMESLOT",
482 	"RESMGR_OCS_CUR_CH_ALLOC",
483 	"RESMGR_OCS_WIN_CH_ALLOC",
484 	"RESMGR_OCS_SCHED_CH_CHANGE",
485 	"RESMGR_OCS_CONSTRUCT_CAT_WIN",
486 	"RESMGR_OCS_CHREQ_PREEMPTED",
487 	"RESMGR_OCS_CH_SWITCH_REQ",
488 	"RESMGR_OCS_CHANNEL_SWITCHED",
489 	"RESMGR_OCS_CLEANUP_STALE_REQS",
490 	"RESMGR_OCS_DEFINITION_END"
491 },
492 {
493 	"VDEV_MGR_DEBID_DEFINITION_START", /* vdev Mgr */
494 	"VDEV_MGR_BEACON_MISS_TIMER_TIMEOUT",
495 	"VDEV_MGR_BEACON_MISS_DETECTED",
496 	"VDEV_MGR_BEACON_IN_SYNC",
497 	"VDEV_MGR_AP_KEEPALIVE_IDLE",
498 	"VDEV_MGR_AP_KEEPALIVE_INACTIVE",
499 	"VDEV_MGR_AP_KEEPALIVE_UNRESPONSIVE",
500 },
501 {
502 	"SCAN_START_COMMAND_FAILED", /* scan */
503 	"SCAN_STOP_COMMAND_FAILED",
504 	"SCAN_EVENT_SEND_FAILED",
505 },
506 {	"RATECTRL_DBGID_DEFINITION_START", /* Rate ctrl*/
507 	"RATECTRL_DBGID_ASSOC",
508 	"RATECTRL_DBGID_NSS_CHANGE",
509 	"RATECTRL_DBGID_CHAINMASK_ERR",
510 	"RATECTRL_DBGID_UNEXPECTED_FRAME",
511 	"RATECTRL_DBGID_WAL_RCQUERY",
512 	"RATECTRL_DBGID_WAL_RCUPDATE",
513 	"RATECTRL_DBGID_DEFINITION_END",
514 },
515 {
516 	"AP_PS_DBGID_DEFINITION_START",
517 	"AP_PS_DBGID_UPDATE_TIM",
518 	"AP_PS_DBGID_PEER_STATE_CHANGE",
519 	"AP_PS_DBGID_PSPOLL",
520 	"AP_PS_DBGID_PEER_CREATE",
521 	"AP_PS_DBGID_PEER_DELETE",
522 	"AP_PS_DBGID_VDEV_CREATE",
523 	"AP_PS_DBGID_VDEV_DELETE",
524 	"AP_PS_DBGID_SYNC_TIM",
525 	"AP_PS_DBGID_NEXT_RESPONSE",
526 	"AP_PS_DBGID_START_SP",
527 	"AP_PS_DBGID_COMPLETED_EOSP",
528 	"AP_PS_DBGID_TRIGGER",
529 	"AP_PS_DBGID_DUPLICATE_TRIGGER",
530 	"AP_PS_DBGID_UAPSD_RESPONSE",
531 	"AP_PS_DBGID_SEND_COMPLETE",
532 	"AP_PS_DBGID_SEND_N_COMPLETE",
533 },
534 {
535 	 "" /* Block Ack */
536 },
537 {
538   "" /* Mgmt TxRx */
539 },
540 { "" /* Data TxRx */
541 },
542 { "" /* HTT */
543 },
544 { "" /* HOST */
545 },
546 { "" /* BEACON */
547 	"BEACON_EVENT_SWBA_SEND_FAILED",
548 },
549 { /* Offload Mgr */
550 	"OFFLOAD_MGR_DBGID_DEFINITION_START",
551 	"OFFLOADMGR_REGISTER_OFFLOAD",
552 	"OFFLOADMGR_DEREGISTER_OFFLOAD",
553 	"OFFLOADMGR_NO_REG_DATA_HANDLERS",
554 	"OFFLOADMGR_NO_REG_EVENT_HANDLERS",
555 	"OFFLOADMGR_REG_OFFLOAD_FAILED",
556 	"OFFLOADMGR_DBGID_DEFINITION_END",
557 },
558 {
559 	"WAL_DBGID_DEFINITION_START",
560 	"WAL_DBGID_FAST_WAKE_REQUEST",
561 	"WAL_DBGID_FAST_WAKE_RELEASE",
562 	"WAL_DBGID_SET_POWER_STATE",
563 	"WAL_DBGID_MISSING",
564 	"WAL_DBGID_CHANNEL_CHANGE_FORCE_RESET",
565 	"WAL_DBGID_CHANNEL_CHANGE",
566 	"WAL_DBGID_VDEV_START",
567 	"WAL_DBGID_VDEV_STOP",
568 	"WAL_DBGID_VDEV_UP",
569 	"WAL_DBGID_VDEV_DOWN",
570 	"WAL_DBGID_SW_WDOG_RESET",
571 	"WAL_DBGID_TX_SCH_REGISTER_TIDQ",
572 	"WAL_DBGID_TX_SCH_UNREGISTER_TIDQ",
573 	"WAL_DBGID_TX_SCH_TICKLE_TIDQ",
574 	"WAL_DBGID_XCESS_FAILURES",
575 	"WAL_DBGID_AST_ADD_WDS_ENTRY",
576 	"WAL_DBGID_AST_DEL_WDS_ENTRY",
577 	"WAL_DBGID_AST_WDS_ENTRY_PEER_CHG",
578 	"WAL_DBGID_AST_WDS_SRC_LEARN_FAIL",
579 	"WAL_DBGID_STA_KICKOUT",
580 	"WAL_DBGID_BAR_TX_FAIL",
581 	"WAL_DBGID_BAR_ALLOC_FAIL",
582 	"WAL_DBGID_LOCAL_DATA_TX_FAIL",
583 	"WAL_DBGID_SECURITY_PM4_QUEUED",
584 	"WAL_DBGID_SECURITY_GM1_QUEUED",
585 	"WAL_DBGID_SECURITY_PM4_SENT",
586 	"WAL_DBGID_SECURITY_ALLOW_DATA",
587 	"WAL_DBGID_SECURITY_UCAST_KEY_SET",
588 	"WAL_DBGID_SECURITY_MCAST_KEY_SET",
589 	"WAL_DBGID_SECURITY_ENCR_EN",
590 	"WAL_DBGID_BB_WDOG_TRIGGERED",
591 	"WAL_DBGID_RX_LOCAL_BUFS_LWM",
592 	"WAL_DBGID_RX_LOCAL_DROP_LARGE_MGMT",
593 	"WAL_DBGID_VHT_ILLEGAL_RATE_PHY_ERR_DETECTED",
594 	"WAL_DBGID_DEV_RESET",
595 	"WAL_DBGID_TX_BA_SETUP",
596 	"WAL_DBGID_RX_BA_SETUP",
597 	"WAL_DBGID_DEV_TX_TIMEOUT",
598 	"WAL_DBGID_DEV_RX_TIMEOUT",
599 	"WAL_DBGID_STA_VDEV_XRETRY",
600 	"WAL_DBGID_DCS",
601 	"WAL_DBGID_HCM_BIN",
602 	"WAL_DBGID_HCM_BIN_PENALIZE",
603 	"WAL_DBGID_HCM_BIN_DEPENALIZE",
604 	"WAL_DBGID_AST_UPDATE_WDS_ENTRY",
605 	"WAL_DBGID_PEER_EXT_STATS",
606 	"WAL_DBGID_TX_AC_BUFFER_SET",
607 	"WAL_DBGID_AST_ENTRY_EXIST",
608 	"WAL_DBGID_AST_ENTRY_FULL",
609 	"WAL_DBGID_SET_HW_FILTER",
610 	"WAL_DBGID_TX_PPDU_COMP_ERR",
611 	"WAL_DBGID_TX_ENC_KEY_DROP",
612 	"WAL_DBGID_PDEV_INFO_PRINT",
613 	"WAL_DBGID_VDEV_INFO_PRINT",
614 	"WAL_DBGID_DEFINITION_END",
615 },
616 {
617 	"" /* DE */
618 },
619 {
620 	"" /* pcie lp */
621 },
622 {
623 	"" /* RTT */
624 },
625 {      /* RESOURCE */
626 	"RESOURCE_DBGID_DEFINITION_START",
627 	"RESOURCE_PEER_ALLOC",
628 	"RESOURCE_PEER_FREE",
629 	"RESOURCE_PEER_ALLOC_WAL_PEER",
630 	"RESOURCE_DBGID_DEFINITION_END",
631 },
632 { /* DCS */
633 	"WLAN_DCS_DBGID_INIT",
634 	"WLAN_DCS_DBGID_WMI_CWINT",
635 	"WLAN_DCS_DBGID_TIMER",
636 	"WLAN_DCS_DBGID_CMDG",
637 	"WLAN_DCS_DBGID_CMDS",
638 	"WLAN_DCS_DBGID_DINIT"
639 },
640 {   /* ANI  */
641 	"ANI_DBGID_POLL",
642 	"ANI_DBGID_CONTROL",
643 	"ANI_DBGID_OFDM_PARAMS",
644 	"ANI_DBGID_CCK_PARAMS",
645 	"ANI_DBGID_RESET",
646 	"ANI_DBGID_RESTART",
647 	"ANI_DBGID_OFDM_LEVEL",
648 	"ANI_DBGID_CCK_LEVEL",
649 	"ANI_DBGID_FIRSTEP",
650 	"ANI_DBGID_CYCPWR",
651 	"ANI_DBGID_MRC_CCK",
652 	"ANI_DBGID_SELF_CORR_LOW",
653 	"ANI_DBGID_ENABLE",
654 	"ANI_DBGID_CURRENT_LEVEL",
655 	"ANI_DBGID_POLL_PERIOD",
656 	"ANI_DBGID_LISTEN_PERIOD",
657 	"ANI_DBGID_OFDM_LEVEL_CFG",
658 	"ANI_DBGID_CCK_LEVEL_CFG",
659 },
660 {
661 	"" /* CACHEMGR */
662 },
663 {      /* DEBUG */
664 	"WLAN_DEBUG_MODULE_DBGID_START",
665 	"WLAN_DEBUG_DBGID_PEER",
666 	"WLAN_DEBUG_DBGID_PDEV",
667 	"WLAN_DEBUG_DBGID_VDEV",
668 	"WLAN_DEBUG_MODULE_DBGID_END",
669 },
670 };
671 
672 char *FW_10_4_DBG_MSG_ARR[WLAN_10_4_MODULE_ID_MAX][MAX_DBG_MSGS] =
673 {
674 {
675 	"INF_DBGID_DEFINITION_START",
676 	"INF_ASSERTION_FAILED",
677 	"INF_TARGET_ID",
678 	"INF_DBGID_DEFINITION_END",
679 },
680 
681 {
682 	"WAL_MODULE_DE_DEFINITION_START",
683 	"WAL_MODULE_DE_DEFINITION_END",
684 },
685 
686 {
687 	"WLAN_MODULE_WAL_PDEV_DEFINITION_START",
688 	"WLAN_MODULE_WAL_PDEV_DEFINITION_END",
689 },
690 
691 {
692 	"WLAN_MODULE_WAL_VDEV_DEFINITION_START",
693 	"WLAN_MODULE_WAL_VDEV_DEFINITION_END",
694 },
695 
696 {
697 	"WLAN_MODULE_ROAM_DEFINITION_START",
698 	"WLAN_MODULE_ROAM_DEFINITION_END",
699 },
700 
701 {
702 	"WLAN_MODULE_DATA_TXRX_DEFINITION_START",
703 	"WLAN_MODULE_DATA_TXRX_DEFINITION_END",
704 },
705 
706 {
707 	"WLAN_MODULE_BLOCKACK_DEFINITION_START",
708 	"WLAN_MODULE_BLOCKACK_DEFINITION_END",
709 },
710 
711 {
712 	"WLAN_MODULE_QBOOST_DEFINITION_START",
713 	"WLAN_MODULE_QBOOST_DBGID_WLAN_PEER_NOT_FOUND",
714 	"WLAN_MODULE_QBOOST_DEFINITION_END",
715 },
716 
717 {
718 	"WLAN_MODULE_CACHEMGR_DEFINITION_START",
719 	"WLAN_MODULE_CACHEMGR_DEFINITION_END",
720 },
721 
722 {
723 	"WLAN_MODULE_HOST_DEFINITION_START",
724 	"WLAN_MODULE_HOST_DEFINITION_END",
725 },
726 
727 {
728 	"WMI_DBGID_DEFINITION_START",
729 	"WMI_CMD_RX_XTND_PKT_TOO_SHORT",
730 	"WMI_EXTENDED_CMD_NOT_HANDLED",
731 	"WMI_CMD_RX_PKT_TOO_SHORT",
732 	"WMI_CALLING_WMI_EXTENSION_FN",
733 	"WMI_CMD_NOT_HANDLED",
734 	"WMI_IN_SYNC",
735 	"WMI_TARGET_WMI_SYNC_CMD",
736 	"WMI_SET_SNR_THRESHOLD_PARAMS",
737 	"WMI_SET_RSSI_THRESHOLD_PARAMS",
738 	"WMI_SET_LQ_THRESHOLD_PARAMS",
739 	"WMI_TARGET_CREATE_PSTREAM_CMD",
740 	"WMI_WI_DTM_INUSE",
741 	"WMI_TARGET_DELETE_PSTREAM_CMD",
742 	"WMI_TARGET_IMPLICIT_DELETE_PSTREAM_CMD",
743 	"WMI_TARGET_GET_BIT_RATE_CMD",
744 	"WMI_GET_RATE_MASK_CMD_FIX_RATE_MASK_IS",
745 	"WMI_TARGET_GET_AVAILABLE_CHANNELS_CMD",
746 	"WMI_TARGET_GET_TX_PWR_CMD",
747 	"WMI_FREE_EVBUF_WMIBUF",
748 	"WMI_FREE_EVBUF_DATABUF",
749 	"WMI_FREE_EVBUF_BADFLAG",
750 	"WMI_HTC_RX_ERROR_DATA_PACKET",
751 	"WMI_HTC_RX_SYNC_PAUSING_FOR_MBOX",
752 	"WMI_INCORRECT_WMI_DATA_HDR_DROPPING_PKT",
753 	"WMI_SENDING_READY_EVENT",
754 	"WMI_SETPOWER_MDOE_TO_MAXPERF",
755 	"WMI_SETPOWER_MDOE_TO_REC",
756 	"WMI_BSSINFO_EVENT_FROM",
757 	"WMI_TARGET_GET_STATS_CMD",
758 	"WMI_SENDING_SCAN_COMPLETE_EVENT",
759 	"WMI_SENDING_RSSI_INDB_THRESHOLD_EVENT",
760 	"WMI_SENDING_RSSI_INDBM_THRESHOLD_EVENT",
761 	"WMI_SENDING_LINK_QUALITY_THRESHOLD_EVENT",
762 	"WMI_SENDING_ERROR_REPORT_EVENT",
763 	"WMI_SENDING_CAC_EVENT",
764 	"WMI_TARGET_GET_ROAM_TABLE_CMD",
765 	"WMI_TARGET_GET_ROAM_DATA_CMD",
766 	"WMI_SENDING_GPIO_INTR_EVENT",
767 	"WMI_SENDING_GPIO_ACK_EVENT",
768 	"WMI_SENDING_GPIO_DATA_EVENT",
769 	"WMI_CMD_RX",
770 	"WMI_CMD_RX_XTND",
771 	"WMI_EVENT_SEND",
772 	"WMI_EVENT_SEND_XTND",
773 	"WMI_CMD_PARAMS_DUMP_START",
774 	"WMI_CMD_PARAMS_DUMP_END",
775 	"WMI_CMD_PARAMS",
776 	"WMI_EVENT_ALLOC_FAILURE",
777 	"WMI_DBGID_DCS_PARAM_CMD",
778 	"WMI_DBGID_DEFINITION_END",
779 },
780 
781 {
782 	"PS_STA_DEFINITION_START",
783 	"PS_STA_PM_ARB_REQUEST",
784 	"PS_STA_DELIVER_EVENT",
785 },
786 
787 {
788 	"RESMGR_OCS_DEFINITION_START",
789 	"RESMGR_OCS_ALLOCRAM_SIZE",
790 	"RESMGR_OCS_RESOURCES",
791 	"RESMGR_OCS_LINK_CREATE",
792 	"RESMGR_OCS_LINK_DELETE",
793 	"RESMGR_OCS_CHREQ_CREATE",
794 	"RESMGR_OCS_CHREQ_DELETE",
795 	"RESMGR_OCS_CHREQ_START",
796 	"RESMGR_OCS_CHREQ_STOP",
797 	"RESMGR_OCS_SCHEDULER_INVOKED",
798 	"RESMGR_OCS_CHREQ_GRANT",
799 	"RESMGR_OCS_CHREQ_COMPLETE",
800 	"RESMGR_OCS_NEXT_TSFTIME",
801 	"RESMGR_OCS_TSF_TIMEOUT_US",
802 	"RESMGR_OCS_CURR_CAT_WINDOW",
803 	"RESMGR_OCS_CURR_CAT_WINDOW_REQ",
804 	"RESMGR_OCS_CURR_CAT_WINDOW_TIMESLOT",
805 	"RESMGR_OCS_CHREQ_RESTART",
806 	"RESMGR_OCS_CLEANUP_CH_ALLOCATORS",
807 	"RESMGR_OCS_PURGE_CHREQ",
808 	"RESMGR_OCS_CH_ALLOCATOR_FREE",
809 	"RESMGR_OCS_RECOMPUTE_SCHEDULE",
810 	"RESMGR_OCS_NEW_CAT_WINDOW_REQ",
811 	"RESMGR_OCS_NEW_CAT_WINDOW_TIMESLOT",
812 	"RESMGR_OCS_CUR_CH_ALLOC",
813 	"RESMGR_OCS_WIN_CH_ALLOC",
814 	"RESMGR_OCS_SCHED_CH_CHANGE",
815 	"RESMGR_OCS_CONSTRUCT_CAT_WIN",
816 	"RESMGR_OCS_CHREQ_PREEMPTED",
817 	"RESMGR_OCS_CH_SWITCH_REQ",
818 	"RESMGR_OCS_CHANNEL_SWITCHED",
819 	"RESMGR_OCS_CLEANUP_STALE_REQS",
820 	"RESMGR_OCS_CHREQ_UPDATE",
821 	"RESMGR_OCS_REG_NOA_NOTIF",
822 	"RESMGR_OCS_DEREG_NOA_NOTIF",
823 	"RESMGR_OCS_GEN_PERIODIC_NOA",
824 	"RESMGR_OCS_RECAL_QUOTAS",
825 	"RESMGR_OCS_GRANTED_QUOTA_STATS",
826 	"RESMGR_OCS_ALLOCATED_QUOTA_STATS",
827 	"RESMGR_OCS_REQ_QUOTA_STATS",
828 	"RESMGR_OCS_TRACKING_TIME_FIRED",
829 	"RESMGR_OCS_DEFINITION_END",
830 },
831 
832 {
833 	"RESMGR_CHMGR_DEFINITION_START",
834 	"RESMGR_CHMGR_PAUSE_COMPLETE",
835 	"RESMGR_CHMGR_CHANNEL_CHANGE",
836 	"RESMGR_CHMGR_RESUME_COMPLETE",
837 	"RESMGR_CHMGR_VDEV_PAUSE",
838 	"RESMGR_CHMGR_VDEV_UNPAUSE",
839 	"RESMGR_CHMGR_CTS2S_TX_COMP",
840 	"RESMGR_CHMGR_CFEND_TX_COMP",
841 	"RESMGR_CHMGR_DEFINITION_END",
842 },
843 
844 {
845 	"VDEV_MGR_DEFINITION_START",
846 	"VDEV_MGR_BMISS_TIMEOUT",
847 	"VDEV_MGR_BMISS_DETECTED",
848 	"VDEV_MGR_BCN_IN_SYNC",
849 	"VDEV_MGR_AP_KEEPALIVE_IDLE",
850 	"VDEV_MGR_AP_KEEPALIVE_INACTIVE",
851 	"VDEV_MGR_AP_KEEPALIVE_UNRESPONSIVE",
852 	"VDEV_MGR_AP_TBTT_CONFIG",
853 	"VDEV_MGR_FIRST_BCN_RECEIVED",
854 	"VDEV_MGR_VDEV_START",
855 	"VDEV_MGR_VDEV_UP",
856 	"VDEV_MGR_PEER_AUTHORIZED",
857 	"VDEV_MGR_OCS_HP_LP_REQ_POSTED",
858 	"VDEV_MGR_VDEV_START_OCS_HP_REQ_COMPLETE",
859 	"VDEV_MGR_VDEV_START_OCS_HP_REQ_STOP",
860 	"VDEV_MGR_HP_START_TIME",
861 	"VDEV_MGR_FIRST_BMISS_DETECTED",
862 	"VDEV_MGR_FINAL_BMISS_DETECTED",
863         "VDEV_MGR_VDEV_STOP",
864         "VDEV_MGR_VDEV_DOWN",
865         "VDEV_MGR_VDEV_START_RESP",
866         "VDEV_MGR_VDEV_STOP_RESP",
867         "VDEV_MGR_VDEV_CREATE",
868         "VDEV_MGR_VDEV_DELETE",
869 	"VDEV_MGR_DEFINITION_END",
870 },
871 
872 {
873 	"WHAL_DBGID_DEFINITION_START",
874 	"WHAL_ERROR_ANI_CONTROL",
875 	"WHAL_ERROR_CHIP_TEST1",
876 	"WHAL_ERROR_CHIP_TEST2",
877 	"WHAL_ERROR_EEPROM_CHECKSUM",
878 	"WHAL_ERROR_EEPROM_MACADDR",
879 	"WHAL_ERROR_INTERRUPT_HIU",
880 	"WHAL_ERROR_KEYCACHE_RESET",
881 	"WHAL_ERROR_KEYCACHE_SET",
882 	"WHAL_ERROR_KEYCACHE_TYPE",
883 	"WHAL_ERROR_KEYCACHE_TKIPENTRY",
884 	"WHAL_ERROR_KEYCACHE_WEPLENGTH",
885 	"WHAL_ERROR_PHY_INVALID_CHANNEL",
886 	"WHAL_ERROR_POWER_AWAKE",
887 	"WHAL_ERROR_POWER_SET",
888 	"WHAL_ERROR_RECV_STOPDMA",
889 	"WHAL_ERROR_RECV_STOPPCU",
890 	"WHAL_ERROR_RESET_CHANNF1",
891 	"WHAL_ERROR_RESET_CHANNF2",
892 	"WHAL_ERROR_RESET_PM",
893 	"WHAL_ERROR_RESET_OFFSETCAL",
894 	"WHAL_ERROR_RESET_RFGRANT",
895 	"WHAL_ERROR_RESET_RXFRAME",
896 	"WHAL_ERROR_RESET_STOPDMA",
897 	"WHAL_ERROR_RESET_ERRID",
898 	"WHAL_ERROR_RESET_ADCDCCAL1",
899 	"WHAL_ERROR_RESET_ADCDCCAL2",
900 	"WHAL_ERROR_RESET_TXIQCAL",
901 	"WHAL_ERROR_RESET_RXIQCAL",
902 	"WHAL_ERROR_RESET_CARRIERLEAK",
903 	"WHAL_ERROR_XMIT_COMPUTE",
904 	"WHAL_ERROR_XMIT_NOQUEUE",
905 	"WHAL_ERROR_XMIT_ACTIVEQUEUE",
906 	"WHAL_ERROR_XMIT_BADTYPE",
907 	"WHAL_ERROR_XMIT_STOPDMA",
908 	"WHAL_ERROR_INTERRUPT_BB_PANIC",
909 	"WHAL_ERROR_PAPRD_MAXGAIN_ABOVE_WINDOW",
910 	"WHAL_SMARTANT_CONFIGURE",
911 	"WHAL_SMARTANT_RXANTENNA",
912         "WHAL_TX_ENQUEUE",
913         "WHAL_CAL_SET_CAL_PERIOD",
914         "WHAL_CAL_PERFORM_CALIBRATION",
915 	"WHAL_DBGID_DEFINITION_END",
916 },
917 
918 {
919 	"COEX_DEBUGID_START",
920 	"BTCOEX_DBG_MCI_1",
921 	"BTCOEX_DBG_MCI_2",
922 	"BTCOEX_DBG_MCI_3",
923 	"BTCOEX_DBG_MCI_4",
924 	"BTCOEX_DBG_MCI_5",
925 	"BTCOEX_DBG_MCI_6",
926 	"BTCOEX_DBG_MCI_7",
927 	"BTCOEX_DBG_MCI_8",
928 	"BTCOEX_DBG_MCI_9",
929 	"BTCOEX_DBG_MCI_10",
930 	"COEX_WAL_BTCOEX_INIT",
931 	"COEX_WAL_PAUSE",
932 	"COEX_WAL_RESUME",
933 	"COEX_UPDATE_AFH",
934 	"COEX_HWQ_EMPTY_CB",
935 	"COEX_MCI_TIMER_HANDLER",
936 	"COEX_MCI_RECOVER",
937 	"ERROR_COEX_MCI_ISR",
938 	"ERROR_COEX_MCI_GPM",
939 	"COEX_ProfileType",
940 	"COEX_LinkID",
941 	"COEX_LinkState",
942 	"COEX_LinkRole",
943 	"COEX_LinkRate",
944 	"COEX_VoiceType",
945 	"COEX_TInterval",
946 	"COEX_WRetrx",
947 	"COEX_Attempts",
948 	"COEX_PerformanceState",
949 	"COEX_LinkType",
950 	"COEX_RX_MCI_GPM_VERSION_QUERY",
951 	"COEX_RX_MCI_GPM_VERSION_RESPONSE",
952 	"COEX_RX_MCI_GPM_STATUS_QUERY",
953 	"COEX_STATE_WLAN_VDEV_DOWN",
954 	"COEX_STATE_WLAN_VDEV_START",
955 	"COEX_STATE_WLAN_VDEV_CONNECTED",
956 	"COEX_STATE_WLAN_VDEV_SCAN_STARTED",
957 	"COEX_STATE_WLAN_VDEV_SCAN_END",
958 	"COEX_STATE_WLAN_DEFAULT",
959 	"COEX_CHANNEL_CHANGE",
960 	"COEX_POWER_CHANGE",
961 	"COEX_CONFIG_MGR",
962 	"COEX_TX_MCI_GPM_BT_CAL_REQ",
963 	"COEX_TX_MCI_GPM_BT_CAL_GRANT",
964 	"COEX_TX_MCI_GPM_BT_CAL_DONE",
965 	"COEX_TX_MCI_GPM_WLAN_CAL_REQ",
966 	"COEX_TX_MCI_GPM_WLAN_CAL_GRANT",
967 	"COEX_TX_MCI_GPM_WLAN_CAL_DONE",
968 	"COEX_TX_MCI_GPM_BT_DEBUG",
969 	"COEX_TX_MCI_GPM_VERSION_QUERY",
970 	"COEX_TX_MCI_GPM_VERSION_RESPONSE",
971 	"COEX_TX_MCI_GPM_STATUS_QUERY",
972 	"COEX_TX_MCI_GPM_HALT_BT_GPM",
973 	"COEX_TX_MCI_GPM_WLAN_CHANNELS",
974 	"COEX_TX_MCI_GPM_BT_PROFILE_INFO",
975 	"COEX_TX_MCI_GPM_BT_STATUS_UPDATE",
976 	"COEX_TX_MCI_GPM_BT_UPDATE_FLAGS",
977 	"COEX_TX_MCI_GPM_UNKNOWN",
978 	"COEX_TX_MCI_SYS_WAKING",
979 	"COEX_TX_MCI_LNA_TAKE",
980 	"COEX_TX_MCI_LNA_TRANS",
981 	"COEX_TX_MCI_SYS_SLEEPING",
982 	"COEX_TX_MCI_REQ_WAKE",
983 	"COEX_TX_MCI_REMOTE_RESET",
984 	"COEX_TX_MCI_TYPE_UNKNOWN",
985 	"COEX_WHAL_MCI_RESET",
986 	"COEX_POLL_BT_CAL_DONE_TIMEOUT",
987 	"COEX_WHAL_PAUSE",
988 	"COEX_RX_MCI_GPM_BT_CAL_REQ",
989 	"COEX_RX_MCI_GPM_BT_CAL_DONE",
990 	"COEX_RX_MCI_GPM_BT_CAL_GRANT",
991 	"COEX_WLAN_CAL_START",
992 	"COEX_WLAN_CAL_RESULT",
993 	"COEX_BtMciState",
994 	"COEX_BtCalState",
995 	"COEX_WlanCalState",
996 	"COEX_RxReqWakeCount",
997 	"COEX_RxRemoteResetCount",
998 	"COEX_RESTART_CAL",
999 	"COEX_SENDMSG_QUEUE",
1000 	"COEX_RESETSEQ_LNAINFO_TIMEOUT",
1001 	"COEX_MCI_ISR_IntRaw",
1002 	"COEX_MCI_ISR_Int1Raw",
1003 	"COEX_MCI_ISR_RxMsgRaw",
1004 	"COEX_WHAL_COEX_RESET",
1005 	"COEX_WAL_COEX_INIT",
1006 	"COEX_TXRX_CNT_LIMIT_ISR",
1007 	"COEX_CH_BUSY",
1008 	"COEX_REASSESS_WLAN_STATE",
1009 	"COEX_BTCOEX_WLAN_STATE_UPDATE",
1010 	"COEX_BT_NUM_OF_PROFILES",
1011 	"COEX_BT_NUM_OF_HID_PROFILES",
1012 	"COEX_BT_NUM_OF_ACL_PROFILES",
1013 	"COEX_BT_NUM_OF_HI_ACL_PROFILES",
1014 	"COEX_BT_NUM_OF_VOICE_PROFILES",
1015 	"COEX_WLAN_AGGR_LIMIT",
1016 	"COEX_BT_LOW_PRIO_BUDGET",
1017 	"COEX_BT_HI_PRIO_BUDGET",
1018 	"COEX_BT_IDLE_TIME",
1019 	"COEX_SET_COEX_WEIGHT",
1020 	"COEX_WLAN_WEIGHT_GROUP",
1021 	"COEX_BT_WEIGHT_GROUP",
1022 	"COEX_BT_INTERVAL_ALLOC",
1023 	"COEX_BT_SCHEME",
1024 	"COEX_BT_MGR",
1025 	"COEX_BT_SM_ERROR",
1026 	"COEX_SYSTEM_UPDATE",
1027 	"COEX_LOW_PRIO_LIMIT",
1028 	"COEX_HI_PRIO_LIMIT",
1029 	"COEX_BT_INTERVAL_START",
1030 	"COEX_WLAN_INTERVAL_START",
1031 	"COEX_NON_LINK_BUDGET",
1032 	"COEX_CONTENTION_MSG",
1033 	"COEX_SET_NSS",
1034 	"COEX_SELF_GEN_MASK",
1035 	"COEX_PROFILE_ERROR",
1036 	"COEX_WLAN_INIT",
1037 	"COEX_BEACON_MISS",
1038 	"COEX_BEACON_OK",
1039 	"COEX_BTCOEX_SCAN_ACTIVITY",
1040 	"COEX_SCAN_ACTIVITY",
1041 	"COEX_FORCE_QUIETTIME",
1042 	"COEX_BT_MGR_QUIETTIME",
1043 	"COEX_BT_INACTIVITY_TRIGGER",
1044 	"COEX_BT_INACTIVITY_REPORTED",
1045 	"COEX_TX_MCI_GPM_WLAN_PRIO",
1046 	"COEX_TX_MCI_GPM_BT_PAUSE_PROFILE",
1047 	"COEX_TX_MCI_GPM_WLAN_SET_ACL_INACTIVITY",
1048 	"COEX_RX_MCI_GPM_BT_ACL_INACTIVITY_REPORT",
1049 	"COEX_GENERIC_ERROR",
1050 	"COEX_RX_RATE_THRESHOLD",
1051 	"COEX_RSSI",
1052 	"COEX_WLAN_VDEV_NOTIF_START",
1053 	"COEX_WLAN_VDEV_NOTIF_UP",
1054 	"COEX_WLAN_VDEV_NOTIF_DOWN",
1055 	"COEX_WLAN_VDEV_NOTIF_STOP",
1056 	"COEX_WLAN_VDEV_NOTIF_ADD_PEER",
1057 	"COEX_WLAN_VDEV_NOTIF_DELETE_PEER",
1058 	"COEX_WLAN_VDEV_NOTIF_CONNECTED_PEER",
1059 	"COEX_WLAN_VDEV_NOTIF_PAUSE",
1060 	"COEX_WLAN_VDEV_NOTIF_UNPAUSED",
1061 	"COEX_STATE_WLAN_VDEV_PEER_ADD",
1062 	"COEX_STATE_WLAN_VDEV_CONNECTED_PEER",
1063 	"COEX_STATE_WLAN_VDEV_DELETE_PEER",
1064 	"COEX_STATE_WLAN_VDEV_PAUSE",
1065 	"COEX_STATE_WLAN_VDEV_UNPAUSED",
1066 	"COEX_SCAN_CALLBACK",
1067 	"COEX_RC_SET_CHAINMASK",
1068 	"COEX_DEBUG_ID_END",
1069 },
1070 
1071 {
1072 	"SCAN_START_COMMAND_FAILED",
1073 	"SCAN_STOP_COMMAND_FAILED",
1074 	"SCAN_EVENT_SEND_FAILED",
1075 	"SCAN_ENGINE_START",
1076 	"SCAN_ENGINE_CANCEL_COMMAND",
1077 	"SCAN_ENGINE_STOP_DUE_TO_TIMEOUT",
1078 	"SCAN_EVENT_SEND_TO_HOST",
1079 	"SCAN_EVENT_ADD",
1080 	"SCAN_EVENT_REM",
1081 	"SCAN_EVENT_PREEMPTED",
1082 	"SCAN_EVENT_RESTARTED",
1083 	"SCAN_EVENT_COMPLETED",
1084         "SCAN_START_PARAMS1",
1085         "SCAN_START_PARAMS2",
1086         "SCAN_EVENT_SEND",
1087 },
1088 
1089 {
1090 	"BEACON_EVENT_SWBA_SEND_FAILED",
1091 },
1092 
1093 {
1094 	"RATECTRL_DBGID_DEFINITION_START",
1095 	"RATECTRL_DBGID_ASSOC",
1096 	"RATECTRL_DBGID_NSS_CHANGE",
1097 	"RATECTRL_DBGID_CHAINMASK_ERR",
1098 	"RATECTRL_DBGID_UNEXPECTED_FRAME",
1099 	"RATECTRL_DBGID_WAL_RCQUERY",
1100 	"RATECTRL_DBGID_WAL_RCUPDATE",
1101 	"RATECTRL_DBGID_DEFINITION_END",
1102 },
1103 
1104 {
1105 	"AP_PS_DBGID_DEFINITION_START",
1106 	"AP_PS_DBGID_UPDATE_TIM",
1107 	"AP_PS_DBGID_PEER_STATE_CHANGE",
1108 	"AP_PS_DBGID_PSPOLL",
1109 	"AP_PS_DBGID_PEER_CREATE",
1110 	"AP_PS_DBGID_PEER_DELETE",
1111 	"AP_PS_DBGID_VDEV_CREATE",
1112 	"AP_PS_DBGID_VDEV_DELETE",
1113 	"AP_PS_DBGID_SYNC_TIM",
1114 	"AP_PS_DBGID_NEXT_RESPONSE",
1115 	"AP_PS_DBGID_START_SP",
1116 	"AP_PS_DBGID_COMPLETED_EOSP",
1117 	"AP_PS_DBGID_TRIGGER",
1118 	"AP_PS_DBGID_DUPLICATE_TRIGGER",
1119 	"AP_PS_DBGID_UAPSD_RESPONSE",
1120 	"AP_PS_DBGID_SEND_COMPLETE",
1121 	"AP_PS_DBGID_SEND_N_COMPLETE",
1122 	"AP_PS_DBGID_DETECT_OUT_OF_SYNC_STA",
1123 },
1124 
1125 {
1126 	"MGMT_TXRX_DBGID_DEFINITION_START",
1127 	"MGMT_TXRX_FORWARD_TO_HOST",
1128 	"MGMT_TXRX_MU_GID_MGMT",
1129 	"MGMT_TXRX_DBGID_DEFINITION_END",
1130 },
1131 
1132 {
1133 	"WAL_DBGID_DEFINITION_START",
1134 	"WAL_DBGID_FAST_WAKE_REQUEST",
1135 	"WAL_DBGID_FAST_WAKE_RELEASE",
1136 	"WAL_DBGID_SET_POWER_STATE",
1137 	"WAL_DBGID_CHANNEL_CHANGE_FORCE_RESET",
1138 	"WAL_DBGID_CHANNEL_CHANGE",
1139 	"WAL_DBGID_VDEV_START",
1140 	"WAL_DBGID_VDEV_STOP",
1141 	"WAL_DBGID_VDEV_UP",
1142 	"WAL_DBGID_VDEV_DOWN",
1143 	"WAL_DBGID_SW_WDOG_RESET",
1144 	"WAL_DBGID_TX_SCH_REGISTER_TIDQ",
1145 	"WAL_DBGID_TX_SCH_UNREGISTER_TIDQ",
1146 	"WAL_DBGID_TX_SCH_TICKLE_TIDQ",
1147 	"WAL_DBGID_XCESS_FAILURES",
1148 	"WAL_DBGID_AST_ADD_WDS_ENTRY",
1149 	"WAL_DBGID_AST_DEL_WDS_ENTRY",
1150 	"WAL_DBGID_AST_WDS_ENTRY_PEER_CHG",
1151 	"WAL_DBGID_AST_WDS_SRC_LEARN_FAIL",
1152 	"WAL_DBGID_STA_KICKOUT",
1153 	"WAL_DBGID_BAR_TX_FAIL",
1154 	"WAL_DBGID_BAR_ALLOC_FAIL",
1155 	"WAL_DBGID_LOCAL_DATA_TX_FAIL",
1156 	"WAL_DBGID_SECURITY_PM4_QUEUED",
1157 	"WAL_DBGID_SECURITY_GM1_QUEUED",
1158 	"WAL_DBGID_SECURITY_PM4_SENT",
1159 	"WAL_DBGID_SECURITY_ALLOW_DATA",
1160 	"WAL_DBGID_SECURITY_UCAST_KEY_SET",
1161 	"WAL_DBGID_SECURITY_MCAST_KEY_SET",
1162 	"WAL_DBGID_SECURITY_ENCR_EN",
1163 	"WAL_DBGID_BB_WDOG_TRIGGERED",
1164 	"WAL_DBGID_RX_LOCAL_BUFS_LWM",
1165 	"WAL_DBGID_RX_LOCAL_DROP_LARGE_MGMT",
1166 	"WAL_DBGID_VHT_ILLEGAL_RATE_PHY_ERR_DETECTED",
1167 	"WAL_DBGID_DEV_RESET",
1168 	"WAL_DBGID_TX_BA_SETUP",
1169 	"WAL_DBGID_RX_BA_SETUP",
1170 	"WAL_DBGID_DEV_TX_TIMEOUT",
1171 	"WAL_DBGID_DEV_RX_TIMEOUT",
1172 	"WAL_DBGID_STA_VDEV_XRETRY",
1173 	"WAL_DBGID_DCS",
1174 	"WAL_DBGID_HCM_BIN",
1175 	"WAL_DBGID_HCM_BIN_PENALIZE",
1176 	"WAL_DBGID_HCM_BIN_DEPENALIZE",
1177 	"WAL_DBGID_AST_UPDATE_WDS_ENTRY",
1178 	"WAL_DBGID_PEER_EXT_STATS",
1179 	"WAL_DBGID_TX_AC_BUFFER_SET",
1180 	"WAL_DBGID_AST_ENTRY_EXIST",
1181 	"WAL_DBGID_AST_ENTRY_FULL",
1182 	"WAL_DBGID_MGMT_TX_FAIL",
1183 	"WAL_DBGID_SET_M4_SENT_MANUALLY",
1184 	"WAL_DBGID_PROCESS_4_WAY_HANDSHAKE",
1185         "WAL_DBGID_SET_HW_FILTER",
1186         "WAL_DBGID_TX_PPDU_COMP_ERR",
1187         "WAL_DBGID_TX_ENC_KEY_DROP",
1188         "WAL_DBGID_PDEV_INFO_PRINT",
1189         "WAL_DBGID_VDEV_INFO_PRINT",
1190         "WAL_DBGID_LTEU_START_MU",
1191         "WAL_DBGID_LTEU_REPORT_MU",
1192         "WAL_DBGID_LTEU_SET_CONFIG1",
1193         "WAL_DBGID_LTEU_SET_CONFIG2",
1194         "WAL_DBGID_LTEU_SET_CONFIG3",
1195         "WAL_DBGID_LTEU_INIT",
1196         "WAL_DBGID_LTEU_MU_IN_PROGRESS",
1197         "WAL_DBGID_LTEU_END_MU",
1198         "WAL_DBGID_LTEU_PER_PKT_LOG1",
1199         "WAL_DBGID_LTEU_PER_PKT_LOG2",
1200         "WAL_DBGID_LTEU_PER_PKT_LOG3",
1201         "WAL_DBGID_LTEU_START_MU_PARAMS",
1202         "WAL_DBGID_LTEU_PKT_BASIC_MU",
1203         "WAL_DBGID_LTEU_PKT_ADV_MU",
1204         "WAL_DBGID_LTEU_PKT_BSSID_ENTRY",
1205         "WAL_DBGID_LTEU_PER_BSSID_MU",
1206         "WAL_DBGID_LTEU_COMPUTED_BSSID_MU",
1207         "WAL_DBGID_LTEU_TOTAL_BSSID_MU",
1208         "WAL_DBGID_LTEU_HIDDEN_NODE",
1209         "WAL_DBGID_LTEU_REPORT_MU1",
1210         "WAL_DBGID_LTEU_REPORT_MU2",
1211         "WAL_DBGID_LTEU_START_MU_PARAMS1",
1212         "WAL_DBGID_LTEU_START_MU_PARAMS2",
1213         "WAL_DBGID_LTEU_UPDATE_BSSID_MU",
1214         "WAL_DBGID_LTEU_BSSID_INDEX_MU",
1215         "WAL_DBGID_LTEU_BSSID_MU_INFO",
1216         "WAL_DBGID_LTEU_PKT_BINNING",
1217         "WAL_DBGID_LTEU_PKT_MU_DB_ENTRY",
1218         "WAL_DBGID_LTEU_MU_DB_ENTRY1",
1219         "WAL_DBGID_LTEU_MU_DB_ENTRY2",
1220 	"WAL_DBGID_DEFINITION_END",
1221 },
1222 
1223 {
1224 	"ANI_DBGID_POLL",
1225 	"ANI_DBGID_CONTROL",
1226 	"ANI_DBGID_OFDM_PARAMS",
1227 	"ANI_DBGID_CCK_PARAMS",
1228 	"ANI_DBGID_RESET",
1229 	"ANI_DBGID_RESTART",
1230 	"ANI_DBGID_OFDM_LEVEL",
1231 	"ANI_DBGID_CCK_LEVEL",
1232 	"ANI_DBGID_FIRSTEP",
1233 	"ANI_DBGID_CYCPWR",
1234 	"ANI_DBGID_MRC_CCK",
1235 	"ANI_DBGID_SELF_CORR_LOW",
1236 	"ANI_DBGID_ENABLE",
1237 	"ANI_DBGID_CURRENT_LEVEL",
1238 	"ANI_DBGID_POLL_PERIOD",
1239 	"ANI_DBGID_LISTEN_PERIOD",
1240 	"ANI_DBGID_OFDM_LEVEL_CFG",
1241 	"ANI_DBGID_CCK_LEVEL_CFG",
1242 },
1243 
1244 {
1245 	"OFFLOAD_MGR_DBGID_DEFINITION_START",
1246 	"OFFLOADMGR_REGISTER_OFFLOAD",
1247 	"OFFLOADMGR_DEREGISTER_OFFLOAD",
1248 	"OFFLOADMGR_NO_REG_DATA_HANDLERS",
1249 	"OFFLOADMGR_NO_REG_EVENT_HANDLERS",
1250 	"OFFLOADMGR_REG_OFFLOAD_FAILED",
1251 	"OFFLOADMGR_DBGID_DEFINITION_END",
1252 },
1253 
1254 {
1255 	"RESOURCE_DBGID_DEFINITION_START",
1256 	"RESOURCE_PEER_ALLOC",
1257 	"RESOURCE_PEER_FREE",
1258 	"RESOURCE_PEER_ALLOC_WAL_PEER",
1259 	"RESOURCE_DBGID_DEFINITION_END",
1260 },
1261 
1262 {
1263 	"WLAN_DCS_DBGID_INIT",
1264 	"WLAN_DCS_DBGID_WMI_CWINT",
1265 	"WLAN_DCS_DBGID_TIMER",
1266 	"WLAN_DCS_DBGID_CMDG",
1267 	"WLAN_DCS_DBGID_CMDS",
1268 	"WLAN_DCS_DBGID_DINIT",
1269 },
1270 
1271 {
1272 	"P2P_DBGID_DEFINITION_START",
1273 	"P2P_DEV_REGISTER",
1274 	"P2P_HANDLE_NOA",
1275 	"P2P_UPDATE_SCHEDULE_OPPS",
1276 	"P2P_UPDATE_SCHEDULE",
1277 	"P2P_UPDATE_START_TIME",
1278 	"P2P_UPDATE_START_TIME_DIFF_TSF32",
1279 	"P2P_UPDATE_START_TIME_FINAL",
1280 	"P2P_SETUP_SCHEDULE_TIMER",
1281 	"P2P_PROCESS_SCHEDULE_AFTER_CALC",
1282 	"P2P_PROCESS_SCHEDULE_STARTED_TIMER",
1283 	"P2P_CALC_SCHEDULES_FIRST_CALL_ALL_NEXT_EVENT",
1284 	"P2P_CALC_SCHEDULES_FIRST_VALUE",
1285 	"P2P_CALC_SCHEDULES_EARLIEST_NEXT_EVENT",
1286 	"P2P_CALC_SCHEDULES_SANITY_COUNT",
1287 	"P2P_CALC_SCHEDULES_CALL_ALL_NEXT_EVENT_FROM_WHILE_LOOP",
1288 	"P2P_CALC_SCHEDULES_TIMEOUT_1",
1289 	"P2P_CALC_SCHEDULES_TIMEOUT_2",
1290 	"P2P_FIND_ALL_NEXT_EVENTS_REQ_EXPIRED",
1291 	"P2P_FIND_ALL_NEXT_EVENTS_REQ_ACTIVE",
1292 	"P2P_FIND_NEXT_EVENT_REQ_NOT_STARTED",
1293 	"P2P_FIND_NEXT_EVENT_REQ_COMPLETE_NON_PERIODIC",
1294 	"P2P_FIND_NEXT_EVENT_IN_MID_OF_NOA",
1295 	"P2P_FIND_NEXT_EVENT_REQ_COMPLETE",
1296 	"P2P_SCHEDULE_TIMEOUT",
1297 	"P2P_CALC_SCHEDULES_ENTER",
1298 	"P2P_PROCESS_SCHEDULE_ENTER",
1299 	"P2P_FIND_ALL_NEXT_EVENTS_INDIVIDUAL_REQ_AFTER_CHANGE",
1300 	"P2P_FIND_ALL_NEXT_EVENTS_INDIVIDUAL_REQ_BEFORE_CHANGE",
1301 	"P2P_FIND_ALL_NEXT_EVENTS_ENTER",
1302 	"P2P_FIND_NEXT_EVENT_ENTER",
1303 	"P2P_NOA_GO_PRESENT",
1304 	"P2P_NOA_GO_ABSENT",
1305 	"P2P_GO_NOA_NOTIF",
1306 	"P2P_GO_TBTT_OFFSET",
1307 	"P2P_GO_GET_NOA_INFO",
1308 	"P2P_DBGID_DEFINITION_END",
1309 },
1310 
1311 {
1312 	"CSA_DBGID_DEFINITION_START",
1313 	"CSA_OFFLOAD_POOL_INIT",
1314 	"CSA_OFFLOAD_REGISTER_VDEV",
1315 	"CSA_OFFLOAD_DEREGISTER_VDEV",
1316 	"CSA_DEREGISTER_VDEV_ERROR",
1317 	"CSA_OFFLOAD_BEACON_RECEIVED",
1318 	"CSA_OFFLOAD_BEACON_CSA_RECV",
1319 	"CSA_OFFLOAD_CSA_RECV_ERROR_IE",
1320 	"CSA_OFFLOAD_CSA_TIMER_ERROR",
1321 	"CSA_OFFLOAD_CSA_TIMER_EXP",
1322 	"CSA_OFFLOAD_WMI_EVENT_ERROR",
1323 	"CSA_OFFLOAD_WMI_EVENT_SENT",
1324 	"CSA_OFFLOAD_WMI_CHANSWITCH_RECV",
1325 },
1326 
1327 {
1328 	"WLAN_CHATTER_DBGID_DEFINITION_START",
1329 	"WLAN_CHATTER_ENTER",
1330 	"WLAN_CHATTER_EXIT",
1331 	"WLAN_CHATTER_FILTER_HIT",
1332 	"WLAN_CHATTER_FILTER_MISS",
1333 	"WLAN_CHATTER_FILTER_FULL",
1334 	"WLAN_CHATTER_FILTER_TM_ADJ",
1335 	"WLAN_CHATTER_DBGID_DEFINITION_END",
1336 },
1337 
1338 {
1339 	"WOW_DBGID_DEFINITION_START",
1340 	"WOW_ENABLE_CMDID",
1341 	"WOW_RECV_DATA_PKT",
1342 	"WOW_WAKE_HOST_DATA",
1343 	"WOW_RECV_MGMT",
1344 	"WOW_WAKE_HOST_MGMT",
1345 	"WOW_RECV_EVENT",
1346 	"WOW_WAKE_HOST_EVENT",
1347 	"WOW_INIT",
1348 	"WOW_RECV_MAGIC_PKT",
1349 	"WOW_RECV_BITMAP_PATTERN",
1350 },
1351 
1352 {
1353 	"RTT_CALL_FLOW",
1354 	"RTT_REQ_SUB_TYPE",
1355 	"RTT_MEAS_REQ_HEAD",
1356 	"RTT_MEAS_REQ_BODY",
1357 	"RTT_INIT_GLOBAL_STATE",
1358 	"RTT_REPORT",
1359 	"RTT_ERROR_REPORT",
1360 	"RTT_TIMER_STOP",
1361 	"RTT_SEND_TM_FRAME",
1362 	"RTT_V3_RESP_CNT",
1363 	"RTT_V3_RESP_FINISH",
1364 	"RTT_CHANNEL_SWITCH_REQ",
1365 	"RTT_CHANNEL_SWITCH_GRANT",
1366 	"RTT_CHANNEL_SWITCH_COMPLETE",
1367 	"RTT_CHANNEL_SWITCH_PREEMPT",
1368 	"RTT_CHANNEL_SWITCH_STOP",
1369 	"RTT_TIMER_START",
1370 	"RTT_FTM_PARAM_INFO",
1371 	"RTT_RX_TM_FRAME",
1372 	"RTT_INITR_TSTAMP",
1373 	"RTT_RSPDR_TSTAMP",
1374 	"RTT_TX_COMP_STATUS",
1375 	"RTT_ERROR_WMI_EVENT"
1376 },
1377 
1378 {
1379 	"HOSTQ_HOST_PARAM_NUMPEER",
1380 	"HOSTQ_HOST_PARAM_NUMTID",
1381 	"HOSTQ_HOST_PARAM_HOSTADDR",
1382 },
1383 {
1384 	"WAL_DBGID_PFSCHED_SCH_CMD",
1385 	"WAL_DBGID_PFSCHED_USER_INFO",
1386 },
1387 {
1388 	"WLAN_DEBUG_MODULE_DBGID_START",
1389 	"WLAN_DEBUG_DBGID_PEER",
1390 	"WLAN_DEBUG_DBGID_PDEV",
1391 	"WLAN_DEBUG_DBGID_VDEV",
1392 	"WLAN_DEBUG_MODULE_DBGID_END",
1393 },
1394 };
1395 
1396 static char * fw_dbglog_get_msg(u32 moduleid, u32 debugid,
1397 				u32 mod_id_max,
1398 				char *(*dbg_msg_arr)[][MAX_DBG_MSGS])
1399 {
1400 	static char unknown_str[64];
1401 
1402 	if (moduleid < mod_id_max && debugid < MAX_DBG_MSGS) {
1403 		char *str = (*dbg_msg_arr)[moduleid][debugid];
1404 		if (str && str[0] != '\0') {
1405 			return str;
1406 		}
1407 	}
1408 
1409 	snprintf(unknown_str, sizeof(unknown_str),
1410 		 "UNKNOWN %u:%u",
1411 		 moduleid, debugid);
1412 
1413 	return unknown_str;
1414 }
1415 
1416 
1417 static void ath10k_fwlog_print(struct ath10k *ar, u32 mod_id, u16 vap_id,
1418 			       u32 dbg_id, u32 timestamp,
1419 			       u32 numargs, u32 *args) {
1420 
1421 	int i;
1422 	u32 module_id_max;
1423 	char *(*dbg_msg_arr)[][MAX_DBG_MSGS];
1424 
1425 #if defined(__linux__)
1426 	if ((ar->wmi.op_version ==
1427 #elif defined(__FreeBSD__)
1428 	if ((ar->running_fw->fw_file.wmi_op_version ==
1429 #endif
1430 	     ATH10K_FW_WMI_OP_VERSION_10_4)) {
1431 		module_id_max = WLAN_10_4_MODULE_ID_MAX;
1432 		dbg_msg_arr = &FW_10_4_DBG_MSG_ARR;
1433 	} else {
1434 		module_id_max = WLAN_MODULE_ID_MAX;
1435 		dbg_msg_arr = &DBG_MSG_ARR;
1436 	}
1437 
1438 	if (vap_id < FW_DBGLOG_VAPID_NUM_MAX)
1439 		printk(FW_DBGLOG_PRINT_PREFIX "[%u] vap-%u %s ( ",
1440 		       timestamp,
1441 		       vap_id, fw_dbglog_get_msg(mod_id, dbg_id,
1442 						 module_id_max,
1443 						 dbg_msg_arr));
1444 	else
1445 		printk(FW_DBGLOG_PRINT_PREFIX "[%u] %s ( ",
1446 		       timestamp,
1447 		       fw_dbglog_get_msg(mod_id, dbg_id,
1448 					 module_id_max, dbg_msg_arr));
1449 
1450 	 for (i = 0; i < numargs; i++) {
1451 		printk("%#x", args[i]);
1452 		if ((i + 1) < numargs)
1453 			printk(", ");
1454 	}
1455 
1456 	printk(" )\n");
1457 }
1458 
1459 static void ath10k_fwlog_parse_msg(struct ath10k *ar, u8 *data, int len) {
1460 
1461 	u32 *buffer;
1462 	u32 count;
1463 	u32 timestamp;
1464 	u32 debugid;
1465 	u32 moduleid;
1466 	u16 vapid;
1467 	u16 numargs;
1468 	u16 length;
1469 	u32 dropped;
1470 
1471 
1472 	if (len < 4) {
1473 		return;
1474 	}
1475 
1476 	dropped = *((u32 *)data);
1477 	data += sizeof(dropped);
1478 	len -= sizeof(dropped);
1479 
1480 	if (dropped > 0)
1481 		printk(FW_DBGLOG_PRINT_PREFIX "%d log buffers are dropped \n",
1482 		       dropped);
1483 
1484 	count = 0;
1485 	buffer = (u32 *)data;
1486 	length = (len >> 2);
1487 
1488 	while (count < length) {
1489 
1490 		debugid = FW_DBGLOG_GET_DBGID(buffer[count + 1]);
1491 		moduleid = FW_DBGLOG_GET_MODULEID(buffer[count + 1]);
1492 		vapid = FW_DBGLOG_GET_VAPID(buffer[count + 1]);
1493 		numargs = FW_DBGLOG_GET_NUMARGS(buffer[count + 1]);
1494 		timestamp = FW_DBGLOG_GET_TIME_STAMP(buffer[count]);
1495 
1496 		if (moduleid >= ar->fwlog_max_moduleid)
1497 			return;
1498 
1499 		printk("[%s] ", wiphy_name(ar->hw->wiphy));
1500 
1501 		ath10k_fwlog_print(ar, moduleid, vapid, debugid,
1502 			           timestamp, numargs,
1503 			           (((u32 *)buffer) +
1504 				   2 + count));
1505 		count += numargs + 2;
1506 
1507 	}
1508 }
1509 
1510 
1511 static void ath10k_fwlog_print_work(struct work_struct *work) {
1512 
1513 	struct ath10k *ar = container_of(work, struct ath10k, fwlog_tx_work);
1514 	struct sk_buff *skb;
1515 
1516 	skb = skb_dequeue(&ar->fwlog_tx_queue);
1517 	if (skb) {
1518 		ath10k_fwlog_parse_msg(ar, skb->data, skb->len);
1519 		dev_kfree_skb(skb);
1520 		if (skb_queue_len(&ar->fwlog_tx_queue)) {
1521 			ieee80211_queue_work(ar->hw,
1522 					     &ar->fwlog_tx_work);
1523 		}
1524 	}
1525 }
1526 
1527 void ath10k_handle_fwlog_msg(struct ath10k *ar, struct sk_buff *skb) {
1528 
1529 	if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) {
1530 		ath10k_warn(ar, "ignoring fwlog event!!!\n");
1531 		dev_kfree_skb(skb);
1532 		return;
1533 	}
1534 
1535 	if (skb_queue_len(&ar->fwlog_tx_queue) >= ATH10K_FWLOG_MAX_EVT_QUEUE) {
1536 		ath10k_warn(ar, "reached fwlog  queue limit\n");
1537 		dev_kfree_skb(skb);
1538 		return;
1539 	}
1540 
1541 	skb_queue_tail(&ar->fwlog_tx_queue, skb);
1542 	ieee80211_queue_work(ar->hw, &ar->fwlog_tx_work);
1543 }
1544 
1545 void ath10k_fwlog_register(struct ath10k *ar) {
1546 
1547 	INIT_WORK(&ar->fwlog_tx_work, ath10k_fwlog_print_work);
1548 	skb_queue_head_init(&ar->fwlog_tx_queue);
1549 }
1550 
1551 void ath10k_fwlog_unregister(struct ath10k *ar) {
1552 
1553 	struct sk_buff *skb;
1554 
1555 	cancel_work_sync(&ar->fwlog_tx_work);
1556 
1557 	for (; ;) {
1558 		skb = skb_dequeue(&ar->fwlog_tx_queue);
1559 		if (!skb)
1560 			break;
1561 		dev_kfree_skb(skb);
1562 	}
1563 }
1564