24#define AR5210_MAGIC 0x19980124
32#define AR5210_TXD_CTRL_A_HDR_LEN(_val) (((_val) ) & 0x0003f)
33#define AR5210_TXD_CTRL_A_TX_RATE(_val) (((_val) << 6) & 0x003c0)
34#define AR5210_TXD_CTRL_A_RTS_ENABLE ( 0x00c00)
35#define AR5210_TXD_CTRL_A_CLEAR_DEST_MASK(_val) (((_val) << 12) & 0x01000)
36#define AR5210_TXD_CTRL_A_ANT_MODE(_val) (((_val) << 13) & 0x02000)
37#define AR5210_TXD_CTRL_A_PKT_TYPE(_val) (((_val) << 14) & 0x1c000)
38#define AR5210_TXD_CTRL_A_INT_REQ ( 0x20000)
39#define AR5210_TXD_CTRL_A_KEY_VALID ( 0x40000)
40#define AR5210_TXD_CTRL_B_KEY_ID(_val) (((_val) ) & 0x0003f)
41#define AR5210_TXD_CTRL_B_RTS_DURATION(_val) (((_val) << 6) & 0x7ffc0)
44#define INIT_CONFIG_STATUS 0x00000000
45#define INIT_ACKTOPS 0x00000008
46#define INIT_BCON_CNTRL_REG 0x00000000
47#define INIT_SLOT_TIME 0x00000168
48#define INIT_SLOT_TIME_TURBO 0x000001e0
49#define INIT_ACK_CTS_TIMEOUT 0x04000400
50#define INIT_ACK_CTS_TIMEOUT_TURBO 0x08000800
53#define INIT_USEC_TURBO 0x4f
54#define INIT_USEC_32 0x1f
55#define INIT_TX_LATENCY 0x36
56#define INIT_RX_LATENCY 0x1D
57#define INIT_TRANSMIT_LATENCY \
58 ((INIT_RX_LATENCY << AR_USEC_RX_LATENCY_S) | \
59 (INIT_TX_LATENCY << AR_USEC_TX_LATENCY_S) | \
60 (INIT_USEC_32 << 7) | INIT_USEC )
61#define INIT_TRANSMIT_LATENCY_TURBO \
62 ((INIT_RX_LATENCY << AR_USEC_RX_LATENCY_S) | \
63 (INIT_TX_LATENCY << AR_USEC_TX_LATENCY_S) | \
64 (INIT_USEC_32 << 7) | INIT_USEC_TURBO)
66#define INIT_SIFS 0x230
67#define INIT_SIFS_TURBO 0x1E0
73#define MIN_TX_FIFO_THRESHOLD 0x1
74#define MAX_TX_FIFO_THRESHOLD ((IEEE80211_MAX_LEN / 64) + 1)
76#define INIT_NEXT_CFP_START 0xffffffff
78#define INIT_BEACON_PERIOD 0xffff
79#define INIT_BEACON_EN 0
80#define INIT_BEACON_CONTROL \
81 ((INIT_RESET_TSF << 24) | (INIT_BEACON_EN << 23) | \
82 (INIT_TIM_OFFSET<<16) | INIT_BEACON_PERIOD)
84#define INIT_RSSI_THR 0x00000700
85#define INIT_ProgIFS 0x398
86#define INIT_ProgIFS_TURBO 0x3C0
87#define INIT_EIFS 0xd70
88#define INIT_EIFS_TURBO 0x1ae0
89#define INIT_CARR_SENSE_EN 1
90#define INIT_PROTO_TIME_CNTRL ( (INIT_CARR_SENSE_EN << 26) | (INIT_EIFS << 12) | \
92#define INIT_PROTO_TIME_CNTRL_TURBO ( (INIT_CARR_SENSE_EN << 26) | (INIT_EIFS_TURBO << 12) | \
93 (INIT_ProgIFS_TURBO) )
95#define AR5210_MAX_RATE_POWER 60
97#undef HAL_NUM_TX_QUEUES
98#define HAL_NUM_TX_QUEUES 3
128#define AH5210(ah) ((struct ath_hal_5210 *)(ah))
134 struct ieee80211_channel *,
HAL_BOOL bChannelChange,
149 const struct ieee80211_channel *);
168 u_int pktLen, u_int hdrLen,
HAL_PKT_TYPE type, u_int txPower,
169 u_int txRate0, u_int txRetries0,
170 u_int keyIx, u_int antMode, u_int flags,
171 u_int rtsctsRate, u_int rtsctsDuration,
172 u_int compicvLen, u_int compivLen, u_int comp);
174 u_int txRate1, u_int txRetries1,
175 u_int txRate2, u_int txRetries2,
176 u_int txRate3, u_int txRetries3);
186 const struct ath_desc *,
int *rates,
int *tries);
201 uint32_t filter0, uint32_t filter1);
207 uint32_t, u_int flags);
209 uint32_t,
struct ath_desc *, uint64_t,
234 const uint8_t *bssid, uint16_t assocId);
259 uint32_t, uint32_t *);
263 const void *args, uint32_t argsize,
264 void **result, uint32_t *resultsize);
279 const HAL_KEYVAL *,
const uint8_t *mac,
int xorKey);
281 uint16_t,
const uint8_t *);
305 const struct ieee80211_channel *);
#define IEEE80211_ADDR_LEN
int16_t ar5210GetNfAdjust(struct ath_hal *, const HAL_CHANNEL_INTERNAL *)
HAL_BOOL ar5210UpdateTxTrigLevel(struct ath_hal *, HAL_BOOL)
HAL_BOOL ar5210SetSlotTime(struct ath_hal *, u_int)
void ar5210StartPcuReceive(struct ath_hal *, HAL_BOOL)
int16_t ar5210GetNoiseFloor(struct ath_hal *)
HAL_RFGAIN ar5210GetRfgain(struct ath_hal *)
void ar5210IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *)
HAL_BOOL ar5210CalNoiseFloor(struct ath_hal *, HAL_CHANNEL_INTERNAL *)
const HAL_RATE_TABLE * ar5210GetRateTable(struct ath_hal *, u_int mode)
void ar5210Detach(struct ath_hal *ah)
HAL_BOOL ar5210GetMibCycleCounts(struct ath_hal *, HAL_SURVEY_SAMPLE *)
HAL_BOOL ar5210SetKeyCacheEntryMac(struct ath_hal *, uint16_t, const uint8_t *)
u_int ar5210GetAckCTSRate(struct ath_hal *)
void ar5210EnableReceive(struct ath_hal *)
void ar5210RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, const struct ieee80211_channel *)
HAL_BOOL ar5210SetKeyCacheEntry(struct ath_hal *, uint16_t entry, const HAL_KEYVAL *, const uint8_t *mac, int xorKey)
HAL_BOOL ar5210SetPowerMode(struct ath_hal *, uint32_t powerRequest, int setChip)
void ar5210GetBssIdMask(struct ath_hal *, uint8_t *)
HAL_ANT_SETTING ar5210GetAntennaSwitch(struct ath_hal *)
void ar5210SetLedState(struct ath_hal *, HAL_LED_STATE)
HAL_BOOL ar5210SetAckCTSRate(struct ath_hal *, u_int)
HAL_BOOL ar5210SetTxDP(struct ath_hal *, u_int, uint32_t txdp)
HAL_BOOL ar5210ChipReset(struct ath_hal *, struct ieee80211_channel *)
void ar5210EnableHwEncryption(struct ath_hal *)
void ar5210AniPoll(struct ath_hal *, const struct ieee80211_channel *)
uint64_t ar5210GetNextTBTT(struct ath_hal *)
HAL_BOOL ar5210GpioSet(struct ath_hal *, uint32_t gpio, uint32_t)
HAL_BOOL ar5210SetupRxDesc(struct ath_hal *, struct ath_desc *, uint32_t, u_int flags)
HAL_POWER_MODE ar5210GetPowerMode(struct ath_hal *)
HAL_BOOL ar5210Disable(struct ath_hal *)
void ar5210ResetStaBeaconTimers(struct ath_hal *)
void ar5210StopPcuReceive(struct ath_hal *)
HAL_BOOL ar5210SetAckTimeout(struct ath_hal *, u_int)
uint32_t ar5210GetRandomSeed(struct ath_hal *)
#define HAL_NUM_TX_QUEUES
void ar5210SetPCUConfig(struct ath_hal *)
HAL_BOOL ar5210SetMulticastFilterIndex(struct ath_hal *, uint32_t)
HAL_STATUS ar5210ProcRxDesc(struct ath_hal *, struct ath_desc *, uint32_t, struct ath_desc *, uint64_t, struct ath_rx_status *)
void ar5210GetMacAddress(struct ath_hal *, uint8_t *)
void ar5210UpdateDiagReg(struct ath_hal *ah, uint32_t val)
void ar5210SetBeaconTimers(struct ath_hal *, const HAL_BEACON_TIMERS *)
void ar5210BeaconInit(struct ath_hal *, uint32_t, uint32_t)
u_int ar5210GetKeyCacheSize(struct ath_hal *)
HAL_STATUS ar5210ProcTxDesc(struct ath_hal *, struct ath_desc *, struct ath_tx_status *)
HAL_BOOL ar5210StopDmaReceive(struct ath_hal *)
void ar5210MibEvent(struct ath_hal *, const HAL_NODE_STATS *)
void ar5210EnableRfKill(struct ath_hal *)
HAL_BOOL ar5210ReleaseTxQueue(struct ath_hal *ah, u_int q)
uint32_t ar5210Get11nExtBusy(struct ath_hal *)
HAL_BOOL ar5210IsKeyCacheEntryValid(struct ath_hal *, uint16_t)
HAL_BOOL ar5210GpioCfgOutput(struct ath_hal *, uint32_t gpio, HAL_GPIO_MUX_TYPE)
void ar5210SetNav(struct ath_hal *ah, u_int val)
HAL_BOOL ar5210StartTxDma(struct ath_hal *, u_int)
uint32_t ar5210GpioGet(struct ath_hal *, uint32_t gpio)
HAL_BOOL ar5210GetPendingInterrupts(struct ath_hal *, HAL_INT *)
HAL_BOOL ar5210GpioCfgInput(struct ath_hal *, uint32_t gpio)
void ar5210EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *)
void ar5210GetTxDescLink(struct ath_hal *ah, void *ds, uint32_t *link)
void ar5210GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *)
void ar5210SetTxDescLink(struct ath_hal *ah, void *ds, uint32_t link)
int ar5210SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, const HAL_TXQ_INFO *qInfo)
HAL_BOOL ar5210SetMacAddress(struct ath_hal *ah, const uint8_t *)
HAL_BOOL ar5210ResetKeyCacheEntry(struct ath_hal *, uint16_t entry)
HAL_BOOL ar5210IsInterruptPending(struct ath_hal *)
HAL_BOOL ar5210GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize)
void ar5210SetRxFilter(struct ath_hal *, uint32_t)
HAL_BOOL ar5210DetectCardPresent(struct ath_hal *)
HAL_BOOL ar5210GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *, int *rates, int *tries)
void ar5210SetStaBeaconTimers(struct ath_hal *, const HAL_BEACON_STATE *)
uint32_t ar5210GetTsf32(struct ath_hal *)
HAL_STATUS ar5210SetQuiet(struct ath_hal *, uint32_t, uint32_t, uint32_t, HAL_QUIET_FLAG)
HAL_BOOL ar5210Reset(struct ath_hal *, HAL_OPMODE, struct ieee80211_channel *, HAL_BOOL bChannelChange, HAL_RESET_TYPE, HAL_STATUS *)
HAL_BOOL ar5210SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t, HAL_STATUS *)
HAL_BOOL ar5210ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *)
HAL_BOOL ar5210PhyDisable(struct ath_hal *)
u_int ar5210GetAckTimeout(struct ath_hal *)
HAL_STATUS ar5210GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t *)
HAL_BOOL ar5210SetCTSTimeout(struct ath_hal *, u_int)
void ar5210SetDefAntenna(struct ath_hal *, u_int)
HAL_BOOL ar5210AniControl(struct ath_hal *, HAL_ANI_CMD, int)
HAL_BOOL ar5210PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan, u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone)
void ar5210SetMulticastFilter(struct ath_hal *, uint32_t filter0, uint32_t filter1)
HAL_BOOL ar5210SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo)
HAL_BOOL ar5210GetTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo)
void ar5210GetTxIntrQueue(struct ath_hal *ah, uint32_t *)
void ar5210GetTxDescLinkPtr(struct ath_hal *ah, void *ds, uint32_t **linkptr)
void ar5210DisableHwEncryption(struct ath_hal *)
u_int ar5210GetCTSTimeout(struct ath_hal *)
HAL_BOOL ar5210StopTxDma(struct ath_hal *, u_int)
HAL_INT ar5210SetInterrupts(struct ath_hal *, HAL_INT ints)
void ar5210WriteAssocid(struct ath_hal *, const uint8_t *bssid, uint16_t assocId)
u_int ar5210GetNav(struct ath_hal *ah)
void ar5210UpdateMibCounters(struct ath_hal *, HAL_MIB_STATS *)
HAL_BOOL ar5210SetRegulatoryDomain(struct ath_hal *, uint16_t, HAL_STATUS *)
HAL_BOOL ar5210SetDecompMask(struct ath_hal *, uint16_t, int)
HAL_BOOL ar5210SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING)
HAL_BOOL ar5210SetBssIdMask(struct ath_hal *, const uint8_t *)
HAL_BOOL ar5210ClrMulticastFilterIndex(struct ath_hal *, uint32_t)
HAL_BOOL ar5210SetTxPowerLimit(struct ath_hal *, uint32_t limit)
HAL_BOOL ar5210SetupTxDesc(struct ath_hal *, struct ath_desc *, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, u_int txRate0, u_int txRetries0, u_int keyIx, u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, u_int compivLen, u_int comp)
void ar5210ResetTsf(struct ath_hal *)
HAL_BOOL ar5210FillTxDesc(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)
HAL_BOOL ar5210EepromWrite(struct ath_hal *, u_int off, uint16_t data)
uint32_t ar5210NumTxPending(struct ath_hal *, u_int)
u_int ar5210GetWirelessModes(struct ath_hal *ah)
uint32_t ar5210GetRxFilter(struct ath_hal *)
uint32_t ar5210GetRxDP(struct ath_hal *, HAL_RX_QUEUE)
HAL_BOOL ar5210SetTransmitPower(struct ath_hal *, const struct ieee80211_channel *)
void ar5210Gpio0SetIntr(struct ath_hal *, u_int, uint32_t ilevel)
u_int ar5210GetDefAntenna(struct ath_hal *)
HAL_BOOL ar5210ResetTxQueue(struct ath_hal *ah, u_int q)
u_int ar5210GetSlotTime(struct ath_hal *)
uint64_t ar5210GetTsf64(struct ath_hal *)
HAL_BOOL ar5210SetupXTxDesc(struct ath_hal *, struct ath_desc *, u_int txRate1, u_int txRetries1, u_int txRate2, u_int txRetries2, u_int txRate3, u_int txRetries3)
HAL_BOOL ar5210SetSifsTime(struct ath_hal *, u_int)
void ar5210SetCoverageClass(struct ath_hal *, uint8_t, int)
HAL_INT ar5210GetInterrupts(struct ath_hal *)
HAL_BOOL ar5210EepromRead(struct ath_hal *, u_int off, uint16_t *data)
u_int ar5210GetSifsTime(struct ath_hal *)
uint32_t ar5210GetTxDP(struct ath_hal *, u_int)
HAL_BOOL ar5210PerCalibration(struct ath_hal *, struct ieee80211_channel *, HAL_BOOL *)
HAL_BOOL ar5210ResetDma(struct ath_hal *, HAL_OPMODE)
void ar5210SetRxDP(struct ath_hal *, uint32_t rxdp, HAL_RX_QUEUE)
void ar5210SetChainMasks(struct ath_hal *, uint32_t, uint32_t)
uint32_t ah_txUrnInterruptMask
uint32_t ah_staId1Defaults
uint32_t ah_txOkInterruptMask
uint32_t ah_txErrInterruptMask
uint32_t ah_txDescInterruptMask
uint32_t ah_txEolInterruptMask
HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES]
struct ath_hal_private ah_priv
uint8_t ah_bssid[IEEE80211_ADDR_LEN]
uint8_t ah_macaddr[IEEE80211_ADDR_LEN]