ar5212.h revision 1.1.1.1.20.1       1           1.1     alc /*
      2           1.1     alc  * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
      3           1.1     alc  * Copyright (c) 2002-2008 Atheros Communications, Inc.
      4           1.1     alc  *
      5           1.1     alc  * Permission to use, copy, modify, and/or distribute this software for any
      6           1.1     alc  * purpose with or without fee is hereby granted, provided that the above
      7           1.1     alc  * copyright notice and this permission notice appear in all copies.
      8           1.1     alc  *
      9           1.1     alc  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     10           1.1     alc  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     11           1.1     alc  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     12           1.1     alc  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     13           1.1     alc  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     14           1.1     alc  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     15           1.1     alc  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     16           1.1     alc  *
     17  1.1.1.1.20.1  bouyer  * $Id: ar5212.h,v 1.1.1.1.20.1 2011/03/05 15:10:36 bouyer Exp $
     18           1.1     alc  */
     19           1.1     alc #ifndef _ATH_AR5212_H_
     20           1.1     alc #define _ATH_AR5212_H_
     21           1.1     alc 
     22           1.1     alc #include "ah_eeprom.h"
     23           1.1     alc 
     24           1.1     alc #define	AR5212_MAGIC	0x19541014
     25           1.1     alc 
     26           1.1     alc /* DCU Transmit Filter macros */
     27           1.1     alc #define CALC_MMR(dcu, idx) \
     28           1.1     alc 	( (4 * dcu) + (idx < 32 ? 0 : (idx < 64 ? 1 : (idx < 96 ? 2 : 3))) )
     29           1.1     alc #define TXBLK_FROM_MMR(mmr) \
     30           1.1     alc 	(AR_D_TXBLK_BASE + ((mmr & 0x1f) << 6) + ((mmr & 0x20) >> 3))
     31           1.1     alc #define CALC_TXBLK_ADDR(dcu, idx)	(TXBLK_FROM_MMR(CALC_MMR(dcu, idx)))
     32           1.1     alc #define CALC_TXBLK_VALUE(idx)		(1 << (idx & 0x1f))
     33           1.1     alc 
     34           1.1     alc /* MAC register values */
     35           1.1     alc 
     36           1.1     alc #define INIT_INTERRUPT_MASK \
     37           1.1     alc 	( AR_IMR_TXERR  | AR_IMR_TXOK | AR_IMR_RXORN | \
     38           1.1     alc 	  AR_IMR_RXERR  | AR_IMR_RXOK | AR_IMR_TXURN | \
     39           1.1     alc 	  AR_IMR_HIUERR )
     40           1.1     alc #define INIT_BEACON_CONTROL \
     41           1.1     alc 	((INIT_RESET_TSF << 24)  | (INIT_BEACON_EN << 23) | \
     42           1.1     alc 	  (INIT_TIM_OFFSET << 16) | INIT_BEACON_PERIOD)
     43           1.1     alc 
     44           1.1     alc #define INIT_CONFIG_STATUS	0x00000000
     45           1.1     alc #define INIT_RSSI_THR		0x00000781	/* Missed beacon counter initialized to 0x7 (max is 0xff) */
     46           1.1     alc #define INIT_IQCAL_LOG_COUNT_MAX	0xF
     47           1.1     alc #define INIT_BCON_CNTRL_REG	0x00000000
     48           1.1     alc 
     49           1.1     alc #define INIT_USEC		40
     50           1.1     alc #define HALF_RATE_USEC		19 /* ((40 / 2) - 1 ) */
     51           1.1     alc #define QUARTER_RATE_USEC	9  /* ((40 / 4) - 1 ) */
     52           1.1     alc 
     53           1.1     alc #define RX_NON_FULL_RATE_LATENCY	63
     54           1.1     alc #define TX_HALF_RATE_LATENCY		108
     55           1.1     alc #define TX_QUARTER_RATE_LATENCY		216
     56           1.1     alc 
     57           1.1     alc #define IFS_SLOT_FULL_RATE	0x168 /* 9 us half, 40 MHz core clock (9*40) */
     58           1.1     alc #define IFS_SLOT_HALF_RATE	0x104 /* 13 us half, 20 MHz core clock (13*20) */
     59           1.1     alc #define IFS_SLOT_QUARTER_RATE	0xD2 /* 21 us quarter, 10 MHz core clock (21*10) */
     60           1.1     alc #define IFS_EIFS_FULL_RATE	0xE60 /* (74 + (2 * 9)) * 40MHz core clock */
     61           1.1     alc #define IFS_EIFS_HALF_RATE	0xDAC /* (149 + (2 * 13)) * 20MHz core clock */
     62           1.1     alc #define IFS_EIFS_QUARTER_RATE	0xD48 /* (298 + (2 * 21)) * 10MHz core clock */
     63           1.1     alc 
     64           1.1     alc #define ACK_CTS_TIMEOUT_11A	0x3E8 /* ACK timeout in 11a core clocks */
     65           1.1     alc 
     66           1.1     alc /* Tx frame start to tx data start delay */
     67           1.1     alc #define TX_FRAME_D_START_HALF_RATE 	0xc
     68           1.1     alc #define TX_FRAME_D_START_QUARTER_RATE 	0xd
     69           1.1     alc 
     70           1.1     alc /*
     71           1.1     alc  * Various fifo fill before Tx start, in 64-byte units
     72           1.1     alc  * i.e. put the frame in the air while still DMAing
     73           1.1     alc  */
     74           1.1     alc #define MIN_TX_FIFO_THRESHOLD	0x1
     75           1.1     alc #define MAX_TX_FIFO_THRESHOLD	((IEEE80211_MAX_LEN / 64) + 1)
     76           1.1     alc #define INIT_TX_FIFO_THRESHOLD	MIN_TX_FIFO_THRESHOLD
     77           1.1     alc 
     78           1.1     alc #define	HAL_DECOMP_MASK_SIZE	128	/* 1 byte per key */
     79           1.1     alc 
     80           1.1     alc /*
     81           1.1     alc  * Gain support.
     82           1.1     alc  */
     83           1.1     alc #define	NUM_CORNER_FIX_BITS		4
     84           1.1     alc #define	NUM_CORNER_FIX_BITS_5112	7
     85           1.1     alc #define	DYN_ADJ_UP_MARGIN		15
     86           1.1     alc #define	DYN_ADJ_LO_MARGIN		20
     87           1.1     alc #define	PHY_PROBE_CCK_CORRECTION	5
     88           1.1     alc #define	CCK_OFDM_GAIN_DELTA		15
     89           1.1     alc 
     90           1.1     alc enum GAIN_PARAMS {
     91           1.1     alc 	GP_TXCLIP,
     92           1.1     alc 	GP_PD90,
     93           1.1     alc 	GP_PD84,
     94           1.1     alc 	GP_GSEL,
     95           1.1     alc };
     96           1.1     alc 
     97           1.1     alc enum GAIN_PARAMS_5112 {
     98           1.1     alc 	GP_MIXGAIN_OVR,
     99           1.1     alc 	GP_PWD_138,
    100           1.1     alc 	GP_PWD_137,
    101           1.1     alc 	GP_PWD_136,
    102           1.1     alc 	GP_PWD_132,
    103           1.1     alc 	GP_PWD_131,
    104           1.1     alc 	GP_PWD_130,
    105           1.1     alc };
    106           1.1     alc 
    107           1.1     alc typedef struct _gainOptStep {
    108           1.1     alc 	int16_t	paramVal[NUM_CORNER_FIX_BITS_5112];
    109           1.1     alc 	int32_t	stepGain;
    110           1.1     alc 	int8_t	stepName[16];
    111           1.1     alc } GAIN_OPTIMIZATION_STEP;
    112           1.1     alc 
    113           1.1     alc typedef struct {
    114           1.1     alc 	uint32_t	numStepsInLadder;
    115           1.1     alc 	uint32_t	defaultStepNum;
    116           1.1     alc 	GAIN_OPTIMIZATION_STEP optStep[10];
    117           1.1     alc } GAIN_OPTIMIZATION_LADDER;
    118           1.1     alc 
    119           1.1     alc typedef struct {
    120           1.1     alc 	uint32_t	currStepNum;
    121           1.1     alc 	uint32_t	currGain;
    122           1.1     alc 	uint32_t	targetGain;
    123           1.1     alc 	uint32_t	loTrig;
    124           1.1     alc 	uint32_t	hiTrig;
    125           1.1     alc 	uint32_t	gainFCorrection;
    126           1.1     alc 	uint32_t	active;
    127           1.1     alc 	const GAIN_OPTIMIZATION_STEP *currStep;
    128           1.1     alc } GAIN_VALUES;
    129           1.1     alc 
    130           1.1     alc /* RF HAL structures */
    131           1.1     alc typedef struct RfHalFuncs {
    132           1.1     alc 	void	  *priv;		/* private state */
    133           1.1     alc 
    134           1.1     alc 	void	  (*rfDetach)(struct ath_hal *ah);
    135           1.1     alc 	void	  (*writeRegs)(struct ath_hal *,
    136           1.1     alc 			u_int modeIndex, u_int freqIndex, int regWrites);
    137           1.1     alc 	uint32_t *(*getRfBank)(struct ath_hal *ah, int bank);
    138           1.1     alc 	HAL_BOOL  (*setChannel)(struct ath_hal *, HAL_CHANNEL_INTERNAL *);
    139           1.1     alc 	HAL_BOOL  (*setRfRegs)(struct ath_hal *,
    140           1.1     alc 		      HAL_CHANNEL_INTERNAL *, uint16_t modesIndex,
    141           1.1     alc 		      uint16_t *rfXpdGain);
    142           1.1     alc 	HAL_BOOL  (*setPowerTable)(struct ath_hal *ah,
    143           1.1     alc 		      int16_t *minPower, int16_t *maxPower,
    144           1.1     alc 		      HAL_CHANNEL_INTERNAL *, uint16_t *rfXpdGain);
    145           1.1     alc 	HAL_BOOL  (*getChannelMaxMinPower)(struct ath_hal *ah, HAL_CHANNEL *,
    146           1.1     alc 		      int16_t *maxPow, int16_t *minPow);
    147           1.1     alc 	int16_t	  (*getNfAdjust)(struct ath_hal *, const HAL_CHANNEL_INTERNAL*);
    148           1.1     alc } RF_HAL_FUNCS;
    149           1.1     alc 
    150           1.1     alc struct ar5212AniParams {
    151           1.1     alc 	int		maxNoiseImmunityLevel;	/* [0..4] */
    152           1.1     alc 	int		totalSizeDesired[5];
    153           1.1     alc 	int		coarseHigh[5];
    154           1.1     alc 	int		coarseLow[5];
    155           1.1     alc 	int		firpwr[5];
    156           1.1     alc 
    157           1.1     alc 	int		maxSpurImmunityLevel;	/* [0..7] */
    158           1.1     alc 	int		cycPwrThr1[8];
    159           1.1     alc 
    160           1.1     alc 	int		maxFirstepLevel;	/* [0..2] */
    161           1.1     alc 	int		firstep[3];
    162           1.1     alc 
    163           1.1     alc 	uint32_t	ofdmTrigHigh;
    164           1.1     alc 	uint32_t	ofdmTrigLow;
    165           1.1     alc 	uint32_t	cckTrigHigh;
    166           1.1     alc 	uint32_t	cckTrigLow;
    167           1.1     alc 	int32_t		rssiThrLow;
    168           1.1     alc 	uint32_t	rssiThrHigh;
    169           1.1     alc 
    170           1.1     alc 	int		period;			/* update listen period */
    171           1.1     alc 
    172           1.1     alc 	/* NB: intentionally ordered so data exported to user space is first */
    173           1.1     alc 	uint32_t	ofdmPhyErrBase;	/* Base value for ofdm err counter */
    174           1.1     alc 	uint32_t	cckPhyErrBase;	/* Base value for cck err counters */
    175           1.1     alc };
    176           1.1     alc 
    177           1.1     alc /*
    178           1.1     alc  * Per-channel ANI state private to the driver.
    179           1.1     alc  */
    180           1.1     alc struct ar5212AniState {
    181           1.1     alc 	uint8_t		noiseImmunityLevel;
    182           1.1     alc 	uint8_t		spurImmunityLevel;
    183           1.1     alc 	uint8_t		firstepLevel;
    184           1.1     alc 	uint8_t		ofdmWeakSigDetectOff;
    185           1.1     alc 	uint8_t		cckWeakSigThreshold;
    186           1.1     alc 	uint32_t	listenTime;
    187           1.1     alc 
    188           1.1     alc 	/* NB: intentionally ordered so data exported to user space is first */
    189           1.1     alc 	HAL_CHANNEL	c;
    190           1.1     alc 	HAL_BOOL	isSetup;	/* has state to do a restore */
    191           1.1     alc 	uint32_t	txFrameCount;	/* Last txFrameCount */
    192           1.1     alc 	uint32_t	rxFrameCount;	/* Last rx Frame count */
    193           1.1     alc 	uint32_t	cycleCount;	/* Last cycleCount
    194           1.1     alc 					   (to detect wrap-around) */
    195           1.1     alc 	uint32_t	ofdmPhyErrCount;/* OFDM err count since last reset */
    196           1.1     alc 	uint32_t	cckPhyErrCount;	/* CCK err count since last reset */
    197           1.1     alc 
    198           1.1     alc 	const struct ar5212AniParams *params;
    199           1.1     alc };
    200           1.1     alc 
    201           1.1     alc #define	HAL_ANI_ENA		0x00000001	/* ANI operation enabled */
    202           1.1     alc #define	HAL_RSSI_ANI_ENA	0x00000002	/* rssi-based processing ena'd*/
    203           1.1     alc 
    204           1.1     alc struct ar5212Stats {
    205           1.1     alc 	uint32_t	ast_ani_niup;	/* ANI increased noise immunity */
    206           1.1     alc 	uint32_t	ast_ani_nidown;	/* ANI decreased noise immunity */
    207           1.1     alc 	uint32_t	ast_ani_spurup;	/* ANI increased spur immunity */
    208           1.1     alc 	uint32_t	ast_ani_spurdown;/* ANI descreased spur immunity */
    209           1.1     alc 	uint32_t	ast_ani_ofdmon;	/* ANI OFDM weak signal detect on */
    210           1.1     alc 	uint32_t	ast_ani_ofdmoff;/* ANI OFDM weak signal detect off */
    211           1.1     alc 	uint32_t	ast_ani_cckhigh;/* ANI CCK weak signal threshold high */
    212           1.1     alc 	uint32_t	ast_ani_ccklow;	/* ANI CCK weak signal threshold low */
    213           1.1     alc 	uint32_t	ast_ani_stepup;	/* ANI increased first step level */
    214           1.1     alc 	uint32_t	ast_ani_stepdown;/* ANI decreased first step level */
    215           1.1     alc 	uint32_t	ast_ani_ofdmerrs;/* ANI cumulative ofdm phy err count */
    216           1.1     alc 	uint32_t	ast_ani_cckerrs;/* ANI cumulative cck phy err count */
    217           1.1     alc 	uint32_t	ast_ani_reset;	/* ANI parameters zero'd for non-STA */
    218           1.1     alc 	uint32_t	ast_ani_lzero;	/* ANI listen time forced to zero */
    219           1.1     alc 	uint32_t	ast_ani_lneg;	/* ANI listen time calculated < 0 */
    220           1.1     alc 	HAL_MIB_STATS	ast_mibstats;	/* MIB counter stats */
    221           1.1     alc 	HAL_NODE_STATS	ast_nodestats;	/* Latest rssi stats from driver */
    222           1.1     alc };
    223           1.1     alc 
    224           1.1     alc /*
    225           1.1     alc  * NF Cal history buffer
    226           1.1     alc  */
    227           1.1     alc #define	AR5212_CCA_MAX_GOOD_VALUE	-95
    228           1.1     alc #define	AR5212_CCA_MAX_HIGH_VALUE	-62
    229           1.1     alc #define	AR5212_CCA_MIN_BAD_VALUE	-125
    230           1.1     alc 
    231           1.1     alc #define	AR512_NF_CAL_HIST_MAX		5
    232           1.1     alc 
    233           1.1     alc struct ar5212NfCalHist {
    234           1.1     alc 	int16_t		nfCalBuffer[AR512_NF_CAL_HIST_MAX];
    235           1.1     alc 	int16_t		privNF;
    236           1.1     alc 	uint8_t		currIndex;
    237           1.1     alc 	uint8_t		first_run;
    238           1.1     alc 	uint8_t		invalidNFcount;
    239           1.1     alc };
    240           1.1     alc 
    241           1.1     alc struct ath_hal_5212 {
    242           1.1     alc 	struct ath_hal_private	ah_priv;	/* base class */
    243           1.1     alc 
    244           1.1     alc 	/*
    245           1.1     alc 	 * Per-chip common Initialization data.
    246           1.1     alc 	 * NB: RF backends have their own ini data.
    247           1.1     alc 	 */
    248           1.1     alc 	HAL_INI_ARRAY	ah_ini_modes;
    249           1.1     alc 	HAL_INI_ARRAY	ah_ini_common;
    250           1.1     alc 
    251           1.1     alc 	GAIN_VALUES	ah_gainValues;
    252           1.1     alc 
    253           1.1     alc 	uint8_t		ah_macaddr[IEEE80211_ADDR_LEN];
    254           1.1     alc 	uint8_t		ah_bssid[IEEE80211_ADDR_LEN];
    255           1.1     alc 	uint8_t		ah_bssidmask[IEEE80211_ADDR_LEN];
    256           1.1     alc 
    257           1.1     alc 	/*
    258           1.1     alc 	 * Runtime state.
    259           1.1     alc 	 */
    260           1.1     alc 	uint32_t	ah_maskReg;		/* copy of AR_IMR */
    261           1.1     alc 	struct ar5212Stats ah_stats;		/* various statistics */
    262           1.1     alc 	RF_HAL_FUNCS	*ah_rfHal;
    263           1.1     alc 	uint32_t	ah_txDescMask;		/* mask for TXDESC */
    264           1.1     alc 	uint32_t	ah_txOkInterruptMask;
    265           1.1     alc 	uint32_t	ah_txErrInterruptMask;
    266           1.1     alc 	uint32_t	ah_txDescInterruptMask;
    267           1.1     alc 	uint32_t	ah_txEolInterruptMask;
    268           1.1     alc 	uint32_t	ah_txUrnInterruptMask;
    269           1.1     alc 	HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES];
    270           1.1     alc 	uint32_t	ah_intrTxqs;		/* tx q interrupt state */
    271           1.1     alc 						/* decomp mask array */
    272           1.1     alc 	uint8_t		ah_decompMask[HAL_DECOMP_MASK_SIZE];
    273           1.1     alc 	HAL_POWER_MODE	ah_powerMode;
    274           1.1     alc 	HAL_ANT_SETTING ah_antControl;		/* antenna setting */
    275           1.1     alc 	HAL_BOOL	ah_diversity;		/* fast diversity setting */
    276           1.1     alc 	enum {
    277           1.1     alc 		IQ_CAL_INACTIVE,
    278           1.1     alc 		IQ_CAL_RUNNING,
    279           1.1     alc 		IQ_CAL_DONE
    280           1.1     alc 	} ah_bIQCalibration;			/* IQ calibrate state */
    281           1.1     alc 	HAL_RFGAIN	ah_rfgainState;		/* RF gain calibrartion state */
    282           1.1     alc 	uint32_t	ah_tx6PowerInHalfDbm;	/* power output for 6Mb tx */
    283           1.1     alc 	uint32_t	ah_staId1Defaults;	/* STA_ID1 default settings */
    284           1.1     alc 	uint32_t	ah_miscMode;		/* MISC_MODE settings */
    285           1.1     alc 	uint32_t	ah_rssiThr;		/* RSSI_THR settings */
    286           1.1     alc 	HAL_BOOL	ah_cwCalRequire;	/* for ap51 */
    287           1.1     alc 	HAL_BOOL	ah_tpcEnabled;		/* per-packet tpc enabled */
    288           1.1     alc 	HAL_BOOL	ah_phyPowerOn;		/* PHY power state */
    289           1.1     alc 	HAL_BOOL	ah_isHb63;		/* cached HB63 check */
    290           1.1     alc 	uint32_t	ah_macTPC;		/* tpc register */
    291           1.1     alc 	uint32_t	ah_beaconInterval;	/* XXX */
    292           1.1     alc 	enum {
    293           1.1     alc 		AUTO_32KHZ,		/* use it if 32kHz crystal present */
    294           1.1     alc 		USE_32KHZ,		/* do it regardless */
    295           1.1     alc 		DONT_USE_32KHZ,		/* don't use it regardless */
    296           1.1     alc 	} ah_enable32kHzClock;			/* whether to sleep at 32kHz */
    297           1.1     alc 	uint32_t	ah_ofdmTxPower;
    298           1.1     alc 	int16_t		ah_txPowerIndexOffset;
    299           1.1     alc 	/*
    300           1.1     alc 	 * Noise floor cal histogram support.
    301           1.1     alc 	 */
    302           1.1     alc 	struct ar5212NfCalHist ah_nfCalHist;
    303           1.1     alc 
    304           1.1     alc 	u_int		ah_slottime;		/* user-specified slot time */
    305           1.1     alc 	u_int		ah_acktimeout;		/* user-specified ack timeout */
    306           1.1     alc 	u_int		ah_ctstimeout;		/* user-specified cts timeout */
    307           1.1     alc 	u_int		ah_sifstime;		/* user-specified sifs time */
    308           1.1     alc 	/*
    309           1.1     alc 	 * RF Silent handling; setup according to the EEPROM.
    310           1.1     alc 	 */
    311           1.1     alc 	uint32_t	ah_gpioSelect;		/* GPIO pin to use */
    312           1.1     alc 	uint32_t	ah_polarity;		/* polarity to disable RF */
    313           1.1     alc 	uint32_t	ah_gpioBit;		/* after init, prev value */
    314           1.1     alc 	/*
    315           1.1     alc 	 * ANI support.
    316           1.1     alc 	 */
    317           1.1     alc 	uint32_t	ah_procPhyErr;		/* Process Phy errs */
    318           1.1     alc 	HAL_BOOL	ah_hasHwPhyCounters;	/* Hardware has phy counters */
    319           1.1     alc 	struct ar5212AniParams ah_aniParams24;	/* 2.4GHz parameters */
    320           1.1     alc 	struct ar5212AniParams ah_aniParams5;	/* 5GHz parameters */
    321           1.1     alc 	struct ar5212AniState	*ah_curani;	/* cached last reference */
    322           1.1     alc 	struct ar5212AniState	ah_ani[64];	/* per-channel state */
    323           1.1     alc 
    324           1.1     alc 	/*
    325           1.1     alc 	 * Transmit power state.  Note these are maintained
    326           1.1     alc 	 * here so they can be retrieved by diagnostic tools.
    327           1.1     alc 	 */
    328           1.1     alc 	uint16_t	*ah_pcdacTable;
    329           1.1     alc 	u_int		ah_pcdacTableSize;
    330           1.1     alc 	uint16_t	ah_ratesArray[16];
    331  1.1.1.1.20.1  bouyer 
    332  1.1.1.1.20.1  bouyer 	uint8_t		ah_txTrigLev;		/* current Tx trigger level */
    333  1.1.1.1.20.1  bouyer 	uint8_t		ah_maxTxTrigLev;	/* max tx trigger level */
    334           1.1     alc };
    335           1.1     alc #define	AH5212(_ah)	((struct ath_hal_5212 *)(_ah))
    336           1.1     alc 
    337           1.1     alc /*
    338           1.1     alc  * IS_XXXX macros test the MAC version
    339           1.1     alc  * IS_RADXXX macros test the radio/RF version (matching both 2G-only and 2/5G)
    340           1.1     alc  *
    341           1.1     alc  * Some single chip radios have equivalent radio/RF (e.g. 5112)
    342           1.1     alc  * for those use IS_RADXXX_ANY macros.
    343           1.1     alc  */
    344           1.1     alc #define IS_2317(ah) \
    345           1.1     alc 	((AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV1) || \
    346           1.1     alc 	 (AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV2))
    347           1.1     alc #define	IS_2316(ah) \
    348           1.1     alc 	(AH_PRIVATE(ah)->ah_macVersion == AR_SREV_2415)
    349           1.1     alc #define	IS_2413(ah) \
    350           1.1     alc 	(AH_PRIVATE(ah)->ah_macVersion == AR_SREV_2413 || IS_2316(ah))
    351           1.1     alc #define IS_5424(ah) \
    352           1.1     alc 	(AH_PRIVATE(ah)->ah_macVersion == AR_SREV_5424 || \
    353           1.1     alc 	(AH_PRIVATE(ah)->ah_macVersion == AR_SREV_5413 && \
    354           1.1     alc 	  AH_PRIVATE(ah)->ah_macRev <= AR_SREV_D2PLUS_MS))
    355           1.1     alc #define IS_5413(ah) \
    356           1.1     alc 	(AH_PRIVATE(ah)->ah_macVersion == AR_SREV_5413 || IS_5424(ah))
    357           1.1     alc #define IS_2425(ah) \
    358           1.1     alc 	(AH_PRIVATE(ah)->ah_macVersion == AR_SREV_2425)
    359           1.1     alc #define IS_2417(ah) \
    360           1.1     alc 	((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_2417)
    361           1.1     alc #define IS_HB63(ah)		(AH5212(ah)->ah_isHb63 == AH_TRUE)
    362           1.1     alc 
    363           1.1     alc #define	AH_RADIO_MAJOR(ah) \
    364           1.1     alc 	(AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR)
    365           1.1     alc #define	AH_RADIO_MINOR(ah) \
    366           1.1     alc 	(AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MINOR)
    367           1.1     alc #define	IS_RAD5111(ah) \
    368           1.1     alc 	(AH_RADIO_MAJOR(ah) == AR_RAD5111_SREV_MAJOR || \
    369           1.1     alc 	 AH_RADIO_MAJOR(ah) == AR_RAD2111_SREV_MAJOR)
    370           1.1     alc #define	IS_RAD5112(ah) \
    371           1.1     alc 	(AH_RADIO_MAJOR(ah) == AR_RAD5112_SREV_MAJOR || \
    372           1.1     alc 	 AH_RADIO_MAJOR(ah) == AR_RAD2112_SREV_MAJOR)
    373           1.1     alc /* NB: does not include 5413 as Atheros' IS_5112 macro does */
    374           1.1     alc #define	IS_RAD5112_ANY(ah) \
    375           1.1     alc 	(AR_RAD5112_SREV_MAJOR <= AH_RADIO_MAJOR(ah) && \
    376           1.1     alc 	 AH_RADIO_MAJOR(ah) <= AR_RAD2413_SREV_MAJOR)
    377           1.1     alc #define	IS_RAD5112_REV1(ah) \
    378           1.1     alc 	(IS_RAD5112(ah) && \
    379           1.1     alc 	 AH_RADIO_MINOR(ah) < (AR_RAD5112_SREV_2_0 & AR_RADIO_SREV_MINOR))
    380           1.1     alc #define IS_RADX112_REV2(ah) \
    381           1.1     alc 	(AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD5112_SREV_2_0 || \
    382           1.1     alc 	 AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD2112_SREV_2_0 || \
    383           1.1     alc 	 AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD2112_SREV_2_1 || \
    384           1.1     alc 	 AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD5112_SREV_2_1)
    385           1.1     alc 
    386           1.1     alc #define	ar5212RfDetach(ah) do {				\
    387           1.1     alc 	if (AH5212(ah)->ah_rfHal != AH_NULL)		\
    388           1.1     alc 		AH5212(ah)->ah_rfHal->rfDetach(ah);	\
    389           1.1     alc } while (0)
    390           1.1     alc #define	ar5212GetRfBank(ah, b) \
    391           1.1     alc 	AH5212(ah)->ah_rfHal->getRfBank(ah, b)
    392           1.1     alc 
    393           1.1     alc /*
    394           1.1     alc  * Hack macros for Nala/San: 11b is handled
    395           1.1     alc  * using 11g; flip the channel flags to accomplish this.
    396           1.1     alc  */
    397           1.1     alc #define SAVE_CCK(_ah, _chan, _flag) do {			\
    398           1.1     alc 	if ((IS_2425(_ah) || IS_2417(_ah)) &&			\
    399           1.1     alc 	    (((_chan)->channelFlags) & CHANNEL_CCK)) {		\
    400           1.1     alc 		(_chan)->channelFlags &= ~CHANNEL_CCK;		\
    401           1.1     alc 		(_chan)->channelFlags |= CHANNEL_OFDM;		\
    402           1.1     alc 		(_flag) = AH_TRUE;				\
    403           1.1     alc 	}							\
    404           1.1     alc } while (0)
    405           1.1     alc #define RESTORE_CCK(_ah, _chan, _flag) do {                     \
    406           1.1     alc 	if ((IS_2425(_ah) || IS_2417(_ah)) && (_flag) == AH_TRUE) {\
    407           1.1     alc 		(_chan)->channelFlags &= ~CHANNEL_OFDM;		\
    408           1.1     alc 		(_chan)->channelFlags |= CHANNEL_CCK;		\
    409           1.1     alc 	}							\
    410           1.1     alc } while (0)
    411           1.1     alc 
    412           1.1     alc struct ath_hal;
    413           1.1     alc 
    414           1.1     alc extern	uint32_t ar5212GetRadioRev(struct ath_hal *ah);
    415           1.1     alc extern	void ar5212InitState(struct ath_hal_5212 *, uint16_t devid, HAL_SOFTC,
    416           1.1     alc 		HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);
    417           1.1     alc extern	void ar5212Detach(struct ath_hal *ah);
    418           1.1     alc extern  HAL_BOOL ar5212ChipTest(struct ath_hal *ah);
    419           1.1     alc extern  HAL_BOOL ar5212GetChannelEdges(struct ath_hal *ah,
    420           1.1     alc                 uint16_t flags, uint16_t *low, uint16_t *high);
    421           1.1     alc extern	HAL_BOOL ar5212FillCapabilityInfo(struct ath_hal *ah);
    422           1.1     alc 
    423           1.1     alc extern	void ar5212SetBeaconTimers(struct ath_hal *ah,
    424           1.1     alc 		const HAL_BEACON_TIMERS *);
    425           1.1     alc extern	void ar5212BeaconInit(struct ath_hal *ah,
    426           1.1     alc 		uint32_t next_beacon, uint32_t beacon_period);
    427           1.1     alc extern	void ar5212ResetStaBeaconTimers(struct ath_hal *ah);
    428           1.1     alc extern	void ar5212SetStaBeaconTimers(struct ath_hal *ah,
    429           1.1     alc 		const HAL_BEACON_STATE *);
    430           1.1     alc 
    431           1.1     alc extern	HAL_BOOL ar5212IsInterruptPending(struct ath_hal *ah);
    432           1.1     alc extern	HAL_BOOL ar5212GetPendingInterrupts(struct ath_hal *ah, HAL_INT *);
    433           1.1     alc extern	HAL_INT ar5212GetInterrupts(struct ath_hal *ah);
    434           1.1     alc extern	HAL_INT ar5212SetInterrupts(struct ath_hal *ah, HAL_INT ints);
    435           1.1     alc 
    436           1.1     alc extern	uint32_t ar5212GetKeyCacheSize(struct ath_hal *);
    437           1.1     alc extern	HAL_BOOL ar5212IsKeyCacheEntryValid(struct ath_hal *, uint16_t entry);
    438           1.1     alc extern	HAL_BOOL ar5212ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry);
    439           1.1     alc extern	HAL_BOOL ar5212SetKeyCacheEntryMac(struct ath_hal *,
    440           1.1     alc 			uint16_t entry, const uint8_t *mac);
    441           1.1     alc extern	HAL_BOOL ar5212SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry,
    442           1.1     alc                        const HAL_KEYVAL *k, const uint8_t *mac, int xorKey);
    443           1.1     alc 
    444           1.1     alc extern	void ar5212GetMacAddress(struct ath_hal *ah, uint8_t *mac);
    445           1.1     alc extern	HAL_BOOL ar5212SetMacAddress(struct ath_hal *ah, const uint8_t *);
    446           1.1     alc extern	void ar5212GetBssIdMask(struct ath_hal *ah, uint8_t *mac);
    447           1.1     alc extern	HAL_BOOL ar5212SetBssIdMask(struct ath_hal *, const uint8_t *);
    448           1.1     alc extern	HAL_BOOL ar5212EepromRead(struct ath_hal *, u_int off, uint16_t *data);
    449           1.1     alc extern	HAL_BOOL ar5212EepromWrite(struct ath_hal *, u_int off, uint16_t data);
    450           1.1     alc extern	HAL_BOOL ar5212SetRegulatoryDomain(struct ath_hal *ah,
    451           1.1     alc 		uint16_t regDomain, HAL_STATUS *stats);
    452           1.1     alc extern	u_int ar5212GetWirelessModes(struct ath_hal *ah);
    453           1.1     alc extern	void ar5212EnableRfKill(struct ath_hal *);
    454           1.1     alc extern	HAL_BOOL ar5212GpioCfgOutput(struct ath_hal *, uint32_t gpio);
    455           1.1     alc extern	HAL_BOOL ar5212GpioCfgInput(struct ath_hal *, uint32_t gpio);
    456           1.1     alc extern	HAL_BOOL ar5212GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val);
    457           1.1     alc extern	uint32_t ar5212GpioGet(struct ath_hal *ah, uint32_t gpio);
    458           1.1     alc extern	void ar5212GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel);
    459           1.1     alc extern	void ar5212SetLedState(struct ath_hal *ah, HAL_LED_STATE state);
    460           1.1     alc extern	void ar5212WriteAssocid(struct ath_hal *ah, const uint8_t *bssid,
    461           1.1     alc 		uint16_t assocId);
    462           1.1     alc extern	uint32_t ar5212GetTsf32(struct ath_hal *ah);
    463           1.1     alc extern	uint64_t ar5212GetTsf64(struct ath_hal *ah);
    464           1.1     alc extern	void ar5212ResetTsf(struct ath_hal *ah);
    465           1.1     alc extern	void ar5212SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *pSet);
    466           1.1     alc extern	uint32_t ar5212GetRandomSeed(struct ath_hal *ah);
    467           1.1     alc extern	HAL_BOOL ar5212DetectCardPresent(struct ath_hal *ah);
    468           1.1     alc extern	void ar5212EnableMibCounters(struct ath_hal *);
    469           1.1     alc extern	void ar5212DisableMibCounters(struct ath_hal *);
    470           1.1     alc extern	void ar5212UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS* stats);
    471           1.1     alc extern	HAL_BOOL ar5212IsJapanChannelSpreadSupported(struct ath_hal *ah);
    472           1.1     alc extern	uint32_t ar5212GetCurRssi(struct ath_hal *ah);
    473           1.1     alc extern	u_int ar5212GetDefAntenna(struct ath_hal *ah);
    474           1.1     alc extern	void ar5212SetDefAntenna(struct ath_hal *ah, u_int antenna);
    475           1.1     alc extern	HAL_ANT_SETTING ar5212GetAntennaSwitch(struct ath_hal *);
    476           1.1     alc extern	HAL_BOOL ar5212SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING);
    477           1.1     alc extern	HAL_BOOL ar5212IsSleepAfterBeaconBroken(struct ath_hal *ah);
    478           1.1     alc extern	HAL_BOOL ar5212SetSifsTime(struct ath_hal *, u_int);
    479           1.1     alc extern	u_int ar5212GetSifsTime(struct ath_hal *);
    480           1.1     alc extern	HAL_BOOL ar5212SetSlotTime(struct ath_hal *, u_int);
    481           1.1     alc extern	u_int ar5212GetSlotTime(struct ath_hal *);
    482           1.1     alc extern	HAL_BOOL ar5212SetAckTimeout(struct ath_hal *, u_int);
    483           1.1     alc extern	u_int ar5212GetAckTimeout(struct ath_hal *);
    484           1.1     alc extern	HAL_BOOL ar5212SetAckCTSRate(struct ath_hal *, u_int);
    485           1.1     alc extern	u_int ar5212GetAckCTSRate(struct ath_hal *);
    486           1.1     alc extern	HAL_BOOL ar5212SetCTSTimeout(struct ath_hal *, u_int);
    487           1.1     alc extern	u_int ar5212GetCTSTimeout(struct ath_hal *);
    488           1.1     alc extern  HAL_BOOL ar5212SetDecompMask(struct ath_hal *, uint16_t, int);
    489           1.1     alc void 	ar5212SetCoverageClass(struct ath_hal *, uint8_t, int);
    490           1.1     alc extern	void ar5212SetPCUConfig(struct ath_hal *);
    491           1.1     alc extern	HAL_BOOL ar5212Use32KHzclock(struct ath_hal *ah, HAL_OPMODE opmode);
    492           1.1     alc extern	void ar5212SetupClock(struct ath_hal *ah, HAL_OPMODE opmode);
    493           1.1     alc extern	void ar5212RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode);
    494           1.1     alc extern	int16_t ar5212GetNfAdjust(struct ath_hal *,
    495           1.1     alc 		const HAL_CHANNEL_INTERNAL *);
    496           1.1     alc extern	void ar5212SetCompRegs(struct ath_hal *ah);
    497           1.1     alc extern	HAL_STATUS ar5212GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
    498           1.1     alc 		uint32_t, uint32_t *);
    499           1.1     alc extern	HAL_BOOL ar5212SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
    500           1.1     alc 		uint32_t, uint32_t, HAL_STATUS *);
    501           1.1     alc extern	HAL_BOOL ar5212GetDiagState(struct ath_hal *ah, int request,
    502           1.1     alc 		const void *args, uint32_t argsize,
    503           1.1     alc 		void **result, uint32_t *resultsize);
    504           1.1     alc 
    505           1.1     alc extern	HAL_BOOL ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
    506           1.1     alc 		int setChip);
    507           1.1     alc extern	HAL_POWER_MODE ar5212GetPowerMode(struct ath_hal *ah);
    508           1.1     alc extern	HAL_BOOL ar5212GetPowerStatus(struct ath_hal *ah);
    509           1.1     alc 
    510           1.1     alc extern	uint32_t ar5212GetRxDP(struct ath_hal *ath);
    511           1.1     alc extern	void ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp);
    512           1.1     alc extern	void ar5212EnableReceive(struct ath_hal *ah);
    513           1.1     alc extern	HAL_BOOL ar5212StopDmaReceive(struct ath_hal *ah);
    514           1.1     alc extern	void ar5212StartPcuReceive(struct ath_hal *ah);
    515           1.1     alc extern	void ar5212StopPcuReceive(struct ath_hal *ah);
    516           1.1     alc extern	void ar5212SetMulticastFilter(struct ath_hal *ah,
    517           1.1     alc 		uint32_t filter0, uint32_t filter1);
    518           1.1     alc extern	HAL_BOOL ar5212ClrMulticastFilterIndex(struct ath_hal *, uint32_t ix);
    519           1.1     alc extern	HAL_BOOL ar5212SetMulticastFilterIndex(struct ath_hal *, uint32_t ix);
    520           1.1     alc extern	uint32_t ar5212GetRxFilter(struct ath_hal *ah);
    521           1.1     alc extern	void ar5212SetRxFilter(struct ath_hal *ah, uint32_t bits);
    522           1.1     alc extern	HAL_BOOL ar5212SetupRxDesc(struct ath_hal *,
    523           1.1     alc 		struct ath_desc *, uint32_t size, u_int flags);
    524           1.1     alc extern	HAL_STATUS ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc *,
    525           1.1     alc 		uint32_t, struct ath_desc *, uint64_t,
    526           1.1     alc 		struct ath_rx_status *);
    527           1.1     alc 
    528           1.1     alc extern	HAL_BOOL ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode,
    529           1.1     alc 		HAL_CHANNEL *chan, HAL_BOOL bChannelChange, HAL_STATUS *status);
    530           1.1     alc extern	HAL_BOOL ar5212SetChannel(struct ath_hal *, HAL_CHANNEL_INTERNAL *);
    531           1.1     alc extern	void ar5212SetOperatingMode(struct ath_hal *ah, int opmode);
    532           1.1     alc extern	HAL_BOOL ar5212PhyDisable(struct ath_hal *ah);
    533           1.1     alc extern	HAL_BOOL ar5212Disable(struct ath_hal *ah);
    534           1.1     alc extern	HAL_BOOL ar5212ChipReset(struct ath_hal *ah, HAL_CHANNEL *);
    535           1.1     alc extern	HAL_BOOL ar5212PerCalibration(struct ath_hal *ah, HAL_CHANNEL *chan,
    536           1.1     alc 		HAL_BOOL *isIQdone);
    537           1.1     alc extern	HAL_BOOL ar5212PerCalibrationN(struct ath_hal *ah, HAL_CHANNEL *chan,
    538           1.1     alc 		u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone);
    539           1.1     alc extern	HAL_BOOL ar5212ResetCalValid(struct ath_hal *ah, HAL_CHANNEL *chan);
    540           1.1     alc extern	int16_t ar5212GetNoiseFloor(struct ath_hal *ah);
    541           1.1     alc extern	void ar5212InitNfCalHistBuffer(struct ath_hal *);
    542           1.1     alc extern	int16_t ar5212GetNfHistMid(const int16_t calData[]);
    543           1.1     alc extern	void ar5212SetSpurMitigation(struct ath_hal *, HAL_CHANNEL_INTERNAL *);
    544           1.1     alc extern	HAL_BOOL ar5212SetAntennaSwitchInternal(struct ath_hal *ah,
    545           1.1     alc 		HAL_ANT_SETTING settings, const HAL_CHANNEL_INTERNAL *ichan);
    546           1.1     alc extern	HAL_BOOL ar5212SetTxPowerLimit(struct ath_hal *ah, uint32_t limit);
    547           1.1     alc extern	HAL_BOOL ar5212GetChipPowerLimits(struct ath_hal *ah,
    548           1.1     alc 					  HAL_CHANNEL *chans, uint32_t nchans);
    549           1.1     alc extern	void ar5212InitializeGainValues(struct ath_hal *);
    550           1.1     alc extern	HAL_RFGAIN ar5212GetRfgain(struct ath_hal *ah);
    551           1.1     alc extern	void ar5212RequestRfgain(struct ath_hal *);
    552           1.1     alc 
    553           1.1     alc extern	HAL_BOOL ar5212UpdateTxTrigLevel(struct ath_hal *,
    554           1.1     alc 		HAL_BOOL IncTrigLevel);
    555           1.1     alc extern  HAL_BOOL ar5212SetTxQueueProps(struct ath_hal *ah, int q,
    556           1.1     alc 		const HAL_TXQ_INFO *qInfo);
    557           1.1     alc extern	HAL_BOOL ar5212GetTxQueueProps(struct ath_hal *ah, int q,
    558           1.1     alc 		HAL_TXQ_INFO *qInfo);
    559           1.1     alc extern	int ar5212SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type,
    560           1.1     alc 		const HAL_TXQ_INFO *qInfo);
    561           1.1     alc extern	HAL_BOOL ar5212ReleaseTxQueue(struct ath_hal *ah, u_int q);
    562           1.1     alc extern	HAL_BOOL ar5212ResetTxQueue(struct ath_hal *ah, u_int q);
    563           1.1     alc extern	uint32_t ar5212GetTxDP(struct ath_hal *ah, u_int q);
    564           1.1     alc extern	HAL_BOOL ar5212SetTxDP(struct ath_hal *ah, u_int q, uint32_t txdp);
    565           1.1     alc extern	HAL_BOOL ar5212StartTxDma(struct ath_hal *ah, u_int q);
    566           1.1     alc extern	uint32_t ar5212NumTxPending(struct ath_hal *ah, u_int q);
    567           1.1     alc extern	HAL_BOOL ar5212StopTxDma(struct ath_hal *ah, u_int q);
    568           1.1     alc extern	HAL_BOOL ar5212SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds,
    569           1.1     alc 		u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower,
    570           1.1     alc 		u_int txRate0, u_int txTries0,
    571           1.1     alc 		u_int keyIx, u_int antMode, u_int flags,
    572           1.1     alc 		u_int rtsctsRate, u_int rtsctsDuration,
    573           1.1     alc 		u_int compicvLen, u_int compivLen, u_int comp);
    574           1.1     alc extern	HAL_BOOL ar5212SetupXTxDesc(struct ath_hal *, struct ath_desc *,
    575           1.1     alc 		u_int txRate1, u_int txRetries1,
    576           1.1     alc 		u_int txRate2, u_int txRetries2,
    577           1.1     alc 		u_int txRate3, u_int txRetries3);
    578           1.1     alc extern	HAL_BOOL ar5212FillTxDesc(struct ath_hal *ah, struct ath_desc *ds,
    579           1.1     alc 		u_int segLen, HAL_BOOL firstSeg, HAL_BOOL lastSeg,
    580           1.1     alc 		const struct ath_desc *ds0);
    581           1.1     alc extern	HAL_STATUS ar5212ProcTxDesc(struct ath_hal *ah,
    582           1.1     alc 		struct ath_desc *, struct ath_tx_status *);
    583           1.1     alc extern  void ar5212GetTxIntrQueue(struct ath_hal *ah, uint32_t *);
    584           1.1     alc extern  void ar5212IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *);
    585           1.1     alc 
    586           1.1     alc extern	const HAL_RATE_TABLE *ar5212GetRateTable(struct ath_hal *, u_int mode);
    587           1.1     alc 
    588           1.1     alc extern	void ar5212AniAttach(struct ath_hal *, const struct ar5212AniParams *,
    589           1.1     alc 		const struct ar5212AniParams *, HAL_BOOL ena);
    590           1.1     alc extern	void ar5212AniDetach(struct ath_hal *);
    591           1.1     alc extern	struct ar5212AniState *ar5212AniGetCurrentState(struct ath_hal *);
    592           1.1     alc extern	struct ar5212Stats *ar5212AniGetCurrentStats(struct ath_hal *);
    593           1.1     alc extern	HAL_BOOL ar5212AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param);
    594           1.1     alc extern	HAL_BOOL ar5212AniSetParams(struct ath_hal *,
    595           1.1     alc 		const struct ar5212AniParams *, const struct ar5212AniParams *);
    596           1.1     alc struct ath_rx_status;
    597           1.1     alc extern	void ar5212AniPhyErrReport(struct ath_hal *ah,
    598           1.1     alc 		const struct ath_rx_status *rs);
    599           1.1     alc extern	void ar5212ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *);
    600           1.1     alc extern	void ar5212AniPoll(struct ath_hal *, const HAL_NODE_STATS *,
    601           1.1     alc 			     HAL_CHANNEL *);
    602           1.1     alc extern	void ar5212AniReset(struct ath_hal *, HAL_CHANNEL_INTERNAL *,
    603           1.1     alc 		HAL_OPMODE, int);
    604           1.1     alc #endif	/* _ATH_AR5212_H_ */
    605