xref: /freebsd/sys/dev/ath/ath_hal/ah_diagcodes.h (revision 6472ac3d8a86336899b6cfb789a4cd9897e3fab5)
1 /*
2  * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
3  * Copyright (c) 2002-2008 Atheros Communications, Inc.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  *
17  * $FreeBSD$
18  */
19 #ifndef _ATH_AH_DIAGCODES_H_
20 #define _ATH_AH_DIAGCODES_H_
21 /*
22  * Atheros Device Hardware Access Layer (HAL).
23  *
24  * Internal diagnostic API definitions.
25  */
26 
27 /*
28  * Diagnostic interface.  This is an open-ended interface that
29  * is opaque to applications.  Diagnostic programs use this to
30  * retrieve internal data structures, etc.  There is no guarantee
31  * that calling conventions for calls other than HAL_DIAG_REVS
32  * are stable between HAL releases; a diagnostic application must
33  * use the HAL revision information to deal with ABI/API differences.
34  *
35  * NB: do not renumber these, certain codes are publicly used.
36  */
37 enum {
38 	HAL_DIAG_REVS		= 0,	/* MAC/PHY/Radio revs */
39 	HAL_DIAG_EEPROM		= 1,	/* EEPROM contents */
40 	HAL_DIAG_EEPROM_EXP_11A	= 2,	/* EEPROM 5112 power exp for 11a */
41 	HAL_DIAG_EEPROM_EXP_11B	= 3,	/* EEPROM 5112 power exp for 11b */
42 	HAL_DIAG_EEPROM_EXP_11G	= 4,	/* EEPROM 5112 power exp for 11g */
43 	HAL_DIAG_ANI_CURRENT	= 5,	/* ANI current channel state */
44 	HAL_DIAG_ANI_OFDM	= 6,	/* ANI OFDM timing error stats */
45 	HAL_DIAG_ANI_CCK	= 7,	/* ANI CCK timing error stats */
46 	HAL_DIAG_ANI_STATS	= 8,	/* ANI statistics */
47 	HAL_DIAG_RFGAIN		= 9,	/* RfGain GAIN_VALUES */
48 	HAL_DIAG_RFGAIN_CURSTEP	= 10,	/* RfGain GAIN_OPTIMIZATION_STEP */
49 	HAL_DIAG_PCDAC		= 11,	/* PCDAC table */
50 	HAL_DIAG_TXRATES	= 12,	/* Transmit rate table */
51 	HAL_DIAG_REGS		= 13,	/* Registers */
52 	HAL_DIAG_ANI_CMD	= 14,	/* ANI issue command (XXX do not change!) */
53 	HAL_DIAG_SETKEY		= 15,	/* Set keycache backdoor */
54 	HAL_DIAG_RESETKEY	= 16,	/* Reset keycache backdoor */
55 	HAL_DIAG_EEREAD		= 17,	/* Read EEPROM word */
56 	HAL_DIAG_EEWRITE	= 18,	/* Write EEPROM word */
57 	/* 19-26 removed, do not reuse */
58 	HAL_DIAG_RDWRITE	= 27,	/* Write regulatory domain */
59 	HAL_DIAG_RDREAD		= 28,	/* Get regulatory domain */
60 	HAL_DIAG_FATALERR	= 29,	/* Read cached interrupt state */
61 	HAL_DIAG_11NCOMPAT	= 30,	/* 11n compatibility tweaks */
62 	HAL_DIAG_ANI_PARAMS	= 31,	/* ANI noise immunity parameters */
63 	HAL_DIAG_CHECK_HANGS	= 32,	/* check h/w hangs */
64 	HAL_DIAG_SETREGS	= 33,	/* write registers */
65 	HAL_DIAG_CHANSURVEY	= 34,	/* channel survey */
66 };
67 
68 #endif /* _ATH_AH_DIAGCODES_H_ */
69