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