ar5211.h revision 238607
10Sstevel@tonic-gate/*
20Sstevel@tonic-gate * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
30Sstevel@tonic-gate * Copyright (c) 2002-2006 Atheros Communications, Inc.
40Sstevel@tonic-gate *
53792Sakolb * Permission to use, copy, modify, and/or distribute this software for any
63792Sakolb * purpose with or without fee is hereby granted, provided that the above
70Sstevel@tonic-gate * copyright notice and this permission notice appear in all copies.
80Sstevel@tonic-gate *
90Sstevel@tonic-gate * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
100Sstevel@tonic-gate * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
110Sstevel@tonic-gate * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
120Sstevel@tonic-gate * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
130Sstevel@tonic-gate * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
140Sstevel@tonic-gate * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
150Sstevel@tonic-gate * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160Sstevel@tonic-gate *
170Sstevel@tonic-gate * $FreeBSD: head/sys/dev/ath/ath_hal/ar5211/ar5211.h 238607 2012-07-19 02:25:14Z adrian $
180Sstevel@tonic-gate */
190Sstevel@tonic-gate#ifndef _ATH_AR5211_H_
200Sstevel@tonic-gate#define _ATH_AR5211_H_
21951Sraf
220Sstevel@tonic-gate#include "ah_eeprom.h"
2312785SPramod.Batni@Sun.COM
240Sstevel@tonic-gate#define	AR5211_MAGIC	0x19570405
250Sstevel@tonic-gate
260Sstevel@tonic-gate/* Classes for WME streams */
270Sstevel@tonic-gate#define	AC_BK	0
280Sstevel@tonic-gate#define	AC_BE	1
290Sstevel@tonic-gate#define	AC_VI	2
300Sstevel@tonic-gate#define	AC_VO	3
310Sstevel@tonic-gate
320Sstevel@tonic-gate/* DCU Transmit Filter macros */
330Sstevel@tonic-gate#define CALC_MMR(dcu, idx) \
340Sstevel@tonic-gate	( (4 * dcu) + (idx < 32 ? 0 : (idx < 64 ? 1 : (idx < 96 ? 2 : 3))) )
350Sstevel@tonic-gate#define TXBLK_FROM_MMR(mmr) \
360Sstevel@tonic-gate	(AR_D_TXBLK_BASE + ((mmr & 0x1f) << 6) + ((mmr & 0x20) >> 3))
370Sstevel@tonic-gate#define CALC_TXBLK_ADDR(dcu, idx)	(TXBLK_FROM_MMR(CALC_MMR(dcu, idx)))
380Sstevel@tonic-gate#define CALC_TXBLK_VALUE(idx)		(1 << (idx & 0x1f))
390Sstevel@tonic-gate
400Sstevel@tonic-gate/* MAC register values */
410Sstevel@tonic-gate
420Sstevel@tonic-gate#define INIT_INTERRUPT_MASK \
430Sstevel@tonic-gate	( AR_IMR_TXERR  | AR_IMR_TXOK | AR_IMR_RXORN | \
440Sstevel@tonic-gate	  AR_IMR_RXERR  | AR_IMR_RXOK | AR_IMR_TXURN | \
450Sstevel@tonic-gate	  AR_IMR_HIUERR )
460Sstevel@tonic-gate#define INIT_BEACON_CONTROL \
470Sstevel@tonic-gate	( (INIT_RESET_TSF << 24)  | (INIT_BEACON_EN << 23) | \
480Sstevel@tonic-gate	  (INIT_TIM_OFFSET << 16) | INIT_BEACON_PERIOD )
490Sstevel@tonic-gate
500Sstevel@tonic-gate#define INIT_CONFIG_STATUS	0x00000000
510Sstevel@tonic-gate#define INIT_RSSI_THR		0x00000700	/* Missed beacon counter initialized to 0x7 (max is 0xff) */
520Sstevel@tonic-gate#define INIT_IQCAL_LOG_COUNT_MAX	0xF
530Sstevel@tonic-gate#define INIT_BCON_CNTRL_REG	0x00000000
543792Sakolb
550Sstevel@tonic-gate#define INIT_BEACON_PERIOD	0xffff
560Sstevel@tonic-gate#define INIT_TIM_OFFSET		0
570Sstevel@tonic-gate#define INIT_BEACON_EN		0		/* this should be set by AP only when it's ready */
580Sstevel@tonic-gate#define INIT_RESET_TSF		0
590Sstevel@tonic-gate
600Sstevel@tonic-gate/*
610Sstevel@tonic-gate * Various fifo fill before Tx start, in 64-byte units
620Sstevel@tonic-gate * i.e. put the frame in the air while still DMAing
630Sstevel@tonic-gate */
640Sstevel@tonic-gate#define MIN_TX_FIFO_THRESHOLD	   0x1
650Sstevel@tonic-gate#define MAX_TX_FIFO_THRESHOLD	   ((IEEE80211_MAX_LEN / 64) + 1)
660Sstevel@tonic-gate#define INIT_TX_FIFO_THRESHOLD	  MIN_TX_FIFO_THRESHOLD
670Sstevel@tonic-gate
680Sstevel@tonic-gate/*
690Sstevel@tonic-gate * Gain support.
700Sstevel@tonic-gate */
710Sstevel@tonic-gatetypedef struct _gainOptStep {
720Sstevel@tonic-gate	int16_t	paramVal[4];
730Sstevel@tonic-gate	int32_t	stepGain;
740Sstevel@tonic-gate	int8_t	stepName[16];
750Sstevel@tonic-gate} GAIN_OPTIMIZATION_STEP;
760Sstevel@tonic-gate
770Sstevel@tonic-gatetypedef struct {
780Sstevel@tonic-gate	uint32_t	numStepsInLadder;
790Sstevel@tonic-gate	uint32_t	defaultStepNum;
800Sstevel@tonic-gate	GAIN_OPTIMIZATION_STEP optStep[10];
810Sstevel@tonic-gate} GAIN_OPTIMIZATION_LADDER;
820Sstevel@tonic-gate
830Sstevel@tonic-gatetypedef struct {
840Sstevel@tonic-gate	uint32_t	currStepNum;
850Sstevel@tonic-gate	uint32_t	currGain;
860Sstevel@tonic-gate	uint32_t	targetGain;
870Sstevel@tonic-gate	uint32_t	loTrig;
880Sstevel@tonic-gate	uint32_t	hiTrig;
890Sstevel@tonic-gate	uint32_t	active;
900Sstevel@tonic-gate	const GAIN_OPTIMIZATION_STEP *currStep;
910Sstevel@tonic-gate} GAIN_VALUES;
920Sstevel@tonic-gate
930Sstevel@tonic-gateenum {
940Sstevel@tonic-gate	RFGAIN_INACTIVE,
950Sstevel@tonic-gate	RFGAIN_READ_REQUESTED,
960Sstevel@tonic-gate	RFGAIN_NEED_CHANGE
970Sstevel@tonic-gate};
980Sstevel@tonic-gate
990Sstevel@tonic-gate/*
1000Sstevel@tonic-gate * Header Info - general parameters and
1010Sstevel@tonic-gate * values set for each chipset board solution
1020Sstevel@tonic-gate * that are programmed every reset
1030Sstevel@tonic-gate */
1040Sstevel@tonic-gatestruct ath_hal_5211 {
1050Sstevel@tonic-gate	struct ath_hal_private	ah_priv;	/* base class */
1060Sstevel@tonic-gate
1070Sstevel@tonic-gate	GAIN_VALUES	ah_gainValues;
1080Sstevel@tonic-gate
1090Sstevel@tonic-gate	uint8_t		ah_macaddr[IEEE80211_ADDR_LEN];
1100Sstevel@tonic-gate	uint8_t		ah_bssid[IEEE80211_ADDR_LEN];
1110Sstevel@tonic-gate
1120Sstevel@tonic-gate	/*
1130Sstevel@tonic-gate	 * Runtime state.
1140Sstevel@tonic-gate	 */
1150Sstevel@tonic-gate	uint32_t	ah_maskReg;		/* copy of AR_IMR */
1160Sstevel@tonic-gate	uint32_t	ah_txOkInterruptMask;
1170Sstevel@tonic-gate	uint32_t	ah_txErrInterruptMask;
1180Sstevel@tonic-gate	uint32_t	ah_txDescInterruptMask;
1190Sstevel@tonic-gate	uint32_t	ah_txEolInterruptMask;
1200Sstevel@tonic-gate	uint32_t	ah_txUrnInterruptMask;
1210Sstevel@tonic-gate	HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES];
1220Sstevel@tonic-gate	HAL_POWER_MODE	ah_powerMode;
1230Sstevel@tonic-gate	HAL_ANT_SETTING ah_diversityControl;	/* antenna setting */
1240Sstevel@tonic-gate	uint32_t	ah_calibrationTime;
1250Sstevel@tonic-gate	HAL_BOOL	ah_bIQCalibration;
1260Sstevel@tonic-gate	int		ah_rfgainState;
1270Sstevel@tonic-gate	uint32_t	ah_tx6PowerInHalfDbm;	/* power output for 6Mb tx */
1280Sstevel@tonic-gate	uint32_t	ah_staId1Defaults;	/* STA_ID1 default settings */
1290Sstevel@tonic-gate	uint32_t	ah_beaconInterval;
1300Sstevel@tonic-gate	uint32_t	ah_rssiThr;		/* RSSI_THR settings */
1310Sstevel@tonic-gate
1320Sstevel@tonic-gate	u_int		ah_sifstime;		/* user-specified sifs time */
1330Sstevel@tonic-gate	u_int		ah_slottime;		/* user-specified slot time */
1340Sstevel@tonic-gate	u_int		ah_acktimeout;		/* user-specified ack timeout */
1350Sstevel@tonic-gate	u_int		ah_ctstimeout;		/* user-specified cts timeout */
1360Sstevel@tonic-gate	/*
1370Sstevel@tonic-gate	 * RF Silent handling.
1380Sstevel@tonic-gate	 */
1390Sstevel@tonic-gate	uint32_t	ah_gpioSelect;		/* GPIO pin to use */
1400Sstevel@tonic-gate	uint32_t	ah_polarity;		/* polarity to disable RF */
1410Sstevel@tonic-gate	uint32_t	ah_gpioBit;		/* after init, prev value */
1420Sstevel@tonic-gate};
1430Sstevel@tonic-gate#define	AH5211(ah)	((struct ath_hal_5211 *)(ah))
1440Sstevel@tonic-gate
1450Sstevel@tonic-gatestruct ath_hal;
1460Sstevel@tonic-gate
1470Sstevel@tonic-gateextern	void ar5211Detach(struct ath_hal *);
1480Sstevel@tonic-gate
1490Sstevel@tonic-gateextern	HAL_BOOL ar5211Reset(struct ath_hal *, HAL_OPMODE,
1500Sstevel@tonic-gate		struct ieee80211_channel *, HAL_BOOL bChannelChange,
1510Sstevel@tonic-gate		HAL_STATUS *);
1520Sstevel@tonic-gateextern	HAL_BOOL ar5211PhyDisable(struct ath_hal *);
1530Sstevel@tonic-gateextern	HAL_BOOL ar5211Disable(struct ath_hal *);
1540Sstevel@tonic-gateextern	HAL_BOOL ar5211ChipReset(struct ath_hal *,
1550Sstevel@tonic-gate		const struct ieee80211_channel *);
1560Sstevel@tonic-gateextern	HAL_BOOL ar5211PerCalibration(struct ath_hal *, struct ieee80211_channel *, HAL_BOOL *);
1570Sstevel@tonic-gateextern	HAL_BOOL ar5211PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan,
1580Sstevel@tonic-gate		u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone);
1590Sstevel@tonic-gateextern	HAL_BOOL ar5211ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *);
1600Sstevel@tonic-gateextern	HAL_BOOL ar5211SetTxPowerLimit(struct ath_hal *, uint32_t limit);
1610Sstevel@tonic-gateextern	HAL_BOOL ar5211CalNoiseFloor(struct ath_hal *,
1620Sstevel@tonic-gate		const struct ieee80211_channel *);
1630Sstevel@tonic-gateextern	HAL_BOOL ar5211SetAntennaSwitchInternal(struct ath_hal *,
1640Sstevel@tonic-gate		HAL_ANT_SETTING, const struct ieee80211_channel *);
1650Sstevel@tonic-gateextern	int16_t ar5211GetNfAdjust(struct ath_hal *,
1660Sstevel@tonic-gate		const HAL_CHANNEL_INTERNAL *);
1670Sstevel@tonic-gateextern	HAL_BOOL ar5211ResetDma(struct ath_hal *, HAL_OPMODE);
1680Sstevel@tonic-gateextern	void ar5211InitializeGainValues(struct ath_hal *);
1690Sstevel@tonic-gateextern	HAL_RFGAIN ar5211GetRfgain(struct ath_hal *);
1700Sstevel@tonic-gateextern	void ar5211SetPCUConfig(struct ath_hal *);
1710Sstevel@tonic-gate
1720Sstevel@tonic-gateextern  HAL_BOOL ar5211SetTxQueueProps(struct ath_hal *ah, int q,
1730Sstevel@tonic-gate		const HAL_TXQ_INFO *qInfo);
1740Sstevel@tonic-gateextern	HAL_BOOL ar5211GetTxQueueProps(struct ath_hal *ah, int q,
1750Sstevel@tonic-gate		HAL_TXQ_INFO *qInfo);
1760Sstevel@tonic-gateextern	int ar5211SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type,
1770Sstevel@tonic-gate		const HAL_TXQ_INFO *qInfo);
1780Sstevel@tonic-gateextern	HAL_BOOL ar5211ReleaseTxQueue(struct ath_hal *ah, u_int q);
1790Sstevel@tonic-gateextern	HAL_BOOL ar5211ResetTxQueue(struct ath_hal *ah, u_int q);
1800Sstevel@tonic-gateextern	uint32_t ar5211GetTxDP(struct ath_hal *, u_int);
1810Sstevel@tonic-gateextern	HAL_BOOL ar5211SetTxDP(struct ath_hal *, u_int, uint32_t txdp);
1820Sstevel@tonic-gateextern	HAL_BOOL ar5211UpdateTxTrigLevel(struct ath_hal *, HAL_BOOL);
1830Sstevel@tonic-gateextern	HAL_BOOL ar5211StartTxDma(struct ath_hal *, u_int);
1840Sstevel@tonic-gateextern	HAL_BOOL ar5211StopTxDma(struct ath_hal *, u_int);
1850Sstevel@tonic-gateextern	uint32_t ar5211NumTxPending(struct ath_hal *, u_int qnum);
1860Sstevel@tonic-gateextern	HAL_BOOL ar5211IsTxQueueStopped(struct ath_hal *, u_int);
1870Sstevel@tonic-gateextern	HAL_BOOL ar5211GetTransmitFilterIndex(struct ath_hal *, uint32_t);
1880Sstevel@tonic-gateextern	HAL_BOOL ar5211SetupTxDesc(struct ath_hal *, struct ath_desc *,
1890Sstevel@tonic-gate		u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower,
1900Sstevel@tonic-gate		u_int txRate0, u_int txTries0,
1910Sstevel@tonic-gate		u_int keyIx, u_int antMode, u_int flags,
1920Sstevel@tonic-gate		u_int rtsctsRate, u_int rtsctsDuration,
1930Sstevel@tonic-gate                u_int compicvLen, u_int compivLen, u_int comp);
1940Sstevel@tonic-gateextern	HAL_BOOL ar5211SetupXTxDesc(struct ath_hal *, struct ath_desc *,
1950Sstevel@tonic-gate		u_int txRate1, u_int txRetries1,
1960Sstevel@tonic-gate		u_int txRate2, u_int txRetries2,
1970Sstevel@tonic-gate		u_int txRate3, u_int txRetries3);
1980Sstevel@tonic-gateextern	HAL_BOOL ar5211FillTxDesc(struct ath_hal *, struct ath_desc *,
1990Sstevel@tonic-gate		u_int segLen, HAL_BOOL firstSeg, HAL_BOOL lastSeg,
2000Sstevel@tonic-gate		const struct ath_desc *ds0);
2010Sstevel@tonic-gateextern	HAL_STATUS ar5211ProcTxDesc(struct ath_hal *,
2020Sstevel@tonic-gate		struct ath_desc *, struct ath_tx_status *);
2030Sstevel@tonic-gateextern  void ar5211GetTxIntrQueue(struct ath_hal *ah, uint32_t *);
2040Sstevel@tonic-gateextern  void ar5211IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *);
2050Sstevel@tonic-gateextern	HAL_BOOL ar5211GetTxCompletionRates(struct ath_hal *ah,
2060Sstevel@tonic-gate		const struct ath_desc *ds0, int *rates, int *tries);
2070Sstevel@tonic-gateextern	void ar5211SetTxDescLink(struct ath_hal *ah, void *ds,
2080Sstevel@tonic-gate		uint32_t link);
2090Sstevel@tonic-gateextern	void ar5211GetTxDescLink(struct ath_hal *ah, void *ds,
2100Sstevel@tonic-gate		uint32_t *link);
2110Sstevel@tonic-gateextern	void ar5211GetTxDescLinkPtr(struct ath_hal *ah, void *ds,
2120Sstevel@tonic-gate		uint32_t **linkptr);
2130Sstevel@tonic-gate
2140Sstevel@tonic-gateextern	uint32_t ar5211GetRxDP(struct ath_hal *, HAL_RX_QUEUE);
2150Sstevel@tonic-gateextern	void ar5211SetRxDP(struct ath_hal *, uint32_t rxdp, HAL_RX_QUEUE);
2160Sstevel@tonic-gateextern	void ar5211EnableReceive(struct ath_hal *);
2170Sstevel@tonic-gateextern	HAL_BOOL ar5211StopDmaReceive(struct ath_hal *);
2180Sstevel@tonic-gateextern	void ar5211StartPcuReceive(struct ath_hal *);
2190Sstevel@tonic-gateextern	void ar5211StopPcuReceive(struct ath_hal *);
2200Sstevel@tonic-gateextern	void ar5211SetMulticastFilter(struct ath_hal *,
2210Sstevel@tonic-gate		uint32_t filter0, uint32_t filter1);
2220Sstevel@tonic-gateextern	HAL_BOOL ar5211ClrMulticastFilterIndex(struct ath_hal *, uint32_t);
2230Sstevel@tonic-gateextern	HAL_BOOL ar5211SetMulticastFilterIndex(struct ath_hal *, uint32_t);
2246247Srafextern	uint32_t ar5211GetRxFilter(struct ath_hal *);
2250Sstevel@tonic-gateextern	void ar5211SetRxFilter(struct ath_hal *, uint32_t);
2260Sstevel@tonic-gateextern	HAL_BOOL ar5211SetupRxDesc(struct ath_hal *, struct ath_desc *,
2270Sstevel@tonic-gate		uint32_t, u_int flags);
2280Sstevel@tonic-gateextern	HAL_STATUS ar5211ProcRxDesc(struct ath_hal *, struct ath_desc *,
2290Sstevel@tonic-gate		uint32_t, struct ath_desc *, uint64_t,
2300Sstevel@tonic-gate		struct ath_rx_status *);
2310Sstevel@tonic-gate
2320Sstevel@tonic-gateextern	void ar5211GetMacAddress(struct ath_hal *, uint8_t *);
2330Sstevel@tonic-gateextern	HAL_BOOL ar5211SetMacAddress(struct ath_hal *ah, const uint8_t *);
2340Sstevel@tonic-gateextern	void ar5211GetBssIdMask(struct ath_hal *, uint8_t *);
2350Sstevel@tonic-gateextern	HAL_BOOL ar5211SetBssIdMask(struct ath_hal *, const uint8_t *);
2360Sstevel@tonic-gateextern	HAL_BOOL ar5211EepromRead(struct ath_hal *, u_int off, uint16_t *data);
2370Sstevel@tonic-gateextern	HAL_BOOL ar5211EepromWrite(struct ath_hal *, u_int off, uint16_t data);
2380Sstevel@tonic-gateextern	HAL_BOOL ar5211SetRegulatoryDomain(struct ath_hal *,
2390Sstevel@tonic-gate		uint16_t, HAL_STATUS *);
2400Sstevel@tonic-gateextern	u_int ar5211GetWirelessModes(struct ath_hal *);
2410Sstevel@tonic-gateextern	void ar5211EnableRfKill(struct ath_hal *);
2420Sstevel@tonic-gateextern	uint32_t ar5211GpioGet(struct ath_hal *, uint32_t gpio);
2430Sstevel@tonic-gateextern	void ar5211GpioSetIntr(struct ath_hal *, u_int, uint32_t ilevel);
2440Sstevel@tonic-gateextern	HAL_BOOL ar5211GpioCfgOutput(struct ath_hal *, uint32_t gpio,
2450Sstevel@tonic-gate		HAL_GPIO_MUX_TYPE);
2460Sstevel@tonic-gateextern	HAL_BOOL ar5211GpioCfgInput(struct ath_hal *, uint32_t gpio);
2470Sstevel@tonic-gateextern	HAL_BOOL ar5211GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val);
2480Sstevel@tonic-gateextern	void ar5211SetLedState(struct ath_hal *, HAL_LED_STATE);
2490Sstevel@tonic-gateextern	u_int ar5211AntennaGet(struct ath_hal *);
2500Sstevel@tonic-gateextern	void ar5211WriteAssocid(struct ath_hal *,
2510Sstevel@tonic-gate		const uint8_t *bssid, uint16_t assocId);
2520Sstevel@tonic-gateextern	uint64_t ar5211GetTsf64(struct ath_hal *);
2530Sstevel@tonic-gateextern	uint32_t ar5211GetTsf32(struct ath_hal *);
2540Sstevel@tonic-gateextern	void ar5211ResetTsf(struct ath_hal *);
2550Sstevel@tonic-gateextern	uint32_t ar5211GetMaxTurboRate(struct ath_hal *);
2560Sstevel@tonic-gateextern	uint32_t ar5211GetRandomSeed(struct ath_hal *);
2570Sstevel@tonic-gateextern	HAL_BOOL ar5211DetectCardPresent(struct ath_hal *);
2580Sstevel@tonic-gateextern	void ar5211UpdateMibCounters(struct ath_hal *, HAL_MIB_STATS *);
2590Sstevel@tonic-gateextern	void ar5211EnableHwEncryption(struct ath_hal *);
2600Sstevel@tonic-gateextern	void ar5211DisableHwEncryption(struct ath_hal *);
2610Sstevel@tonic-gateextern	HAL_BOOL ar5211SetSlotTime(struct ath_hal *, u_int);
2620Sstevel@tonic-gateextern	u_int ar5211GetSlotTime(struct ath_hal *);
2630Sstevel@tonic-gateextern	HAL_BOOL ar5211SetAckTimeout(struct ath_hal *, u_int);
2646247Srafextern	u_int ar5211GetAckTimeout(struct ath_hal *);
2656247Srafextern	HAL_BOOL ar5211SetAckCTSRate(struct ath_hal *, u_int);
2660Sstevel@tonic-gateextern	u_int ar5211GetAckCTSRate(struct ath_hal *);
2670Sstevel@tonic-gateextern	HAL_BOOL ar5211SetCTSTimeout(struct ath_hal *, u_int);
2680Sstevel@tonic-gateextern	u_int ar5211GetCTSTimeout(struct ath_hal *);
2690Sstevel@tonic-gateextern	HAL_BOOL ar5211SetSifsTime(struct ath_hal *, u_int);
2700Sstevel@tonic-gateextern	u_int ar5211GetSifsTime(struct ath_hal *);
2710Sstevel@tonic-gateextern  HAL_BOOL ar5211SetDecompMask(struct ath_hal *, uint16_t, int);
2720Sstevel@tonic-gateextern	void ar5211SetCoverageClass(struct ath_hal *, uint8_t, int);
2730Sstevel@tonic-gateextern	uint32_t ar5211GetCurRssi(struct ath_hal *);
2740Sstevel@tonic-gateextern	u_int ar5211GetDefAntenna(struct ath_hal *);
2750Sstevel@tonic-gateextern	void ar5211SetDefAntenna(struct ath_hal *ah, u_int antenna);
2760Sstevel@tonic-gateextern	HAL_ANT_SETTING ar5211GetAntennaSwitch(struct ath_hal *);
2770Sstevel@tonic-gateextern	HAL_BOOL ar5211SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING);
2780Sstevel@tonic-gateextern	HAL_STATUS ar5211GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
2790Sstevel@tonic-gate		uint32_t, uint32_t *);
2800Sstevel@tonic-gateextern	HAL_BOOL ar5211SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
2810Sstevel@tonic-gate		uint32_t, uint32_t, HAL_STATUS *);
2820Sstevel@tonic-gateextern	HAL_BOOL ar5211GetDiagState(struct ath_hal *ah, int request,
2830Sstevel@tonic-gate		const void *args, uint32_t argsize,
2840Sstevel@tonic-gate		void **result, uint32_t *resultsize);
2850Sstevel@tonic-gateextern	uint32_t ar5211Get11nExtBusy(struct ath_hal *);
2860Sstevel@tonic-gateextern	HAL_BOOL ar5211GetMibCycleCounts(struct ath_hal *,
2870Sstevel@tonic-gate		HAL_SURVEY_SAMPLE *);
2880Sstevel@tonic-gateextern	void ar5211EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *);
2890Sstevel@tonic-gateextern	void ar5211GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *);
2900Sstevel@tonic-gate
2910Sstevel@tonic-gateextern	u_int ar5211GetKeyCacheSize(struct ath_hal *);
2920Sstevel@tonic-gateextern	HAL_BOOL ar5211IsKeyCacheEntryValid(struct ath_hal *, uint16_t);
2930Sstevel@tonic-gateextern	HAL_BOOL ar5211ResetKeyCacheEntry(struct ath_hal *, uint16_t entry);
2940Sstevel@tonic-gateextern	HAL_BOOL ar5211SetKeyCacheEntry(struct ath_hal *, uint16_t entry,
2950Sstevel@tonic-gate                       const HAL_KEYVAL *, const uint8_t *mac,
2960Sstevel@tonic-gate                       int xorKey);
2970Sstevel@tonic-gateextern	HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *,
2980Sstevel@tonic-gate			uint16_t, const uint8_t *);
2990Sstevel@tonic-gate
3000Sstevel@tonic-gateextern	HAL_BOOL ar5211SetPowerMode(struct ath_hal *, uint32_t powerRequest,
3010Sstevel@tonic-gate		int setChip);
3020Sstevel@tonic-gateextern	HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *);
3030Sstevel@tonic-gate
3040Sstevel@tonic-gateextern	void ar5211SetBeaconTimers(struct ath_hal *,
3050Sstevel@tonic-gate		const HAL_BEACON_TIMERS *);
3060Sstevel@tonic-gateextern	void ar5211BeaconInit(struct ath_hal *, uint32_t, uint32_t);
3070Sstevel@tonic-gateextern	void ar5211SetStaBeaconTimers(struct ath_hal *,
3080Sstevel@tonic-gate		const HAL_BEACON_STATE *);
3090Sstevel@tonic-gateextern	void ar5211ResetStaBeaconTimers(struct ath_hal *);
3100Sstevel@tonic-gateextern	uint64_t ar5211GetNextTBTT(struct ath_hal *);
3110Sstevel@tonic-gate
3120Sstevel@tonic-gateextern	HAL_BOOL ar5211IsInterruptPending(struct ath_hal *);
3130Sstevel@tonic-gateextern	HAL_BOOL ar5211GetPendingInterrupts(struct ath_hal *, HAL_INT *);
3140Sstevel@tonic-gateextern	HAL_INT ar5211GetInterrupts(struct ath_hal *);
3150Sstevel@tonic-gateextern	HAL_INT ar5211SetInterrupts(struct ath_hal *, HAL_INT ints);
3160Sstevel@tonic-gate
3170Sstevel@tonic-gateextern	const HAL_RATE_TABLE *ar5211GetRateTable(struct ath_hal *, u_int mode);
3180Sstevel@tonic-gate
3190Sstevel@tonic-gateextern	HAL_BOOL ar5211AniControl(struct ath_hal *, HAL_ANI_CMD, int );
3200Sstevel@tonic-gateextern	void ar5211RxMonitor(struct ath_hal *, const HAL_NODE_STATS *,
3210Sstevel@tonic-gate		const struct ieee80211_channel *);
3220Sstevel@tonic-gateextern	void ar5211AniPoll(struct ath_hal *, const struct ieee80211_channel *);
3230Sstevel@tonic-gateextern	void ar5211MibEvent(struct ath_hal *, const HAL_NODE_STATS *);
3240Sstevel@tonic-gate#endif /* _ATH_AR5211_H_ */
3250Sstevel@tonic-gate