16e778a7eSPedro F. Giffuni /*- 26e778a7eSPedro F. Giffuni * SPDX-License-Identifier: ISC 36e778a7eSPedro F. Giffuni * 459efa8b5SSam Leffler * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 514779705SSam Leffler * Copyright (c) 2002-2006 Atheros Communications, Inc. 614779705SSam Leffler * 714779705SSam Leffler * Permission to use, copy, modify, and/or distribute this software for any 814779705SSam Leffler * purpose with or without fee is hereby granted, provided that the above 914779705SSam Leffler * copyright notice and this permission notice appear in all copies. 1014779705SSam Leffler * 1114779705SSam Leffler * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1214779705SSam Leffler * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1314779705SSam Leffler * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1414779705SSam Leffler * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1514779705SSam Leffler * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1614779705SSam Leffler * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1714779705SSam Leffler * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1814779705SSam Leffler */ 1914779705SSam Leffler #ifndef _ATH_AR5211_H_ 2014779705SSam Leffler #define _ATH_AR5211_H_ 2114779705SSam Leffler 2214779705SSam Leffler #include "ah_eeprom.h" 2314779705SSam Leffler 2414779705SSam Leffler #define AR5211_MAGIC 0x19570405 2514779705SSam Leffler 2614779705SSam Leffler /* Classes for WME streams */ 2714779705SSam Leffler #define AC_BK 0 2814779705SSam Leffler #define AC_BE 1 2914779705SSam Leffler #define AC_VI 2 3014779705SSam Leffler #define AC_VO 3 3114779705SSam Leffler 3214779705SSam Leffler /* DCU Transmit Filter macros */ 3314779705SSam Leffler #define CALC_MMR(dcu, idx) \ 3414779705SSam Leffler ( (4 * dcu) + (idx < 32 ? 0 : (idx < 64 ? 1 : (idx < 96 ? 2 : 3))) ) 3514779705SSam Leffler #define TXBLK_FROM_MMR(mmr) \ 3614779705SSam Leffler (AR_D_TXBLK_BASE + ((mmr & 0x1f) << 6) + ((mmr & 0x20) >> 3)) 3714779705SSam Leffler #define CALC_TXBLK_ADDR(dcu, idx) (TXBLK_FROM_MMR(CALC_MMR(dcu, idx))) 3814779705SSam Leffler #define CALC_TXBLK_VALUE(idx) (1 << (idx & 0x1f)) 3914779705SSam Leffler 4014779705SSam Leffler /* MAC register values */ 4114779705SSam Leffler 4214779705SSam Leffler #define INIT_INTERRUPT_MASK \ 4314779705SSam Leffler ( AR_IMR_TXERR | AR_IMR_TXOK | AR_IMR_RXORN | \ 4414779705SSam Leffler AR_IMR_RXERR | AR_IMR_RXOK | AR_IMR_TXURN | \ 4514779705SSam Leffler AR_IMR_HIUERR ) 4614779705SSam Leffler #define INIT_BEACON_CONTROL \ 4714779705SSam Leffler ( (INIT_RESET_TSF << 24) | (INIT_BEACON_EN << 23) | \ 4814779705SSam Leffler (INIT_TIM_OFFSET << 16) | INIT_BEACON_PERIOD ) 4914779705SSam Leffler 5014779705SSam Leffler #define INIT_CONFIG_STATUS 0x00000000 5114779705SSam Leffler #define INIT_RSSI_THR 0x00000700 /* Missed beacon counter initialized to 0x7 (max is 0xff) */ 5214779705SSam Leffler #define INIT_IQCAL_LOG_COUNT_MAX 0xF 5314779705SSam Leffler #define INIT_BCON_CNTRL_REG 0x00000000 5414779705SSam Leffler 5514779705SSam Leffler #define INIT_BEACON_PERIOD 0xffff 5614779705SSam Leffler #define INIT_TIM_OFFSET 0 5714779705SSam Leffler #define INIT_BEACON_EN 0 /* this should be set by AP only when it's ready */ 5814779705SSam Leffler #define INIT_RESET_TSF 0 5914779705SSam Leffler 6014779705SSam Leffler /* 6114779705SSam Leffler * Various fifo fill before Tx start, in 64-byte units 6214779705SSam Leffler * i.e. put the frame in the air while still DMAing 6314779705SSam Leffler */ 6414779705SSam Leffler #define MIN_TX_FIFO_THRESHOLD 0x1 6514779705SSam Leffler #define MAX_TX_FIFO_THRESHOLD ((IEEE80211_MAX_LEN / 64) + 1) 6614779705SSam Leffler #define INIT_TX_FIFO_THRESHOLD MIN_TX_FIFO_THRESHOLD 6714779705SSam Leffler 6814779705SSam Leffler /* 6914779705SSam Leffler * Gain support. 7014779705SSam Leffler */ 7114779705SSam Leffler typedef struct _gainOptStep { 7214779705SSam Leffler int16_t paramVal[4]; 7314779705SSam Leffler int32_t stepGain; 7414779705SSam Leffler int8_t stepName[16]; 7514779705SSam Leffler } GAIN_OPTIMIZATION_STEP; 7614779705SSam Leffler 7714779705SSam Leffler typedef struct { 7814779705SSam Leffler uint32_t numStepsInLadder; 7914779705SSam Leffler uint32_t defaultStepNum; 8014779705SSam Leffler GAIN_OPTIMIZATION_STEP optStep[10]; 8114779705SSam Leffler } GAIN_OPTIMIZATION_LADDER; 8214779705SSam Leffler 8314779705SSam Leffler typedef struct { 8414779705SSam Leffler uint32_t currStepNum; 8514779705SSam Leffler uint32_t currGain; 8614779705SSam Leffler uint32_t targetGain; 8714779705SSam Leffler uint32_t loTrig; 8814779705SSam Leffler uint32_t hiTrig; 8914779705SSam Leffler uint32_t active; 9014779705SSam Leffler const GAIN_OPTIMIZATION_STEP *currStep; 9114779705SSam Leffler } GAIN_VALUES; 9214779705SSam Leffler 9314779705SSam Leffler enum { 9414779705SSam Leffler RFGAIN_INACTIVE, 9514779705SSam Leffler RFGAIN_READ_REQUESTED, 9614779705SSam Leffler RFGAIN_NEED_CHANGE 9714779705SSam Leffler }; 9814779705SSam Leffler 9914779705SSam Leffler /* 10014779705SSam Leffler * Header Info - general parameters and 10114779705SSam Leffler * values set for each chipset board solution 10214779705SSam Leffler * that are programmed every reset 10314779705SSam Leffler */ 10414779705SSam Leffler struct ath_hal_5211 { 10514779705SSam Leffler struct ath_hal_private ah_priv; /* base class */ 10614779705SSam Leffler 10714779705SSam Leffler GAIN_VALUES ah_gainValues; 10814779705SSam Leffler 10914779705SSam Leffler uint8_t ah_macaddr[IEEE80211_ADDR_LEN]; 11014779705SSam Leffler uint8_t ah_bssid[IEEE80211_ADDR_LEN]; 11114779705SSam Leffler 11214779705SSam Leffler /* 11314779705SSam Leffler * Runtime state. 11414779705SSam Leffler */ 11514779705SSam Leffler uint32_t ah_maskReg; /* copy of AR_IMR */ 11614779705SSam Leffler uint32_t ah_txOkInterruptMask; 11714779705SSam Leffler uint32_t ah_txErrInterruptMask; 11814779705SSam Leffler uint32_t ah_txDescInterruptMask; 11914779705SSam Leffler uint32_t ah_txEolInterruptMask; 12014779705SSam Leffler uint32_t ah_txUrnInterruptMask; 12114779705SSam Leffler HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES]; 12214779705SSam Leffler HAL_ANT_SETTING ah_diversityControl; /* antenna setting */ 12314779705SSam Leffler uint32_t ah_calibrationTime; 12414779705SSam Leffler HAL_BOOL ah_bIQCalibration; 12514779705SSam Leffler int ah_rfgainState; 12614779705SSam Leffler uint32_t ah_tx6PowerInHalfDbm; /* power output for 6Mb tx */ 12714779705SSam Leffler uint32_t ah_staId1Defaults; /* STA_ID1 default settings */ 12814779705SSam Leffler uint32_t ah_beaconInterval; 12914779705SSam Leffler uint32_t ah_rssiThr; /* RSSI_THR settings */ 13014779705SSam Leffler 13114779705SSam Leffler u_int ah_sifstime; /* user-specified sifs time */ 13214779705SSam Leffler u_int ah_slottime; /* user-specified slot time */ 13314779705SSam Leffler u_int ah_acktimeout; /* user-specified ack timeout */ 13414779705SSam Leffler u_int ah_ctstimeout; /* user-specified cts timeout */ 13514779705SSam Leffler /* 13614779705SSam Leffler * RF Silent handling. 13714779705SSam Leffler */ 13814779705SSam Leffler uint32_t ah_gpioSelect; /* GPIO pin to use */ 13914779705SSam Leffler uint32_t ah_polarity; /* polarity to disable RF */ 14014779705SSam Leffler uint32_t ah_gpioBit; /* after init, prev value */ 14114779705SSam Leffler }; 14214779705SSam Leffler #define AH5211(ah) ((struct ath_hal_5211 *)(ah)) 14314779705SSam Leffler 14414779705SSam Leffler struct ath_hal; 14514779705SSam Leffler 14614779705SSam Leffler extern void ar5211Detach(struct ath_hal *); 14714779705SSam Leffler 14814779705SSam Leffler extern HAL_BOOL ar5211Reset(struct ath_hal *, HAL_OPMODE, 14959efa8b5SSam Leffler struct ieee80211_channel *, HAL_BOOL bChannelChange, 150f50e4ebfSAdrian Chadd HAL_RESET_TYPE, 15159efa8b5SSam Leffler HAL_STATUS *); 15214779705SSam Leffler extern HAL_BOOL ar5211PhyDisable(struct ath_hal *); 15314779705SSam Leffler extern HAL_BOOL ar5211Disable(struct ath_hal *); 15459efa8b5SSam Leffler extern HAL_BOOL ar5211ChipReset(struct ath_hal *, 15559efa8b5SSam Leffler const struct ieee80211_channel *); 15659efa8b5SSam Leffler extern HAL_BOOL ar5211PerCalibration(struct ath_hal *, struct ieee80211_channel *, HAL_BOOL *); 15759efa8b5SSam Leffler extern HAL_BOOL ar5211PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan, 15814779705SSam Leffler u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone); 15959efa8b5SSam Leffler extern HAL_BOOL ar5211ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *); 16014779705SSam Leffler extern HAL_BOOL ar5211SetTxPowerLimit(struct ath_hal *, uint32_t limit); 16159efa8b5SSam Leffler extern HAL_BOOL ar5211CalNoiseFloor(struct ath_hal *, 16259efa8b5SSam Leffler const struct ieee80211_channel *); 16314779705SSam Leffler extern HAL_BOOL ar5211SetAntennaSwitchInternal(struct ath_hal *, 16459efa8b5SSam Leffler HAL_ANT_SETTING, const struct ieee80211_channel *); 16514779705SSam Leffler extern int16_t ar5211GetNfAdjust(struct ath_hal *, 16614779705SSam Leffler const HAL_CHANNEL_INTERNAL *); 16714779705SSam Leffler extern HAL_BOOL ar5211ResetDma(struct ath_hal *, HAL_OPMODE); 16814779705SSam Leffler extern void ar5211InitializeGainValues(struct ath_hal *); 16914779705SSam Leffler extern HAL_RFGAIN ar5211GetRfgain(struct ath_hal *); 17014779705SSam Leffler extern void ar5211SetPCUConfig(struct ath_hal *); 17114779705SSam Leffler 17214779705SSam Leffler extern HAL_BOOL ar5211SetTxQueueProps(struct ath_hal *ah, int q, 17314779705SSam Leffler const HAL_TXQ_INFO *qInfo); 17414779705SSam Leffler extern HAL_BOOL ar5211GetTxQueueProps(struct ath_hal *ah, int q, 17514779705SSam Leffler HAL_TXQ_INFO *qInfo); 17614779705SSam Leffler extern int ar5211SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, 17714779705SSam Leffler const HAL_TXQ_INFO *qInfo); 17814779705SSam Leffler extern HAL_BOOL ar5211ReleaseTxQueue(struct ath_hal *ah, u_int q); 17914779705SSam Leffler extern HAL_BOOL ar5211ResetTxQueue(struct ath_hal *ah, u_int q); 18014779705SSam Leffler extern uint32_t ar5211GetTxDP(struct ath_hal *, u_int); 18114779705SSam Leffler extern HAL_BOOL ar5211SetTxDP(struct ath_hal *, u_int, uint32_t txdp); 18214779705SSam Leffler extern HAL_BOOL ar5211UpdateTxTrigLevel(struct ath_hal *, HAL_BOOL); 18314779705SSam Leffler extern HAL_BOOL ar5211StartTxDma(struct ath_hal *, u_int); 18414779705SSam Leffler extern HAL_BOOL ar5211StopTxDma(struct ath_hal *, u_int); 18514779705SSam Leffler extern uint32_t ar5211NumTxPending(struct ath_hal *, u_int qnum); 18614779705SSam Leffler extern HAL_BOOL ar5211IsTxQueueStopped(struct ath_hal *, u_int); 18714779705SSam Leffler extern HAL_BOOL ar5211GetTransmitFilterIndex(struct ath_hal *, uint32_t); 18814779705SSam Leffler extern HAL_BOOL ar5211SetupTxDesc(struct ath_hal *, struct ath_desc *, 18914779705SSam Leffler u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, 19014779705SSam Leffler u_int txRate0, u_int txTries0, 19114779705SSam Leffler u_int keyIx, u_int antMode, u_int flags, 19214779705SSam Leffler u_int rtsctsRate, u_int rtsctsDuration, 19314779705SSam Leffler u_int compicvLen, u_int compivLen, u_int comp); 19414779705SSam Leffler extern HAL_BOOL ar5211SetupXTxDesc(struct ath_hal *, struct ath_desc *, 19514779705SSam Leffler u_int txRate1, u_int txRetries1, 19614779705SSam Leffler u_int txRate2, u_int txRetries2, 19714779705SSam Leffler u_int txRate3, u_int txRetries3); 19814779705SSam Leffler extern HAL_BOOL ar5211FillTxDesc(struct ath_hal *, struct ath_desc *, 19946634305SAdrian Chadd HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, 20046634305SAdrian Chadd u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg, 20114779705SSam Leffler const struct ath_desc *ds0); 20214779705SSam Leffler extern HAL_STATUS ar5211ProcTxDesc(struct ath_hal *, 20314779705SSam Leffler struct ath_desc *, struct ath_tx_status *); 20414779705SSam Leffler extern void ar5211GetTxIntrQueue(struct ath_hal *ah, uint32_t *); 20514779705SSam Leffler extern void ar5211IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *); 2069ea46744SAdrian Chadd extern HAL_BOOL ar5211GetTxCompletionRates(struct ath_hal *ah, 2079ea46744SAdrian Chadd const struct ath_desc *ds0, int *rates, int *tries); 208ad3e6dcdSAdrian Chadd extern void ar5211SetTxDescLink(struct ath_hal *ah, void *ds, 209ad3e6dcdSAdrian Chadd uint32_t link); 210ad3e6dcdSAdrian Chadd extern void ar5211GetTxDescLink(struct ath_hal *ah, void *ds, 211ad3e6dcdSAdrian Chadd uint32_t *link); 212ad3e6dcdSAdrian Chadd extern void ar5211GetTxDescLinkPtr(struct ath_hal *ah, void *ds, 213ad3e6dcdSAdrian Chadd uint32_t **linkptr); 21414779705SSam Leffler 215d60a0680SAdrian Chadd extern uint32_t ar5211GetRxDP(struct ath_hal *, HAL_RX_QUEUE); 216d60a0680SAdrian Chadd extern void ar5211SetRxDP(struct ath_hal *, uint32_t rxdp, HAL_RX_QUEUE); 21714779705SSam Leffler extern void ar5211EnableReceive(struct ath_hal *); 21814779705SSam Leffler extern HAL_BOOL ar5211StopDmaReceive(struct ath_hal *); 219a8083b9cSAdrian Chadd extern void ar5211StartPcuReceive(struct ath_hal *, HAL_BOOL); 22014779705SSam Leffler extern void ar5211StopPcuReceive(struct ath_hal *); 22114779705SSam Leffler extern void ar5211SetMulticastFilter(struct ath_hal *, 22214779705SSam Leffler uint32_t filter0, uint32_t filter1); 22314779705SSam Leffler extern HAL_BOOL ar5211ClrMulticastFilterIndex(struct ath_hal *, uint32_t); 22414779705SSam Leffler extern HAL_BOOL ar5211SetMulticastFilterIndex(struct ath_hal *, uint32_t); 22514779705SSam Leffler extern uint32_t ar5211GetRxFilter(struct ath_hal *); 22614779705SSam Leffler extern void ar5211SetRxFilter(struct ath_hal *, uint32_t); 22714779705SSam Leffler extern HAL_BOOL ar5211SetupRxDesc(struct ath_hal *, struct ath_desc *, 22814779705SSam Leffler uint32_t, u_int flags); 22914779705SSam Leffler extern HAL_STATUS ar5211ProcRxDesc(struct ath_hal *, struct ath_desc *, 23014779705SSam Leffler uint32_t, struct ath_desc *, uint64_t, 23114779705SSam Leffler struct ath_rx_status *); 23214779705SSam Leffler 23314779705SSam Leffler extern void ar5211GetMacAddress(struct ath_hal *, uint8_t *); 23414779705SSam Leffler extern HAL_BOOL ar5211SetMacAddress(struct ath_hal *ah, const uint8_t *); 23514779705SSam Leffler extern void ar5211GetBssIdMask(struct ath_hal *, uint8_t *); 23614779705SSam Leffler extern HAL_BOOL ar5211SetBssIdMask(struct ath_hal *, const uint8_t *); 23714779705SSam Leffler extern HAL_BOOL ar5211EepromRead(struct ath_hal *, u_int off, uint16_t *data); 23814779705SSam Leffler extern HAL_BOOL ar5211EepromWrite(struct ath_hal *, u_int off, uint16_t data); 23914779705SSam Leffler extern HAL_BOOL ar5211SetRegulatoryDomain(struct ath_hal *, 24014779705SSam Leffler uint16_t, HAL_STATUS *); 24114779705SSam Leffler extern u_int ar5211GetWirelessModes(struct ath_hal *); 24214779705SSam Leffler extern void ar5211EnableRfKill(struct ath_hal *); 24314779705SSam Leffler extern uint32_t ar5211GpioGet(struct ath_hal *, uint32_t gpio); 24414779705SSam Leffler extern void ar5211GpioSetIntr(struct ath_hal *, u_int, uint32_t ilevel); 245869ff02eSSam Leffler extern HAL_BOOL ar5211GpioCfgOutput(struct ath_hal *, uint32_t gpio, 246869ff02eSSam Leffler HAL_GPIO_MUX_TYPE); 24714779705SSam Leffler extern HAL_BOOL ar5211GpioCfgInput(struct ath_hal *, uint32_t gpio); 24814779705SSam Leffler extern HAL_BOOL ar5211GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val); 24914779705SSam Leffler extern void ar5211SetLedState(struct ath_hal *, HAL_LED_STATE); 25014779705SSam Leffler extern u_int ar5211AntennaGet(struct ath_hal *); 25114779705SSam Leffler extern void ar5211WriteAssocid(struct ath_hal *, 25214779705SSam Leffler const uint8_t *bssid, uint16_t assocId); 25314779705SSam Leffler extern uint64_t ar5211GetTsf64(struct ath_hal *); 25414779705SSam Leffler extern uint32_t ar5211GetTsf32(struct ath_hal *); 25514779705SSam Leffler extern void ar5211ResetTsf(struct ath_hal *); 25614779705SSam Leffler extern uint32_t ar5211GetMaxTurboRate(struct ath_hal *); 25714779705SSam Leffler extern uint32_t ar5211GetRandomSeed(struct ath_hal *); 25814779705SSam Leffler extern HAL_BOOL ar5211DetectCardPresent(struct ath_hal *); 25914779705SSam Leffler extern void ar5211UpdateMibCounters(struct ath_hal *, HAL_MIB_STATS *); 26014779705SSam Leffler extern void ar5211EnableHwEncryption(struct ath_hal *); 26114779705SSam Leffler extern void ar5211DisableHwEncryption(struct ath_hal *); 26214779705SSam Leffler extern HAL_BOOL ar5211SetSlotTime(struct ath_hal *, u_int); 26314779705SSam Leffler extern u_int ar5211GetSlotTime(struct ath_hal *); 26414779705SSam Leffler extern HAL_BOOL ar5211SetAckTimeout(struct ath_hal *, u_int); 26514779705SSam Leffler extern u_int ar5211GetAckTimeout(struct ath_hal *); 26614779705SSam Leffler extern HAL_BOOL ar5211SetAckCTSRate(struct ath_hal *, u_int); 26714779705SSam Leffler extern u_int ar5211GetAckCTSRate(struct ath_hal *); 26814779705SSam Leffler extern HAL_BOOL ar5211SetCTSTimeout(struct ath_hal *, u_int); 26914779705SSam Leffler extern u_int ar5211GetCTSTimeout(struct ath_hal *); 27014779705SSam Leffler extern HAL_BOOL ar5211SetSifsTime(struct ath_hal *, u_int); 27114779705SSam Leffler extern u_int ar5211GetSifsTime(struct ath_hal *); 27214779705SSam Leffler extern HAL_BOOL ar5211SetDecompMask(struct ath_hal *, uint16_t, int); 27314779705SSam Leffler extern void ar5211SetCoverageClass(struct ath_hal *, uint8_t, int); 274aa36f34dSAdrian Chadd extern HAL_STATUS ar5211SetQuiet(struct ath_hal *, uint32_t, uint32_t, 275aa36f34dSAdrian Chadd uint32_t, HAL_QUIET_FLAG); 27614779705SSam Leffler extern uint32_t ar5211GetCurRssi(struct ath_hal *); 27714779705SSam Leffler extern u_int ar5211GetDefAntenna(struct ath_hal *); 27814779705SSam Leffler extern void ar5211SetDefAntenna(struct ath_hal *ah, u_int antenna); 27914779705SSam Leffler extern HAL_ANT_SETTING ar5211GetAntennaSwitch(struct ath_hal *); 28014779705SSam Leffler extern HAL_BOOL ar5211SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); 28114779705SSam Leffler extern HAL_STATUS ar5211GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, 28214779705SSam Leffler uint32_t, uint32_t *); 28314779705SSam Leffler extern HAL_BOOL ar5211SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, 28414779705SSam Leffler uint32_t, uint32_t, HAL_STATUS *); 28514779705SSam Leffler extern HAL_BOOL ar5211GetDiagState(struct ath_hal *ah, int request, 28614779705SSam Leffler const void *args, uint32_t argsize, 28714779705SSam Leffler void **result, uint32_t *resultsize); 288352f07f6SAdrian Chadd extern uint32_t ar5211Get11nExtBusy(struct ath_hal *); 289352f07f6SAdrian Chadd extern HAL_BOOL ar5211GetMibCycleCounts(struct ath_hal *, 290352f07f6SAdrian Chadd HAL_SURVEY_SAMPLE *); 291d2a72d67SAdrian Chadd extern void ar5211SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t); 292bed90bf8SAdrian Chadd extern void ar5211SetNav(struct ath_hal *ah, u_int); 293bed90bf8SAdrian Chadd extern u_int ar5211GetNav(struct ath_hal *ah); 294d2a72d67SAdrian Chadd 295a41607fcSAdrian Chadd extern void ar5211EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *); 296a41607fcSAdrian Chadd extern void ar5211GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *); 29714779705SSam Leffler 29814779705SSam Leffler extern u_int ar5211GetKeyCacheSize(struct ath_hal *); 29914779705SSam Leffler extern HAL_BOOL ar5211IsKeyCacheEntryValid(struct ath_hal *, uint16_t); 30014779705SSam Leffler extern HAL_BOOL ar5211ResetKeyCacheEntry(struct ath_hal *, uint16_t entry); 30114779705SSam Leffler extern HAL_BOOL ar5211SetKeyCacheEntry(struct ath_hal *, uint16_t entry, 30214779705SSam Leffler const HAL_KEYVAL *, const uint8_t *mac, 30314779705SSam Leffler int xorKey); 30414779705SSam Leffler extern HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *, 30514779705SSam Leffler uint16_t, const uint8_t *); 30614779705SSam Leffler 307*1e65df68SJohn Baldwin extern HAL_BOOL ar5211SetPowerMode(struct ath_hal *, HAL_POWER_MODE mode, 30814779705SSam Leffler int setChip); 30914779705SSam Leffler extern HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *); 31014779705SSam Leffler 31114779705SSam Leffler extern void ar5211SetBeaconTimers(struct ath_hal *, 31214779705SSam Leffler const HAL_BEACON_TIMERS *); 31314779705SSam Leffler extern void ar5211BeaconInit(struct ath_hal *, uint32_t, uint32_t); 31414779705SSam Leffler extern void ar5211SetStaBeaconTimers(struct ath_hal *, 31514779705SSam Leffler const HAL_BEACON_STATE *); 31614779705SSam Leffler extern void ar5211ResetStaBeaconTimers(struct ath_hal *); 317fc4de9b7SAdrian Chadd extern uint64_t ar5211GetNextTBTT(struct ath_hal *); 31814779705SSam Leffler 31914779705SSam Leffler extern HAL_BOOL ar5211IsInterruptPending(struct ath_hal *); 32014779705SSam Leffler extern HAL_BOOL ar5211GetPendingInterrupts(struct ath_hal *, HAL_INT *); 32114779705SSam Leffler extern HAL_INT ar5211GetInterrupts(struct ath_hal *); 32214779705SSam Leffler extern HAL_INT ar5211SetInterrupts(struct ath_hal *, HAL_INT ints); 32314779705SSam Leffler 32414779705SSam Leffler extern const HAL_RATE_TABLE *ar5211GetRateTable(struct ath_hal *, u_int mode); 32514779705SSam Leffler 32614779705SSam Leffler extern HAL_BOOL ar5211AniControl(struct ath_hal *, HAL_ANI_CMD, int ); 327a108ab63SAdrian Chadd extern void ar5211RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, 32859efa8b5SSam Leffler const struct ieee80211_channel *); 329a108ab63SAdrian Chadd extern void ar5211AniPoll(struct ath_hal *, const struct ieee80211_channel *); 33014779705SSam Leffler extern void ar5211MibEvent(struct ath_hal *, const HAL_NODE_STATS *); 33114779705SSam Leffler #endif /* _ATH_AR5211_H_ */ 332