28#define AR5416_MAGIC 0x20065416
49#define AR5416_DEFAULT_RXCHAINMASK 7
50#define AR5416_DEFAULT_TXCHAINMASK 1
51#define AR5416_MAX_RATE_POWER 63
52#define AR5416_KEYTABLE_SIZE 128
54#define AR5416_CCA_MAX_GOOD_VALUE -85
55#define AR5416_CCA_MAX_HIGH_VALUE -62
56#define AR5416_CCA_MIN_BAD_VALUE -140
57#define AR9285_CCA_MAX_GOOD_VALUE -118
59#define AR5416_SPUR_RSSI_THRESH 40
82 const struct ieee80211_channel *);
84 const struct ieee80211_channel *);
88 const struct ieee80211_channel *);
99 const struct ieee80211_channel *chan,
100 int16_t *pTxPowerIndexOffset);
104 const struct ieee80211_channel *chan);
162#define AH5416(_ah) ((struct ath_hal_5416 *)(_ah))
164#define IS_5416_PCI(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCI)
165#define IS_5416_PCIE(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCIE)
167#define IS_PCIE(ah) (IS_5416_PCIE(ah))
189 const struct ieee80211_channel *);
196 uint32_t next_beacon, uint32_t beacon_period);
256 const void *args, uint32_t argsize,
257 void **result, uint32_t *resultsize);
259 const struct ieee80211_channel *chan,
HAL_BOOL enable);
266 struct ath_rx_status *rxs, uint64_t fulltsf,
const char *buf,
287 const HAL_KEYVAL *k,
const uint8_t *mac,
int xorKey);
295 struct ath_desc *, uint32_t size, u_int flags);
297 uint32_t,
struct ath_desc *, uint64_t,
301 struct ieee80211_channel *chan,
309 const struct ieee80211_channel *,
313 const struct ieee80211_channel *);
317 const struct ieee80211_channel *, uint16_t *);
319 struct ieee80211_channel *chan);
321 const struct ieee80211_channel *chan,
CHAN_CENTERS *centers);
323 const struct ieee80211_channel *chan,
332 const struct ieee80211_channel *chan,
335 uint16_t numRates,
HAL_BOOL isHt40Target);
337 const struct ieee80211_channel *chan,
340 uint16_t numRates,
HAL_BOOL isExtTarget);
344 const struct ieee80211_channel *chan);
348 const struct ieee80211_channel *chan);
353 uint8_t * bChans, uint16_t availPiers,
354 uint16_t tPdGainOverlap, int16_t *pMinCalPower,
355 uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues,
356 uint16_t numXpdGains);
358 int i, uint16_t pdGainOverlap_t2,
359 uint16_t gainBoundaries[]);
361 uint16_t xpdGainValues[]);
363 uint16_t numXpdGain, uint16_t xpdGainValues[]);
365 uint8_t pdadcValues[]);
367 struct ar5416eeprom *pEepData,
const struct ieee80211_channel *chan,
368 int16_t *pTxPowerIndexOffset);
370 const struct ieee80211_channel *chan,
const int16_t ratesArray[]);
374 u_int pktLen, u_int hdrLen,
HAL_PKT_TYPE type, u_int txPower,
375 u_int txRate0, u_int txTries0,
376 u_int keyIx, u_int antMode, u_int flags,
377 u_int rtsctsRate, u_int rtsctsDuration,
378 u_int compicvLen, u_int compivLen, u_int comp);
380 u_int txRate1, u_int txRetries1,
381 u_int txRate2, u_int txRetries2,
382 u_int txRate3, u_int txRetries3);
390 const struct ath_desc *ds0,
int *rates,
int *tries);
398 u_int pktLen, u_int hdrLen,
HAL_PKT_TYPE type, u_int keyIx,
402 u_int aggrLen, u_int flags, u_int txPower, u_int txRate0, u_int txTries0,
403 u_int antMode, u_int rtsctsRate, u_int rtsctsDuration);
410 u_int nseries, u_int flags);
413 u_int aggrLen, u_int numDelims);
bus_space_tag_t HAL_BUS_TAG
bus_space_handle_t HAL_BUS_HANDLE
enum Ar5416_Rates AR5416_RATES
void ar5416SetGainBoundariesClosedLoop(struct ath_hal *ah, int i, uint16_t pdGainOverlap_t2, uint16_t gainBoundaries[])
void ar5416Set11nBurstDuration(struct ath_hal *ah, struct ath_desc *ds, u_int burstDuration)
HAL_BOOL ar5416AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param)
void ar5416GetChannelCenters(struct ath_hal *, const struct ieee80211_channel *chan, CHAN_CENTERS *centers)
void ar5416WriteDetectorGainBiases(struct ath_hal *ah, uint16_t numXpdGain, uint16_t xpdGainValues[])
void ar5416SetBeaconTimers(struct ath_hal *, const HAL_BEACON_TIMERS *)
void ar5416AniPoll(struct ath_hal *, const struct ieee80211_channel *)
void ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, struct ath_desc *ds, u_int vmf)
HAL_BOOL ar5416ChainTxDesc(struct ath_hal *ah, struct ath_desc *ds, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int keyIx, HAL_CIPHER cipher, uint8_t delims, HAL_BOOL firstSeg, HAL_BOOL lastSeg, HAL_BOOL lastAggr)
void ar5416RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, const struct ieee80211_channel *)
void ar5416ResetTsf(struct ath_hal *ah)
void ar5416SetBTCoexInfo(struct ath_hal *ah, HAL_BT_COEX_INFO *btinfo)
HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx, u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, u_int compivLen, u_int comp)
HAL_BOOL ar5416GetPendingInterrupts(struct ath_hal *, HAL_INT *masked)
HAL_BOOL ar5416EepromRead(struct ath_hal *, u_int off, uint16_t *data)
u_int ar5416GetWirelessModes(struct ath_hal *ah)
HAL_BOOL ar5416SetGlobalTxTimeout(struct ath_hal *ah, u_int tu)
HAL_BOOL ar5416SetBoardValues(struct ath_hal *, const struct ieee80211_channel *)
void ar5416ResetStaBeaconTimers(struct ath_hal *ah)
void ar5416ConfigureSpectralScan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
HAL_BOOL ar5416GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *ds0, int *rates, int *tries)
HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah)
void ar5416WriteTxPowerRateRegisters(struct ath_hal *ah, const struct ieee80211_channel *chan, const int16_t ratesArray[])
void ar5416GetSpectralParams(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
HAL_BOOL ar5416SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry, const HAL_KEYVAL *k, const uint8_t *mac, int xorKey)
void ar5416StopSpectralScan(struct ath_hal *ah)
uint64_t ar5416GetTsf64(struct ath_hal *ah)
HAL_STATUS ar5416GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t *result)
void ar5416BTCoexConfig(struct ath_hal *ah, HAL_BT_COEX_CONFIG *btconf)
void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum)
void ar5416GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel)
void ar5416InitState(struct ath_hal_5416 *, uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
void ar5416WritePdadcValues(struct ath_hal *ah, int i, uint8_t pdadcValues[])
void ar5416SetTsf64(struct ath_hal *ah, uint64_t tsf64)
void ar5416SetRxFilter(struct ath_hal *ah, uint32_t bits)
void ar5416BeaconInit(struct ath_hal *ah, uint32_t next_beacon, uint32_t beacon_period)
void ar5416RestoreChainMask(struct ath_hal *ah)
void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan)
uint32_t ar5416GetSpectralConfig(struct ath_hal *ah)
HAL_RFGAIN ar5416GetRfgain(struct ath_hal *ah)
uint32_t ar5416GpioGet(struct ath_hal *ah, uint32_t gpio)
HAL_INT ar5416SetInterrupts(struct ath_hal *ah, HAL_INT ints)
HAL_BOOL ar5416SetupRxDesc(struct ath_hal *, struct ath_desc *, uint32_t size, u_int flags)
HAL_BOOL ar2133RfAttach(struct ath_hal *, HAL_STATUS *)
HAL_BOOL ar5416GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
HAL_BOOL ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, HAL_RESET_TYPE, HAL_STATUS *status)
HAL_BOOL ar5416ChipReset(struct ath_hal *ah, const struct ieee80211_channel *, HAL_RESET_TYPE)
uint32_t ar5416GetCurRssi(struct ath_hal *ah)
void ar5416GetTargetPowersLeg(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_TARGET_POWER_LEG *powInfo, uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, uint16_t numRates, HAL_BOOL isExtTarget)
HAL_BOOL ar5416StopDmaReceive(struct ath_hal *ah)
HAL_BOOL ar5416ResetTxQueue(struct ath_hal *ah, u_int q)
HAL_BOOL ar5416ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry)
void ar5416Detach(struct ath_hal *ah)
HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
const HAL_RATE_TABLE * ar5416GetRateTable(struct ath_hal *, u_int mode)
void ar5416StartPcuReceive(struct ath_hal *ah, HAL_BOOL)
void ar5416AttachPCIE(struct ath_hal *ah)
void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode)
void ar5416SetLedState(struct ath_hal *ah, HAL_LED_STATE state)
HAL_BOOL ar5416SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING)
void ar5416Set11nRateScenario(struct ath_hal *ah, struct ath_desc *ds, u_int durUpdateEn, u_int rtsctsRate, HAL_11N_RATE_SERIES series[], u_int nseries, u_int flags)
HAL_BOOL ar5416GpioCfgOutput(struct ath_hal *, uint32_t gpio, HAL_GPIO_MUX_TYPE)
HAL_BOOL ar5416GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val)
HAL_BOOL ar5416EepromWrite(struct ath_hal *, u_int off, uint16_t data)
void ar5416RestoreSpectralConfig(struct ath_hal *ah, uint32_t restoreval)
HAL_BOOL ar5416GpioCfgInput(struct ath_hal *, uint32_t gpio)
HAL_BOOL ar5416SetTransmitPower(struct ath_hal *, const struct ieee80211_channel *, uint16_t *)
void ar5416SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t)
void ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
void ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds)
HAL_BOOL ar5416GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
HAL_BOOL ar5416SetupXTxDesc(struct ath_hal *, struct ath_desc *, u_int txRate1, u_int txRetries1, u_int txRate2, u_int txRetries2, u_int txRate3, u_int txRetries3)
void ar5416BTCoexSetParameter(struct ath_hal *ah, uint32_t type, uint32_t value)
void ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
HAL_BOOL ar5416GetPowerStatus(struct ath_hal *ah)
HAL_BOOL ar5416IsSpectralActive(struct ath_hal *ah)
#define AR5416_KEYTABLE_SIZE
void ar5416SetCoverageClass(struct ath_hal *, uint8_t, int)
void ar5416StopPcuReceive(struct ath_hal *ah)
void ar5416AniDetach(struct ath_hal *)
uint16_t ar5416GetXpdGainValues(struct ath_hal *ah, uint16_t xpdMask, uint16_t xpdGainValues[])
HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize)
void ar5416AniReset(struct ath_hal *, const struct ieee80211_channel *, HAL_OPMODE, int)
uint64_t ar5416GetNextTBTT(struct ath_hal *)
void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, uint32_t thresh)
HAL_BOOL ar5416FillTxDesc(struct ath_hal *ah, struct ath_desc *ds, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg, const struct ath_desc *ds0)
HAL_BOOL ar5416IsFastClockEnabled(struct ath_hal *ah)
uint32_t ar5416Get11nExtBusy(struct ath_hal *ah)
void ar5416GetTargetPowers(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_TARGET_POWER_HT *powInfo, uint16_t numChannels, CAL_TARGET_POWER_HT *pNewPower, uint16_t numRates, HAL_BOOL isHt40Target)
void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType)
void ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims)
void ar5416EepromSetAddac(struct ath_hal *ah, const struct ieee80211_channel *chan)
void ar5416Set11nAggrFirst(struct ath_hal *ah, struct ath_desc *ds, u_int aggrLen, u_int numDelims)
int ar5416BTCoexEnable(struct ath_hal *ah)
void ar5416BTCoexAntennaDiversity(struct ath_hal *ah)
uint16_t ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz)
HAL_BOOL ar5416IsSpectralEnabled(struct ath_hal *ah)
HAL_STATUS ar5416SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag)
HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q)
void ar5416SetRatesArrayFromTargetPower(struct ath_hal *ah, const struct ieee80211_channel *chan, int16_t *ratesArray, const CAL_TARGET_POWER_LEG *targetPowerCck, const CAL_TARGET_POWER_LEG *targetPowerCckExt, const CAL_TARGET_POWER_LEG *targetPowerOfdm, const CAL_TARGET_POWER_LEG *targetPowerOfdmExt, const CAL_TARGET_POWER_HT *targetPowerHt20, const CAL_TARGET_POWER_HT *targetPowerHt40)
HAL_BOOL ar5416PhyDisable(struct ath_hal *ah)
HAL_BOOL ar5416Disable(struct ath_hal *ah)
HAL_BOOL ar5416SetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t val, HAL_STATUS *status)
void ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds)
HAL_BOOL ar5416SetTxPowerLimit(struct ath_hal *ah, uint32_t limit)
HAL_STATUS ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc *, uint32_t, struct ath_desc *, uint64_t, struct ath_rx_status *)
void ar5416BTCoexDisable(struct ath_hal *ah)
HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, const struct ieee80211_channel *chan, HAL_BOOL enable)
HAL_BOOL ar5416SetupLastTxDesc(struct ath_hal *ah, struct ath_desc *ds, const struct ath_desc *ds0)
HAL_BOOL ar5416FillCapabilityInfo(struct ath_hal *ah)
void ar5416InitChainMasks(struct ath_hal *ah)
void ar5416StartSpectralScan(struct ath_hal *ah)
void ar5416AniAttach(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *, HAL_BOOL ena)
HAL_STATUS ar5416ProcTxDesc(struct ath_hal *ah, struct ath_desc *, struct ath_tx_status *)
void ar5416ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *)
void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet, uint8_t *bChans, uint16_t availPiers, uint16_t tPdGainOverlap, int16_t *pMinCalPower, uint16_t *pPdGainBoundaries, uint8_t *pPDADCValues, uint16_t numXpdGains)
HAL_BOOL ar5416SetupFirstTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int aggrLen, u_int flags, u_int txPower, u_int txRate0, u_int txTries0, u_int antMode, u_int rtsctsRate, u_int rtsctsDuration)
u_int ar5416GetGlobalTxTimeout(struct ath_hal *ah)
int ar5416SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, const HAL_TXQ_INFO *qInfo)
HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset)
HAL_BOOL ar5416AniSetParams(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *)
HAL_BOOL ar5416SetResetReg(struct ath_hal *, uint32_t type)
uint32_t ar5416GetRadioRev(struct ath_hal *ah)
HAL_POWER_MODE ar5416GetPowerMode(struct ath_hal *ah)
HAL_BOOL ar5416GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan)
HAL_BOOL ar5416IsInterruptPending(struct ath_hal *ah)
HAL_BOOL ar5416ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
uint32_t ar5416GetRxFilter(struct ath_hal *ah)
void ar5416Set11nRxClear(struct ath_hal *ah, HAL_HT_RXCLEAR rxclear)
int ar5416GetRegChainOffset(struct ath_hal *ah, int i)
void ar5416SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *)
HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int)
void ar5416InitBTCoex(struct ath_hal *ah)
void(* ah_writeIni)(struct ath_hal *, const struct ieee80211_channel *)
struct ar5416NfLimits nf_2g
HAL_INI_ARRAY ah_ini_bank0
HAL_INI_ARRAY ah_ini_bank1
HAL_BOOL ah_btCoexEnabled
uint8_t ah_btCoexConfigType
struct ar5416PerCal ah_cal
HAL_INI_ARRAY ah_ini_addac
HAL_BOOL(* ah_setPowerCalTable)(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset)
HAL_ANI_CMD ah_ani_function
void(* ah_olcInit)(struct ath_hal *)
HAL_INI_ARRAY ah_ini_pcieserdes
HAL_BOOL ah_btCoexSingleAnt
HAL_INI_ARRAY ah_ini_bb_rfgain
HAL_INI_ARRAY ah_ini_bank3
HAL_BOOL(* ah_cal_initcal)(struct ath_hal *, const struct ieee80211_channel *)
HAL_INI_ARRAY ah_ini_bank2
void(* ah_btCoexSetDiversity)(struct ath_hal *ah)
void(* ah_spurMitigate)(struct ath_hal *, const struct ieee80211_channel *)
uint32_t ah_btCoexWLANWeight
HAL_INI_ARRAY ah_ini_bank6
int16_t ah_ratesArray[Ar5416RateSize]
uint8_t ah_btActivePolarity
void(* ah_initPLL)(struct ath_hal *ah, const struct ieee80211_channel *chan)
int ah_ht40PowerIncForPdadc
struct ath_hal_5212 ah_5212
uint8_t ah_btPriorityGpioSelect
uint8_t ah_btActiveGpioSelect
void(* ah_cal_pacal)(struct ath_hal *, HAL_BOOL is_reset)
uint8_t ah_keytype[AR5416_KEYTABLE_SIZE]
uint32_t ah_btCoexBTWeight
uint8_t ah_wlanActiveGpioSelect
HAL_BT_MODULE ah_btModule
HAL_INI_ARRAY ah_ini_bank7
void(* ah_olcTempCompensation)(struct ath_hal *)
uint8_t ah_btWlanIsolation
struct ar5416NfLimits nf_5g
int ah_need_an_top2_fixup