34 uint16_t flags, uint16_t *low, uint16_t *high);
36 struct ieee80211_channel *chan);
178#ifdef AH_SUPPORT_WRITE_EEPROM
198 for (i = 0; i < 8; i++)
201 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);
213#define N(a) (sizeof(a)/sizeof(a[0]))
221 __func__, sc, (
void*) st, (
void*) sh);
227 "%s: cannot allocate memory for state block\n", __func__);
273 "%s: Mac Chip Rev 0x%x is not supported by this driver\n",
300 "%s: 5G Radio Chip Rev 0x%02X is not supported by this "
310 "%u (0x%x) found\n", __func__, val, val);
332 "%s: 2G Radio Chip Rev 0x%x is not supported by "
333 "this driver\n", __func__,
345 "%s: cannot read regulatory domain from EEPROM\n",
363 "%s: error getting mac address from EEPROM\n", __func__);
396 uint32_t patternData[4] =
397 { 0x55555555, 0xaaaaaaaa, 0x66666666, 0x99999999 };
401 for (i = 0; i < 2; i++) {
402 uint32_t addr = regAddr[i];
403 uint32_t wrData, rdData;
406 for (j = 0; j < 0x100; j++) {
407 wrData = (j << 16) | j;
410 if (rdData != wrData) {
412"%s: address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n",
413 __func__, addr, wrData, rdData);
417 for (j = 0; j < 4; j++) {
418 wrData = patternData[j];
421 if (wrData != rdData) {
423"%s: address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n",
424 __func__, addr, wrData, rdData);
439 uint16_t flags, uint16_t *low, uint16_t *high)
441 if (flags & IEEE80211_CHAN_5GHZ) {
446 if (flags & IEEE80211_CHAN_2GHZ &&
460 "%s: no min/max power for %u/0x%x\n",
461 __func__, chan->ic_freq, chan->ic_flags);
463 chan->ic_minpower = 0;
552 return "Atheros 5211";
554 return "Atheros 5211 (FPGA)";
uint32_t ath_hal_reverseBits(uint32_t val, uint32_t n)
int16_t ath_hal_getChanNoise(struct ath_hal *ah, const struct ieee80211_channel *chan)
#define HAL_NUM_TX_QUEUES
#define ATHEROS_VENDOR_ID
HAL_STATUS ath_hal_legacyEepromAttach(struct ath_hal *ah)
#define ath_hal_eepromSet(_ah, _param, _val)
#define ath_hal_eepromGet(_ah, _param, _val)
void * ath_hal_malloc(size_t)
#define HALDEBUG(_ah, __m,...)
#define ath_hal_eepromGetFlag(_ah, _param)
#define ath_hal_eepromDetach(_ah)
void ath_hal_free(void *p)
bus_space_tag_t HAL_BUS_TAG
#define OS_REG_WRITE(_ah, _reg, _val)
bus_space_handle_t HAL_BUS_HANDLE
#define OS_MEMCPY(_d, _s, _n)
#define OS_REG_READ(_ah, _reg)
HAL_BOOL ar5211GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *ds0, int *rates, int *tries)
HAL_BOOL ar5211ResetTxQueue(struct ath_hal *ah, u_int q)
HAL_BOOL ar5211GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val)
void ar5211SetRxDP(struct ath_hal *, uint32_t rxdp, HAL_RX_QUEUE)
HAL_BOOL ar5211FillTxDesc(struct ath_hal *, struct ath_desc *, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg, const struct ath_desc *ds0)
void ar5211SetCoverageClass(struct ath_hal *, uint8_t, int)
u_int ar5211GetAckCTSRate(struct ath_hal *)
u_int ar5211GetNav(struct ath_hal *ah)
HAL_BOOL ar5211SetTxPowerLimit(struct ath_hal *, uint32_t limit)
void ar5211SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t)
HAL_BOOL ar5211SetSifsTime(struct ath_hal *, u_int)
HAL_BOOL ar5211SetMulticastFilterIndex(struct ath_hal *, uint32_t)
HAL_BOOL ar5211SetMacAddress(struct ath_hal *ah, const uint8_t *)
HAL_BOOL ar5211GpioCfgOutput(struct ath_hal *, uint32_t gpio, HAL_GPIO_MUX_TYPE)
HAL_BOOL ar5211SetupRxDesc(struct ath_hal *, struct ath_desc *, uint32_t, u_int flags)
void ar5211IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *)
void ar5211GetBssIdMask(struct ath_hal *, uint8_t *)
HAL_BOOL ar5211EepromWrite(struct ath_hal *, u_int off, uint16_t data)
void ar5211SetStaBeaconTimers(struct ath_hal *, const HAL_BEACON_STATE *)
HAL_BOOL ar5211UpdateTxTrigLevel(struct ath_hal *, HAL_BOOL)
HAL_RFGAIN ar5211GetRfgain(struct ath_hal *)
void ar5211GpioSetIntr(struct ath_hal *, u_int, uint32_t ilevel)
const HAL_RATE_TABLE * ar5211GetRateTable(struct ath_hal *, u_int mode)
HAL_BOOL ar5211SetRegulatoryDomain(struct ath_hal *, uint16_t, HAL_STATUS *)
void ar5211WriteAssocid(struct ath_hal *, const uint8_t *bssid, uint16_t assocId)
uint64_t ar5211GetNextTBTT(struct ath_hal *)
HAL_BOOL ar5211ChipReset(struct ath_hal *, const struct ieee80211_channel *)
HAL_STATUS ar5211SetQuiet(struct ath_hal *, uint32_t, uint32_t, uint32_t, HAL_QUIET_FLAG)
u_int ar5211GetWirelessModes(struct ath_hal *)
uint32_t ar5211GetTxDP(struct ath_hal *, u_int)
HAL_BOOL ar5211ReleaseTxQueue(struct ath_hal *ah, u_int q)
int16_t ar5211GetNfAdjust(struct ath_hal *, const HAL_CHANNEL_INTERNAL *)
HAL_BOOL ar5211PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan, u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone)
HAL_BOOL ar5211SetTxDP(struct ath_hal *, u_int, uint32_t txdp)
u_int ar5211GetKeyCacheSize(struct ath_hal *)
u_int ar5211GetSlotTime(struct ath_hal *)
void ar5211EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *)
void ar5211GetTxDescLink(struct ath_hal *ah, void *ds, uint32_t *link)
void ar5211EnableReceive(struct ath_hal *)
uint64_t ar5211GetTsf64(struct ath_hal *)
HAL_BOOL ar5211GetPendingInterrupts(struct ath_hal *, HAL_INT *)
void ar5211SetBeaconTimers(struct ath_hal *, const HAL_BEACON_TIMERS *)
HAL_INT ar5211GetInterrupts(struct ath_hal *)
HAL_ANT_SETTING ar5211GetAntennaSwitch(struct ath_hal *)
uint32_t ar5211NumTxPending(struct ath_hal *, u_int qnum)
HAL_BOOL ar5211SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t, HAL_STATUS *)
HAL_STATUS ar5211ProcTxDesc(struct ath_hal *, struct ath_desc *, struct ath_tx_status *)
HAL_BOOL ar5211SetupXTxDesc(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 ar5211SetMulticastFilter(struct ath_hal *, uint32_t filter0, uint32_t filter1)
HAL_BOOL ar5211SetAckTimeout(struct ath_hal *, u_int)
void ar5211AniPoll(struct ath_hal *, const struct ieee80211_channel *)
HAL_BOOL ar5211Disable(struct ath_hal *)
void ar5211GetTxIntrQueue(struct ath_hal *ah, uint32_t *)
HAL_BOOL ar5211StartTxDma(struct ath_hal *, u_int)
HAL_STATUS ar5211GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t *)
HAL_BOOL ar5211StopDmaReceive(struct ath_hal *)
HAL_BOOL ar5211IsInterruptPending(struct ath_hal *)
uint32_t ar5211GetRxFilter(struct ath_hal *)
uint32_t ar5211GetTsf32(struct ath_hal *)
void ar5211GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *)
HAL_POWER_MODE ar5211GetPowerMode(struct ath_hal *)
HAL_BOOL ar5211SetCTSTimeout(struct ath_hal *, u_int)
void ar5211BeaconInit(struct ath_hal *, uint32_t, uint32_t)
HAL_BOOL ar5211SetBssIdMask(struct ath_hal *, const uint8_t *)
void ar5211GetTxDescLinkPtr(struct ath_hal *ah, void *ds, uint32_t **linkptr)
uint32_t ar5211Get11nExtBusy(struct ath_hal *)
HAL_BOOL ar5211PhyDisable(struct ath_hal *)
void ar5211InitializeGainValues(struct ath_hal *)
void ar5211ResetStaBeaconTimers(struct ath_hal *)
void ar5211UpdateMibCounters(struct ath_hal *, HAL_MIB_STATS *)
u_int ar5211GetAckTimeout(struct ath_hal *)
int ar5211SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, const HAL_TXQ_INFO *qInfo)
void ar5211SetLedState(struct ath_hal *, HAL_LED_STATE)
HAL_BOOL ar5211StopTxDma(struct ath_hal *, u_int)
void ar5211StopPcuReceive(struct ath_hal *)
HAL_BOOL ar5211SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING)
u_int ar5211GetSifsTime(struct ath_hal *)
HAL_BOOL ar5211GetMibCycleCounts(struct ath_hal *, HAL_SURVEY_SAMPLE *)
HAL_BOOL ar5211ResetKeyCacheEntry(struct ath_hal *, uint16_t entry)
HAL_STATUS ar5211ProcRxDesc(struct ath_hal *, struct ath_desc *, uint32_t, struct ath_desc *, uint64_t, struct ath_rx_status *)
HAL_BOOL ar5211ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *)
HAL_BOOL ar5211SetupTxDesc(struct ath_hal *, struct ath_desc *, 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)
u_int ar5211GetCTSTimeout(struct ath_hal *)
HAL_BOOL ar5211SetSlotTime(struct ath_hal *, u_int)
uint32_t ar5211GpioGet(struct ath_hal *, uint32_t gpio)
void ar5211GetMacAddress(struct ath_hal *, uint8_t *)
void ar5211SetRxFilter(struct ath_hal *, uint32_t)
HAL_BOOL ar5211SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo)
u_int ar5211GetDefAntenna(struct ath_hal *)
HAL_BOOL ar5211SetPowerMode(struct ath_hal *, uint32_t powerRequest, int setChip)
HAL_BOOL ar5211GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize)
HAL_BOOL ar5211GetTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo)
HAL_BOOL ar5211SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *)
HAL_BOOL ar5211Reset(struct ath_hal *, HAL_OPMODE, struct ieee80211_channel *, HAL_BOOL bChannelChange, HAL_RESET_TYPE, HAL_STATUS *)
HAL_BOOL ar5211GpioCfgInput(struct ath_hal *, uint32_t gpio)
void ar5211SetNav(struct ath_hal *ah, u_int)
void ar5211SetTxDescLink(struct ath_hal *ah, void *ds, uint32_t link)
uint32_t ar5211GetRxDP(struct ath_hal *, HAL_RX_QUEUE)
HAL_BOOL ar5211IsKeyCacheEntryValid(struct ath_hal *, uint16_t)
void ar5211StartPcuReceive(struct ath_hal *, HAL_BOOL)
void ar5211ResetTsf(struct ath_hal *)
void ar5211MibEvent(struct ath_hal *, const HAL_NODE_STATS *)
HAL_BOOL ar5211EepromRead(struct ath_hal *, u_int off, uint16_t *data)
void ar5211RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, const struct ieee80211_channel *)
HAL_BOOL ar5211DetectCardPresent(struct ath_hal *)
void ar5211SetPCUConfig(struct ath_hal *)
HAL_BOOL ar5211SetDecompMask(struct ath_hal *, uint16_t, int)
HAL_BOOL ar5211ClrMulticastFilterIndex(struct ath_hal *, uint32_t)
void ar5211SetDefAntenna(struct ath_hal *ah, u_int antenna)
HAL_BOOL ar5211SetAckCTSRate(struct ath_hal *, u_int)
HAL_INT ar5211SetInterrupts(struct ath_hal *, HAL_INT ints)
HAL_BOOL ar5211SetKeyCacheEntry(struct ath_hal *, uint16_t entry, const HAL_KEYVAL *, const uint8_t *mac, int xorKey)
HAL_BOOL ar5211PerCalibration(struct ath_hal *, struct ieee80211_channel *, HAL_BOOL *)
static void ar5211DisablePCIE(struct ath_hal *ah)
static uint32_t ar5211GetRadioRev(struct ath_hal *ah)
static void ar5211ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore, HAL_BOOL power_off)
AH_CHIP(AR5211, ar5211Probe, ar5211Attach)
static const struct ath_hal_private ar5211hal
static const char * ar5211Probe(uint16_t vendorid, uint16_t devid)
static HAL_BOOL ar5211GetChannelEdges(struct ath_hal *ah, uint16_t flags, uint16_t *low, uint16_t *high)
void ar5211Detach(struct ath_hal *ah)
static HAL_BOOL ar5211GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan)
static HAL_BOOL ar5211FillCapabilityInfo(struct ath_hal *ah)
static struct ath_hal * ar5211Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config, HAL_STATUS *status)
static HAL_BOOL ar5211ChipTest(struct ath_hal *)
#define AR5211_PHY_MODE_OFDM
#define AR_PHY_PLL_CTL_44
#define AR_SREV_REVISION_M
#define AR_PCICFG_EEPROM_SIZE_M
#define AR_PCICFG_EEPROM_SIZE_16K
#define AR_PCICFG_EEPROM_SIZE_S
#define AR_SREV_VERSION_OAHU
#define AR_SREV_VERSION_MAUI_2
uint32_t halChanSpreadSupport
uint32_t halRfSilentSupport
uint32_t halUseCombinedRadarRssi
uint32_t halWirelessModes
uint32_t halHasRxSelfLinkedTail
uint32_t halChanQuarterRate
uint32_t hal4kbSplitTransSupport
uint32_t halSleepAfterBeaconBroken
uint8_t ah_macaddr[IEEE80211_ADDR_LEN]
HAL_ANT_SETTING ah_diversityControl
struct ath_hal_private ah_priv
uint32_t ah_staId1Defaults
HAL_BOOL ah_rfkillEnabled
uint16_t ah_analog2GhzRev
uint16_t ah_analog5GhzRev