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