FreeBSD kernel ATH device code
ar5212.h
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: ISC
3 *
4 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
5 * Copyright (c) 2002-2008 Atheros Communications, Inc.
6 *
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 *
19 * $FreeBSD$
20 */
21#ifndef _ATH_AR5212_H_
22#define _ATH_AR5212_H_
23
24#include "ah_eeprom.h"
25
26#define AR5212_MAGIC 0x19541014
27
28/* DCU Transmit Filter macros */
29#define CALC_MMR(dcu, idx) \
30 ( (4 * dcu) + (idx < 32 ? 0 : (idx < 64 ? 1 : (idx < 96 ? 2 : 3))) )
31#define TXBLK_FROM_MMR(mmr) \
32 (AR_D_TXBLK_BASE + ((mmr & 0x1f) << 6) + ((mmr & 0x20) >> 3))
33#define CALC_TXBLK_ADDR(dcu, idx) (TXBLK_FROM_MMR(CALC_MMR(dcu, idx)))
34#define CALC_TXBLK_VALUE(idx) (1 << (idx & 0x1f))
35
36/* MAC register values */
37
38#define INIT_INTERRUPT_MASK \
39 ( AR_IMR_TXERR | AR_IMR_TXOK | AR_IMR_RXORN | \
40 AR_IMR_RXERR | AR_IMR_RXOK | AR_IMR_TXURN | \
41 AR_IMR_HIUERR )
42#define INIT_BEACON_CONTROL \
43 ((INIT_RESET_TSF << 24) | (INIT_BEACON_EN << 23) | \
44 (INIT_TIM_OFFSET << 16) | INIT_BEACON_PERIOD)
45
46#define INIT_CONFIG_STATUS 0x00000000
47#define INIT_RSSI_THR 0x00000781 /* Missed beacon counter initialized to 0x7 (max is 0xff) */
48#define INIT_IQCAL_LOG_COUNT_MAX 0xF
49#define INIT_BCON_CNTRL_REG 0x00000000
50
51#define INIT_USEC 40
52#define HALF_RATE_USEC 19 /* ((40 / 2) - 1 ) */
53#define QUARTER_RATE_USEC 9 /* ((40 / 4) - 1 ) */
54
55#define RX_NON_FULL_RATE_LATENCY 63
56#define TX_HALF_RATE_LATENCY 108
57#define TX_QUARTER_RATE_LATENCY 216
58
59#define IFS_SLOT_FULL_RATE 0x168 /* 9 us half, 40 MHz core clock (9*40) */
60#define IFS_SLOT_HALF_RATE 0x104 /* 13 us half, 20 MHz core clock (13*20) */
61#define IFS_SLOT_QUARTER_RATE 0xD2 /* 21 us quarter, 10 MHz core clock (21*10) */
62#define IFS_EIFS_FULL_RATE 0xE60 /* (74 + (2 * 9)) * 40MHz core clock */
63#define IFS_EIFS_HALF_RATE 0xDAC /* (149 + (2 * 13)) * 20MHz core clock */
64#define IFS_EIFS_QUARTER_RATE 0xD48 /* (298 + (2 * 21)) * 10MHz core clock */
65
66#define ACK_CTS_TIMEOUT_11A 0x3E8 /* ACK timeout in 11a core clocks */
67
68/* Tx frame start to tx data start delay */
69#define TX_FRAME_D_START_HALF_RATE 0xc
70#define TX_FRAME_D_START_QUARTER_RATE 0xd
71
72/*
73 * Various fifo fill before Tx start, in 64-byte units
74 * i.e. put the frame in the air while still DMAing
75 */
76#define MIN_TX_FIFO_THRESHOLD 0x1
77#define MAX_TX_FIFO_THRESHOLD ((IEEE80211_MAX_LEN / 64) + 1)
78#define INIT_TX_FIFO_THRESHOLD MIN_TX_FIFO_THRESHOLD
79
80#define HAL_DECOMP_MASK_SIZE 128 /* 1 byte per key */
81
82/*
83 * Gain support.
84 */
85#define NUM_CORNER_FIX_BITS 4
86#define NUM_CORNER_FIX_BITS_5112 7
87#define DYN_ADJ_UP_MARGIN 15
88#define DYN_ADJ_LO_MARGIN 20
89#define PHY_PROBE_CCK_CORRECTION 5
90#define CCK_OFDM_GAIN_DELTA 15
91
97};
98
107};
108
109typedef struct _gainOptStep {
111 int32_t stepGain;
112 int8_t stepName[16];
114
115typedef struct {
116 uint32_t numStepsInLadder;
117 uint32_t defaultStepNum;
118 GAIN_OPTIMIZATION_STEP optStep[10];
120
121typedef struct {
122 uint32_t currStepNum;
123 uint32_t currGain;
124 uint32_t targetGain;
125 uint32_t loTrig;
126 uint32_t hiTrig;
127 uint32_t active;
128 const GAIN_OPTIMIZATION_STEP *currStep;
130
131/* RF HAL structures */
132typedef struct RfHalFuncs {
133 void *priv; /* private state */
134
135 void (*rfDetach)(struct ath_hal *ah);
136 void (*writeRegs)(struct ath_hal *,
137 u_int modeIndex, u_int freqIndex, int regWrites);
138 uint32_t *(*getRfBank)(struct ath_hal *ah, int bank);
140 const struct ieee80211_channel *);
142 const struct ieee80211_channel *, uint16_t modesIndex,
143 uint16_t *rfXpdGain);
145 int16_t *minPower, int16_t *maxPower,
146 const struct ieee80211_channel *, uint16_t *rfXpdGain);
148 const struct ieee80211_channel *,
149 int16_t *maxPow, int16_t *minPow);
150 int16_t (*getNfAdjust)(struct ath_hal *, const HAL_CHANNEL_INTERNAL*);
152
154 int maxNoiseImmunityLevel; /* [0..4] */
157 int coarseLow[5];
158 int firpwr[5];
159
160 int maxSpurImmunityLevel; /* [0..7] */
162
163 int maxFirstepLevel; /* [0..2] */
164 int firstep[3];
165
166 uint32_t ofdmTrigHigh;
167 uint32_t ofdmTrigLow;
168 uint32_t cckTrigHigh;
169 uint32_t cckTrigLow;
170 int32_t rssiThrLow;
171 uint32_t rssiThrHigh;
172
173 int period; /* update listen period */
174
175 /* NB: intentionally ordered so data exported to user space is first */
176 uint32_t ofdmPhyErrBase; /* Base value for ofdm err counter */
177 uint32_t cckPhyErrBase; /* Base value for cck err counters */
178};
179
180/*
181 * Per-channel ANI state private to the driver.
182 */
189 uint32_t listenTime;
190
191 /* NB: intentionally ordered so data exported to user space is first */
192 uint32_t txFrameCount; /* Last txFrameCount */
193 uint32_t rxFrameCount; /* Last rx Frame count */
194 uint32_t cycleCount; /* Last cycleCount
195 (to detect wrap-around) */
196 uint32_t ofdmPhyErrCount;/* OFDM err count since last reset */
197 uint32_t cckPhyErrCount; /* CCK err count since last reset */
198
199 const struct ar5212AniParams *params;
200};
201
202#define HAL_ANI_ENA 0x00000001 /* ANI operation enabled */
203#define HAL_RSSI_ANI_ENA 0x00000002 /* rssi-based processing ena'd*/
204
205#if 0
206struct ar5212Stats {
207 uint32_t ast_ani_niup; /* ANI increased noise immunity */
208 uint32_t ast_ani_nidown; /* ANI decreased noise immunity */
209 uint32_t ast_ani_spurup; /* ANI increased spur immunity */
210 uint32_t ast_ani_spurdown;/* ANI descreased spur immunity */
211 uint32_t ast_ani_ofdmon; /* ANI OFDM weak signal detect on */
212 uint32_t ast_ani_ofdmoff;/* ANI OFDM weak signal detect off */
213 uint32_t ast_ani_cckhigh;/* ANI CCK weak signal threshold high */
214 uint32_t ast_ani_ccklow; /* ANI CCK weak signal threshold low */
215 uint32_t ast_ani_stepup; /* ANI increased first step level */
216 uint32_t ast_ani_stepdown;/* ANI decreased first step level */
217 uint32_t ast_ani_ofdmerrs;/* ANI cumulative ofdm phy err count */
218 uint32_t ast_ani_cckerrs;/* ANI cumulative cck phy err count */
219 uint32_t ast_ani_reset; /* ANI parameters zero'd for non-STA */
220 uint32_t ast_ani_lzero; /* ANI listen time forced to zero */
221 uint32_t ast_ani_lneg; /* ANI listen time calculated < 0 */
222 HAL_MIB_STATS ast_mibstats; /* MIB counter stats */
223 HAL_NODE_STATS ast_nodestats; /* Latest rssi stats from driver */
224};
225#endif
226
227/*
228 * NF Cal history buffer
229 */
230#define AR5212_CCA_MAX_GOOD_VALUE -95
231#define AR5212_CCA_MAX_HIGH_VALUE -62
232#define AR5212_CCA_MIN_BAD_VALUE -125
233
234#define AR512_NF_CAL_HIST_MAX 5
235
238 int16_t privNF;
239 uint8_t currIndex;
240 uint8_t first_run;
242};
243
245 struct ath_hal_private ah_priv; /* base class */
246
247 /*
248 * Per-chip common Initialization data.
249 * NB: RF backends have their own ini data.
250 */
253
255
259 uint16_t ah_assocId;
260
261 /*
262 * Runtime state.
263 */
264 uint32_t ah_maskReg; /* copy of AR_IMR */
265 HAL_ANI_STATS ah_stats; /* various statistics */
267 uint32_t ah_txDescMask; /* mask for TXDESC */
274 uint32_t ah_intrTxqs; /* tx q interrupt state */
275 /* decomp mask array */
277 HAL_ANT_SETTING ah_antControl; /* antenna setting */
278 HAL_BOOL ah_diversity; /* fast diversity setting */
279 enum {
283 } ah_bIQCalibration; /* IQ calibrate state */
284 HAL_RFGAIN ah_rfgainState; /* RF gain calibrartion state */
285 uint32_t ah_tx6PowerInHalfDbm; /* power output for 6Mb tx */
286 uint32_t ah_staId1Defaults; /* STA_ID1 default settings */
287 uint32_t ah_miscMode; /* MISC_MODE settings */
288 uint32_t ah_rssiThr; /* RSSI_THR settings */
289 HAL_BOOL ah_cwCalRequire; /* for ap51 */
290 HAL_BOOL ah_tpcEnabled; /* per-packet tpc enabled */
291 HAL_BOOL ah_phyPowerOn; /* PHY power state */
292 HAL_BOOL ah_isHb63; /* cached HB63 check */
293 uint32_t ah_macTPC; /* tpc register */
294 uint32_t ah_beaconInterval; /* XXX */
295 enum {
296 AUTO_32KHZ, /* use it if 32kHz crystal present */
297 USE_32KHZ, /* do it regardless */
298 DONT_USE_32KHZ, /* don't use it regardless */
299 } ah_enable32kHzClock; /* whether to sleep at 32kHz */
302 /*
303 * Noise floor cal histogram support.
304 */
306
307 u_int ah_slottime; /* user-specified slot time */
308 u_int ah_acktimeout; /* user-specified ack timeout */
309 u_int ah_ctstimeout; /* user-specified cts timeout */
310 u_int ah_sifstime; /* user-specified sifs time */
311 /*
312 * RF Silent handling; setup according to the EEPROM.
313 */
314 uint32_t ah_gpioSelect; /* GPIO pin to use */
315 uint32_t ah_polarity; /* polarity to disable RF */
316 uint32_t ah_gpioBit; /* after init, prev value */
317 /*
318 * ANI support.
319 */
320 uint32_t ah_procPhyErr; /* Process Phy errs */
321 HAL_BOOL ah_hasHwPhyCounters; /* Hardware has phy counters */
322 struct ar5212AniParams ah_aniParams24; /* 2.4GHz parameters */
323 struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */
324 struct ar5212AniState *ah_curani; /* cached last reference */
325 struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */
326
327 /* AR5416 uses some of the AR5212 ANI code; these are the ANI methods */
328 HAL_BOOL (*ah_aniControl) (struct ath_hal *, HAL_ANI_CMD cmd, int param);
329
330 /*
331 * Transmit power state. Note these are maintained
332 * here so they can be retrieved by diagnostic tools.
333 */
334 uint16_t *ah_pcdacTable;
336 uint16_t ah_ratesArray[37];
337
338 uint8_t ah_txTrigLev; /* current Tx trigger level */
339 uint8_t ah_maxTxTrigLev; /* max tx trigger level */
340
341 /*
342 * Channel Tx, Rx, Rx Clear State
343 */
345 uint32_t ah_ctlBusy;
346 uint32_t ah_rxBusy;
347 uint32_t ah_txBusy;
350
351 /* Used to return ANI statistics to the diagnostic API */
353};
354#define AH5212(_ah) ((struct ath_hal_5212 *)(_ah))
355
356/*
357 * IS_XXXX macros test the MAC version
358 * IS_RADXXX macros test the radio/RF version (matching both 2G-only and 2/5G)
359 *
360 * Some single chip radios have equivalent radio/RF (e.g. 5112)
361 * for those use IS_RADXXX_ANY macros.
362 */
363#define IS_2317(ah) \
364 ((AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV1) || \
365 (AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV2))
366#define IS_2316(ah) \
367 (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_2415)
368#define IS_2413(ah) \
369 (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_2413 || IS_2316(ah))
370#define IS_5424(ah) \
371 (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_5424 || \
372 (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_5413 && \
373 AH_PRIVATE(ah)->ah_macRev <= AR_SREV_D2PLUS_MS))
374#define IS_5413(ah) \
375 (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_5413 || IS_5424(ah))
376#define IS_2425(ah) \
377 (AH_PRIVATE(ah)->ah_macVersion == AR_SREV_2425)
378#define IS_2417(ah) \
379 ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_2417)
380#define IS_HB63(ah) (AH5212(ah)->ah_isHb63 == AH_TRUE)
381
382#define AH_RADIO_MAJOR(ah) \
383 (AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR)
384#define AH_RADIO_MINOR(ah) \
385 (AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MINOR)
386#define IS_RAD5111(ah) \
387 (AH_RADIO_MAJOR(ah) == AR_RAD5111_SREV_MAJOR || \
388 AH_RADIO_MAJOR(ah) == AR_RAD2111_SREV_MAJOR)
389#define IS_RAD5112(ah) \
390 (AH_RADIO_MAJOR(ah) == AR_RAD5112_SREV_MAJOR || \
391 AH_RADIO_MAJOR(ah) == AR_RAD2112_SREV_MAJOR)
392/* NB: does not include 5413 as Atheros' IS_5112 macro does */
393#define IS_RAD5112_ANY(ah) \
394 (AR_RAD5112_SREV_MAJOR <= AH_RADIO_MAJOR(ah) && \
395 AH_RADIO_MAJOR(ah) <= AR_RAD2413_SREV_MAJOR)
396#define IS_RAD5112_REV1(ah) \
397 (IS_RAD5112(ah) && \
398 AH_RADIO_MINOR(ah) < (AR_RAD5112_SREV_2_0 & AR_RADIO_SREV_MINOR))
399#define IS_RADX112_REV2(ah) \
400 (AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD5112_SREV_2_0 || \
401 AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD2112_SREV_2_0 || \
402 AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD2112_SREV_2_1 || \
403 AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD5112_SREV_2_1)
404
405#define ar5212RfDetach(ah) do { \
406 if (AH5212(ah)->ah_rfHal != AH_NULL) \
407 AH5212(ah)->ah_rfHal->rfDetach(ah); \
408} while (0)
409#define ar5212GetRfBank(ah, b) \
410 AH5212(ah)->ah_rfHal->getRfBank(ah, b)
411
412/*
413 * Hack macros for Nala/San: 11b is handled
414 * using 11g; flip the channel flags to accomplish this.
415 */
416#define SAVE_CCK(_ah, _chan, _flag) do { \
417 if ((IS_2425(_ah) || IS_2417(_ah)) && \
418 (((_chan)->ic_flags) & IEEE80211_CHAN_CCK)) { \
419 (_chan)->ic_flags &= ~IEEE80211_CHAN_CCK; \
420 (_chan)->ic_flags |= IEEE80211_CHAN_DYN; \
421 (_flag) = AH_TRUE; \
422 } else \
423 (_flag) = AH_FALSE; \
424} while (0)
425#define RESTORE_CCK(_ah, _chan, _flag) do { \
426 if ((_flag) && (IS_2425(_ah) || IS_2417(_ah))) { \
427 (_chan)->ic_flags &= ~IEEE80211_CHAN_DYN; \
428 (_chan)->ic_flags |= IEEE80211_CHAN_CCK; \
429 } \
430} while (0)
431
432struct ath_hal;
433
434extern uint32_t ar5212GetRadioRev(struct ath_hal *ah);
435extern void ar5212InitState(struct ath_hal_5212 *, uint16_t devid, HAL_SOFTC,
436 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);
437extern void ar5212Detach(struct ath_hal *ah);
438extern HAL_BOOL ar5212ChipTest(struct ath_hal *ah);
439extern HAL_BOOL ar5212GetChannelEdges(struct ath_hal *ah,
440 uint16_t flags, uint16_t *low, uint16_t *high);
441extern HAL_BOOL ar5212FillCapabilityInfo(struct ath_hal *ah);
442
443extern void ar5212SetBeaconTimers(struct ath_hal *ah,
444 const HAL_BEACON_TIMERS *);
445extern void ar5212BeaconInit(struct ath_hal *ah,
446 uint32_t next_beacon, uint32_t beacon_period);
447extern void ar5212ResetStaBeaconTimers(struct ath_hal *ah);
448extern void ar5212SetStaBeaconTimers(struct ath_hal *ah,
449 const HAL_BEACON_STATE *);
450extern uint64_t ar5212GetNextTBTT(struct ath_hal *);
451
452extern HAL_BOOL ar5212IsInterruptPending(struct ath_hal *ah);
454extern HAL_INT ar5212GetInterrupts(struct ath_hal *ah);
455extern HAL_INT ar5212SetInterrupts(struct ath_hal *ah, HAL_INT ints);
456
457extern uint32_t ar5212GetKeyCacheSize(struct ath_hal *);
458extern HAL_BOOL ar5212IsKeyCacheEntryValid(struct ath_hal *, uint16_t entry);
459extern HAL_BOOL ar5212ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry);
461 uint16_t entry, const uint8_t *mac);
462extern HAL_BOOL ar5212SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry,
463 const HAL_KEYVAL *k, const uint8_t *mac, int xorKey);
464
465extern void ar5212GetMacAddress(struct ath_hal *ah, uint8_t *mac);
466extern HAL_BOOL ar5212SetMacAddress(struct ath_hal *ah, const uint8_t *);
467extern void ar5212GetBssIdMask(struct ath_hal *ah, uint8_t *mac);
468extern HAL_BOOL ar5212SetBssIdMask(struct ath_hal *, const uint8_t *);
469extern HAL_BOOL ar5212EepromRead(struct ath_hal *, u_int off, uint16_t *data);
470extern HAL_BOOL ar5212EepromWrite(struct ath_hal *, u_int off, uint16_t data);
472 uint16_t regDomain, HAL_STATUS *stats);
473extern u_int ar5212GetWirelessModes(struct ath_hal *ah);
474extern void ar5212EnableRfKill(struct ath_hal *);
475extern HAL_BOOL ar5212GpioCfgOutput(struct ath_hal *, uint32_t gpio,
477extern HAL_BOOL ar5212GpioCfgInput(struct ath_hal *, uint32_t gpio);
478extern HAL_BOOL ar5212GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val);
479extern uint32_t ar5212GpioGet(struct ath_hal *ah, uint32_t gpio);
480extern void ar5212GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel);
481extern void ar5212SetLedState(struct ath_hal *ah, HAL_LED_STATE state);
482extern void ar5212WriteAssocid(struct ath_hal *ah, const uint8_t *bssid,
483 uint16_t assocId);
484extern uint32_t ar5212GetTsf32(struct ath_hal *ah);
485extern uint64_t ar5212GetTsf64(struct ath_hal *ah);
486extern void ar5212SetTsf64(struct ath_hal *ah, uint64_t tsf64);
487extern void ar5212ResetTsf(struct ath_hal *ah);
488extern void ar5212SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *pSet);
489extern uint32_t ar5212GetRandomSeed(struct ath_hal *ah);
490extern HAL_BOOL ar5212DetectCardPresent(struct ath_hal *ah);
491extern void ar5212EnableMibCounters(struct ath_hal *);
492extern void ar5212DisableMibCounters(struct ath_hal *);
493extern void ar5212UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS* stats);
495extern uint32_t ar5212GetCurRssi(struct ath_hal *ah);
496extern u_int ar5212GetDefAntenna(struct ath_hal *ah);
497extern void ar5212SetDefAntenna(struct ath_hal *ah, u_int antenna);
501extern HAL_BOOL ar5212SetSifsTime(struct ath_hal *, u_int);
502extern u_int ar5212GetSifsTime(struct ath_hal *);
503extern HAL_BOOL ar5212SetSlotTime(struct ath_hal *, u_int);
504extern u_int ar5212GetSlotTime(struct ath_hal *);
505extern HAL_BOOL ar5212SetAckTimeout(struct ath_hal *, u_int);
506extern u_int ar5212GetAckTimeout(struct ath_hal *);
507extern HAL_BOOL ar5212SetAckCTSRate(struct ath_hal *, u_int);
508extern u_int ar5212GetAckCTSRate(struct ath_hal *);
509extern HAL_BOOL ar5212SetCTSTimeout(struct ath_hal *, u_int);
510extern u_int ar5212GetCTSTimeout(struct ath_hal *);
511extern HAL_BOOL ar5212SetDecompMask(struct ath_hal *, uint16_t, int);
512void ar5212SetCoverageClass(struct ath_hal *, uint8_t, int);
513extern void ar5212SetPCUConfig(struct ath_hal *);
514extern HAL_BOOL ar5212Use32KHzclock(struct ath_hal *ah, HAL_OPMODE opmode);
515extern void ar5212SetupClock(struct ath_hal *ah, HAL_OPMODE opmode);
516extern void ar5212RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode);
517extern int16_t ar5212GetNfAdjust(struct ath_hal *,
518 const HAL_CHANNEL_INTERNAL *);
519extern void ar5212SetCompRegs(struct ath_hal *ah);
521 uint32_t, uint32_t *);
523 uint32_t, uint32_t, HAL_STATUS *);
524extern HAL_BOOL ar5212GetDiagState(struct ath_hal *ah, int request,
525 const void *args, uint32_t argsize,
526 void **result, uint32_t *resultsize);
527extern HAL_STATUS ar5212SetQuiet(struct ath_hal *ah, uint32_t period,
528 uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag);
531extern void ar5212SetChainMasks(struct ath_hal *, uint32_t, uint32_t);
532extern u_int ar5212GetNav(struct ath_hal *);
533extern void ar5212SetNav(struct ath_hal *, u_int);
534
535extern HAL_BOOL ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
536 int setChip);
537extern HAL_POWER_MODE ar5212GetPowerMode(struct ath_hal *ah);
539
540extern uint32_t ar5212GetRxDP(struct ath_hal *ath, HAL_RX_QUEUE);
541extern void ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp, HAL_RX_QUEUE);
542extern void ar5212EnableReceive(struct ath_hal *ah);
543extern HAL_BOOL ar5212StopDmaReceive(struct ath_hal *ah);
544extern void ar5212StartPcuReceive(struct ath_hal *ah, HAL_BOOL);
545extern void ar5212StopPcuReceive(struct ath_hal *ah);
546extern void ar5212SetMulticastFilter(struct ath_hal *ah,
547 uint32_t filter0, uint32_t filter1);
548extern HAL_BOOL ar5212ClrMulticastFilterIndex(struct ath_hal *, uint32_t ix);
549extern HAL_BOOL ar5212SetMulticastFilterIndex(struct ath_hal *, uint32_t ix);
550extern uint32_t ar5212GetRxFilter(struct ath_hal *ah);
551extern void ar5212SetRxFilter(struct ath_hal *ah, uint32_t bits);
552extern HAL_BOOL ar5212SetupRxDesc(struct ath_hal *,
553 struct ath_desc *, uint32_t size, u_int flags);
554extern HAL_STATUS ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc *,
555 uint32_t, struct ath_desc *, uint64_t,
556 struct ath_rx_status *);
557
558extern HAL_BOOL ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode,
559 struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
560 HAL_RESET_TYPE, HAL_STATUS *status);
561extern HAL_BOOL ar5212SetChannel(struct ath_hal *,
562 const struct ieee80211_channel *);
563extern void ar5212SetOperatingMode(struct ath_hal *ah, int opmode);
564extern HAL_BOOL ar5212PhyDisable(struct ath_hal *ah);
565extern HAL_BOOL ar5212Disable(struct ath_hal *ah);
566extern HAL_BOOL ar5212ChipReset(struct ath_hal *ah,
567 const struct ieee80211_channel *);
568extern HAL_BOOL ar5212PerCalibration(struct ath_hal *ah,
569 struct ieee80211_channel *chan, HAL_BOOL *isIQdone);
570extern HAL_BOOL ar5212PerCalibrationN(struct ath_hal *ah,
571 struct ieee80211_channel *chan, u_int chainMask,
572 HAL_BOOL longCal, HAL_BOOL *isCalDone);
573extern HAL_BOOL ar5212ResetCalValid(struct ath_hal *ah,
574 const struct ieee80211_channel *);
575extern int16_t ar5212GetNoiseFloor(struct ath_hal *ah);
576extern void ar5212InitNfCalHistBuffer(struct ath_hal *);
577extern int16_t ar5212GetNfHistMid(const int16_t calData[]);
578extern void ar5212SetSpurMitigation(struct ath_hal *,
579 const struct ieee80211_channel *);
581 HAL_ANT_SETTING settings, const struct ieee80211_channel *);
582extern HAL_BOOL ar5212SetTxPowerLimit(struct ath_hal *ah, uint32_t limit);
584 struct ieee80211_channel *chan);
585extern void ar5212InitializeGainValues(struct ath_hal *);
586extern HAL_RFGAIN ar5212GetRfgain(struct ath_hal *ah);
587extern void ar5212RequestRfgain(struct ath_hal *);
588
590 HAL_BOOL IncTrigLevel);
591extern HAL_BOOL ar5212SetTxQueueProps(struct ath_hal *ah, int q,
592 const HAL_TXQ_INFO *qInfo);
593extern HAL_BOOL ar5212GetTxQueueProps(struct ath_hal *ah, int q,
594 HAL_TXQ_INFO *qInfo);
595extern int ar5212SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type,
596 const HAL_TXQ_INFO *qInfo);
597extern HAL_BOOL ar5212ReleaseTxQueue(struct ath_hal *ah, u_int q);
598extern HAL_BOOL ar5212ResetTxQueue(struct ath_hal *ah, u_int q);
599extern uint32_t ar5212GetTxDP(struct ath_hal *ah, u_int q);
600extern HAL_BOOL ar5212SetTxDP(struct ath_hal *ah, u_int q, uint32_t txdp);
601extern HAL_BOOL ar5212StartTxDma(struct ath_hal *ah, u_int q);
602extern uint32_t ar5212NumTxPending(struct ath_hal *ah, u_int q);
603extern HAL_BOOL ar5212StopTxDma(struct ath_hal *ah, u_int q);
604extern HAL_BOOL ar5212SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds,
605 u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower,
606 u_int txRate0, u_int txTries0,
607 u_int keyIx, u_int antMode, u_int flags,
608 u_int rtsctsRate, u_int rtsctsDuration,
609 u_int compicvLen, u_int compivLen, u_int comp);
610extern HAL_BOOL ar5212SetupXTxDesc(struct ath_hal *, struct ath_desc *,
611 u_int txRate1, u_int txRetries1,
612 u_int txRate2, u_int txRetries2,
613 u_int txRate3, u_int txRetries3);
614extern HAL_BOOL ar5212FillTxDesc(struct ath_hal *ah, struct ath_desc *ds,
615 HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList,
616 u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg,
617 const struct ath_desc *ds0);
618extern HAL_STATUS ar5212ProcTxDesc(struct ath_hal *ah,
619 struct ath_desc *, struct ath_tx_status *);
620extern void ar5212GetTxIntrQueue(struct ath_hal *ah, uint32_t *);
621extern void ar5212IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *);
623 const struct ath_desc *ds0, int *rates, int *tries);
624extern void ar5212SetTxDescLink(struct ath_hal *ah, void *ds,
625 uint32_t link);
626extern void ar5212GetTxDescLink(struct ath_hal *ah, void *ds,
627 uint32_t *link);
628extern void ar5212GetTxDescLinkPtr(struct ath_hal *ah, void *ds,
629 uint32_t **linkptr);
630
631extern const HAL_RATE_TABLE *ar5212GetRateTable(struct ath_hal *, u_int mode);
632
633extern void ar5212AniAttach(struct ath_hal *, const struct ar5212AniParams *,
634 const struct ar5212AniParams *, HAL_BOOL ena);
635extern void ar5212AniDetach(struct ath_hal *);
636extern struct ar5212AniState *ar5212AniGetCurrentState(struct ath_hal *);
638extern HAL_BOOL ar5212AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param);
639extern HAL_BOOL ar5212AniSetParams(struct ath_hal *,
640 const struct ar5212AniParams *, const struct ar5212AniParams *);
641struct ath_rx_status;
642extern void ar5212AniPhyErrReport(struct ath_hal *ah,
643 const struct ath_rx_status *rs);
644extern void ar5212ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *);
645extern void ar5212RxMonitor(struct ath_hal *, const HAL_NODE_STATS *,
646 const struct ieee80211_channel *);
647extern void ar5212AniPoll(struct ath_hal *, const struct ieee80211_channel *);
648extern void ar5212AniReset(struct ath_hal *, const struct ieee80211_channel *,
649 HAL_OPMODE, int);
650
651extern HAL_BOOL ar5212IsNFCalInProgress(struct ath_hal *ah);
652extern HAL_BOOL ar5212WaitNFCalComplete(struct ath_hal *ah, int i);
653extern void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
655 HAL_PHYERR_PARAM *pe);
656extern void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
658 struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf,
659 HAL_DFS_EVENT *event);
660extern HAL_BOOL ar5212IsFastClockEnabled(struct ath_hal *ah);
661extern uint32_t ar5212Get11nExtBusy(struct ath_hal *ah);
662
663#endif /* _ATH_AR5212_H_ */
HAL_STATUS
Definition: ah.h:71
HAL_PKT_TYPE
Definition: ah.h:398
#define HAL_NUM_TX_QUEUES
Definition: ah.h:251
HAL_RX_QUEUE
Definition: ah.h:258
HAL_OPMODE
Definition: ah.h:764
HAL_POWER_MODE
Definition: ah.h:439
HAL_CAPABILITY_TYPE
Definition: ah.h:98
HAL_RESET_TYPE
Definition: ah.h:771
HAL_ANT_SETTING
Definition: ah.h:758
HAL_GPIO_MUX_TYPE
Definition: ah.h:582
HAL_TX_QUEUE
Definition: ah.h:240
HAL_ANI_CMD
Definition: ah.h:970
HAL_QUIET_FLAG
Definition: ah.h:1090
HAL_INT
Definition: ah.h:472
HAL_RFGAIN
Definition: ah.h:622
HAL_BOOL
Definition: ah.h:93
HAL_LED_STATE
Definition: ah.h:227
#define IEEE80211_ADDR_LEN
Definition: ah_internal.h:501
#define AH_MAXCHAN
Definition: ah_internal.h:147
bus_space_tag_t HAL_BUS_TAG
Definition: ah_osdep.h:50
void * HAL_SOFTC
Definition: ah_osdep.h:49
bus_space_handle_t HAL_BUS_HANDLE
Definition: ah_osdep.h:51
uint32_t HAL_DMA_ADDR
Definition: ah_osdep.h:57
HAL_BOOL ar5212GetTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo)
Definition: ar5212_xmit.c:105
HAL_BOOL ar5212EepromRead(struct ath_hal *, u_int off, uint16_t *data)
Definition: ar5212_eeprom.c:38
HAL_BOOL ar5212WaitNFCalComplete(struct ath_hal *ah, int i)
Definition: ar5212_misc.c:1152
void ar5212AniDetach(struct ath_hal *)
Definition: ar5212_ani.c:209
void ar5212GetTxIntrQueue(struct ath_hal *ah, uint32_t *)
Definition: ar5212_xmit.c:953
#define AR512_NF_CAL_HIST_MAX
Definition: ar5212.h:234
void ar5212SetSpurMitigation(struct ath_hal *, const struct ieee80211_channel *)
HAL_BOOL ar5212SetCTSTimeout(struct ath_hal *, u_int)
Definition: ar5212_misc.c:547
HAL_BOOL ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, HAL_RESET_TYPE, HAL_STATUS *status)
Definition: ar5212_reset.c:119
int16_t ar5212GetNoiseFloor(struct ath_hal *ah)
HAL_RFGAIN ar5212GetRfgain(struct ath_hal *ah)
HAL_BOOL ar5212GetMibCycleCounts(struct ath_hal *, HAL_SURVEY_SAMPLE *)
Definition: ar5212_misc.c:1416
HAL_BOOL ar5212IsJapanChannelSpreadSupported(struct ath_hal *ah)
Definition: ar5212_misc.c:396
void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5212_misc.c:1307
HAL_BOOL ar5212IsSleepAfterBeaconBroken(struct ath_hal *ah)
Definition: ar5212_misc.c:444
HAL_STATUS ar5212SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag)
Definition: ar5212_misc.c:639
HAL_BOOL ar5212SetTxPowerLimit(struct ath_hal *ah, uint32_t limit)
HAL_BOOL ar5212FillTxDesc(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)
Definition: ar5212_xmit.c:806
uint32_t ar5212GetTsf32(struct ath_hal *ah)
Definition: ar5212_misc.c:263
void ar5212SetTxDescLink(struct ath_hal *ah, void *ds, uint32_t link)
Definition: ar5212_xmit.c:982
void ar5212SetNav(struct ath_hal *, u_int)
Definition: ar5212_misc.c:1483
void ar5212SetMulticastFilter(struct ath_hal *ah, uint32_t filter0, uint32_t filter1)
Definition: ar5212_recv.c:119
HAL_BOOL ar5212SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry, const HAL_KEYVAL *k, const uint8_t *mac, int xorKey)
HAL_BOOL ar5212SetSlotTime(struct ath_hal *, u_int)
Definition: ar5212_misc.c:475
void ar5212StopPcuReceive(struct ath_hal *ah)
Definition: ar5212_recv.c:106
HAL_BOOL ar5212AniSetParams(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *)
Definition: ar5212_ani.c:183
HAL_BOOL ar5212PerCalibration(struct ath_hal *ah, struct ieee80211_channel *chan, HAL_BOOL *isIQdone)
HAL_BOOL ar5212GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *ds0, int *rates, int *tries)
Definition: ar5212_xmit.c:964
void ar5212SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *pSet)
Definition: ar5212_misc.c:301
u_int ar5212GetCTSTimeout(struct ath_hal *)
Definition: ar5212_misc.c:566
uint32_t ar5212GpioGet(struct ath_hal *ah, uint32_t gpio)
Definition: ar5212_gpio.c:92
HAL_ANT_SETTING ar5212GetAntennaSwitch(struct ath_hal *)
Definition: ar5212_misc.c:423
void ar5212EnableMibCounters(struct ath_hal *)
Definition: ar5212_misc.c:366
void ar5212GetTxDescLinkPtr(struct ath_hal *ah, void *ds, uint32_t **linkptr)
Definition: ar5212_xmit.c:998
void ar5212DisableMibCounters(struct ath_hal *)
Definition: ar5212_misc.c:374
void ar5212Detach(struct ath_hal *ah)
HAL_BOOL ar5212GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5212_misc.c:1270
HAL_BOOL ar5212SetMacAddress(struct ath_hal *ah, const uint8_t *)
Definition: ar5212_misc.c:46
HAL_BOOL ar5212SetMulticastFilterIndex(struct ath_hal *, uint32_t ix)
Definition: ar5212_recv.c:149
uint64_t ar5212GetNextTBTT(struct ath_hal *)
Definition: ar5212_beacon.c:34
void ar5212AniPhyErrReport(struct ath_hal *ah, const struct ath_rx_status *rs)
Definition: ar5212_ani.c:754
struct RfHalFuncs RF_HAL_FUNCS
int16_t ar5212GetNfHistMid(const int16_t calData[])
int ar5212SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, const HAL_TXQ_INFO *qInfo)
Definition: ar5212_xmit.c:122
void ar5212EnableReceive(struct ath_hal *ah)
Definition: ar5212_recv.c:58
HAL_BOOL ar5212SetBssIdMask(struct ath_hal *, const uint8_t *)
Definition: ar5212_misc.c:63
HAL_STATUS ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc *, uint32_t, struct ath_desc *, uint64_t, struct ath_rx_status *)
Definition: ar5212_recv.c:248
u_int ar5212GetNav(struct ath_hal *)
Definition: ar5212_misc.c:1468
void ar5212SetOperatingMode(struct ath_hal *ah, int opmode)
Definition: ar5212_reset.c:804
void ar5212SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *)
Definition: ar5212_beacon.c:47
#define HAL_DECOMP_MASK_SIZE
Definition: ar5212.h:80
HAL_BOOL ar5212SetupTxDesc(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)
Definition: ar5212_xmit.c:690
HAL_BOOL ar5212StopTxDma(struct ath_hal *ah, u_int q)
Definition: ar5212_xmit.c:590
HAL_BOOL ar5212ReleaseTxQueue(struct ath_hal *ah, u_int q)
Definition: ar5212_xmit.c:232
HAL_BOOL ar5212SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo)
Definition: ar5212_xmit.c:88
void ar5212SetRxFilter(struct ath_hal *ah, uint32_t bits)
Definition: ar5212_recv.c:187
HAL_BOOL ar5212IsFastClockEnabled(struct ath_hal *ah)
Definition: ar5212_misc.c:1397
void ar5212AniAttach(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *, HAL_BOOL ena)
Definition: ar5212_ani.c:152
void ar5212ResetStaBeaconTimers(struct ath_hal *ah)
u_int ar5212GetAckTimeout(struct ath_hal *)
Definition: ar5212_misc.c:519
HAL_BOOL ar5212FillCapabilityInfo(struct ath_hal *ah)
u_int ar5212GetSifsTime(struct ath_hal *)
Definition: ar5212_misc.c:468
void ar5212IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *)
Definition: ar5212_xmit.c:794
u_int ar5212GetSlotTime(struct ath_hal *)
Definition: ar5212_misc.c:493
void ar5212SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *)
void ar5212SetCompRegs(struct ath_hal *ah)
void ar5212ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *)
Definition: ar5212_ani.c:685
HAL_BOOL ar5212SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t, HAL_STATUS *)
Definition: ar5212_misc.c:932
HAL_BOOL ar5212ChipTest(struct ath_hal *ah)
HAL_BOOL ar5212StopDmaReceive(struct ath_hal *ah)
Definition: ar5212_recv.c:67
HAL_BOOL ar5212UpdateTxTrigLevel(struct ath_hal *, HAL_BOOL IncTrigLevel)
Definition: ar5212_xmit.c:48
void ar5212UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS *stats)
Definition: ar5212_misc.c:383
struct _gainOptStep GAIN_OPTIMIZATION_STEP
HAL_ANI_STATS * ar5212AniGetCurrentStats(struct ath_hal *)
Definition: ar5212_ani.c:116
HAL_BOOL ar5212ClrMulticastFilterIndex(struct ath_hal *, uint32_t ix)
Definition: ar5212_recv.c:129
void ar5212SetTsf64(struct ath_hal *ah, uint64_t tsf64)
Definition: ar5212_misc.c:269
HAL_BOOL ar5212GetChannelEdges(struct ath_hal *ah, uint16_t flags, uint16_t *low, uint16_t *high)
uint32_t ar5212NumTxPending(struct ath_hal *ah, u_int q)
Definition: ar5212_xmit.c:566
uint32_t ar5212GetTxDP(struct ath_hal *ah, u_int q)
Definition: ar5212_xmit.c:516
void ar5212SetChainMasks(struct ath_hal *, uint32_t, uint32_t)
Definition: ar5212_misc.c:1457
void ar5212InitializeGainValues(struct ath_hal *)
Definition: ar5212_rfgain.c:66
HAL_BOOL ar5212SetupXTxDesc(struct ath_hal *, struct ath_desc *, u_int txRate1, u_int txRetries1, u_int txRate2, u_int txRetries2, u_int txRate3, u_int txRetries3)
Definition: ar5212_xmit.c:762
HAL_BOOL ar5212EepromWrite(struct ath_hal *, u_int off, uint16_t data)
HAL_BOOL ar5212GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan)
uint32_t ar5212Get11nExtBusy(struct ath_hal *ah)
Definition: ar5212_misc.c:1407
void ar5212GetBssIdMask(struct ath_hal *ah, uint8_t *mac)
Definition: ar5212_misc.c:55
HAL_BOOL ar5212SetTxDP(struct ath_hal *ah, u_int q, uint32_t txdp)
Definition: ar5212_xmit.c:526
int16_t ar5212GetNfAdjust(struct ath_hal *, const HAL_CHANNEL_INTERNAL *)
Definition: ar5212_misc.c:769
HAL_BOOL ar5212SetAckTimeout(struct ath_hal *, u_int)
Definition: ar5212_misc.c:500
HAL_BOOL ar5212IsKeyCacheEntryValid(struct ath_hal *, uint16_t entry)
HAL_BOOL ar5212GpioCfgOutput(struct ath_hal *, uint32_t gpio, HAL_GPIO_MUX_TYPE)
Definition: ar5212_gpio.c:41
HAL_BOOL ar5212StartTxDma(struct ath_hal *ah, u_int q)
Definition: ar5212_xmit.c:546
HAL_BOOL ar5212SetSifsTime(struct ath_hal *, u_int)
Definition: ar5212_misc.c:450
HAL_BOOL ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
Definition: ar5212_power.c:122
HAL_BOOL ar5212Disable(struct ath_hal *ah)
Definition: ar5212_reset.c:844
HAL_BOOL ar5212GetPendingInterrupts(struct ath_hal *ah, HAL_INT *)
HAL_INT ar5212SetInterrupts(struct ath_hal *ah, HAL_INT ints)
HAL_BOOL ar5212ResetTxQueue(struct ath_hal *ah, u_int q)
Definition: ar5212_xmit.c:270
void ar5212SetLedState(struct ath_hal *ah, HAL_LED_STATE state)
Definition: ar5212_misc.c:177
HAL_BOOL ar5212GpioCfgInput(struct ath_hal *, uint32_t gpio)
Definition: ar5212_gpio.c:59
HAL_BOOL ar5212IsNFCalInProgress(struct ath_hal *ah)
Definition: ar5212_misc.c:1137
uint32_t ar5212GetRxDP(struct ath_hal *ath, HAL_RX_QUEUE)
Definition: ar5212_recv.c:35
void ar5212StartPcuReceive(struct ath_hal *ah, HAL_BOOL)
Definition: ar5212_recv.c:90
GAIN_PARAMS_5112
Definition: ar5212.h:99
@ GP_PWD_138
Definition: ar5212.h:101
@ GP_PWD_132
Definition: ar5212.h:104
@ GP_MIXGAIN_OVR
Definition: ar5212.h:100
@ GP_PWD_136
Definition: ar5212.h:103
@ GP_PWD_131
Definition: ar5212.h:105
@ GP_PWD_137
Definition: ar5212.h:102
@ GP_PWD_130
Definition: ar5212.h:106
HAL_BOOL ar5212SetChannel(struct ath_hal *, const struct ieee80211_channel *)
Definition: ar5212_reset.c:714
HAL_BOOL ar5212PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan, u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone)
Definition: ar5212_reset.c:974
u_int ar5212GetDefAntenna(struct ath_hal *ah)
Definition: ar5212_misc.c:411
void ar5212SetDefAntenna(struct ath_hal *ah, u_int antenna)
Definition: ar5212_misc.c:417
HAL_POWER_MODE ar5212GetPowerMode(struct ath_hal *ah)
Definition: ar5212_power.c:165
void ar5212SetPCUConfig(struct ath_hal *)
Definition: ar5212_misc.c:653
void ar5212AniPoll(struct ath_hal *, const struct ieee80211_channel *)
Definition: ar5212_ani.c:983
void ar5212EnableRfKill(struct ath_hal *)
Definition: ar5212_misc.c:149
HAL_BOOL ar5212SetAntennaSwitchInternal(struct ath_hal *ah, HAL_ANT_SETTING settings, const struct ieee80211_channel *)
uint32_t ar5212GetRadioRev(struct ath_hal *ah)
void ar5212InitState(struct ath_hal_5212 *, uint16_t devid, HAL_SOFTC, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
const HAL_RATE_TABLE * ar5212GetRateTable(struct ath_hal *, u_int mode)
Definition: ar5212_phy.c:164
void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5212_misc.c:1166
GAIN_PARAMS
Definition: ar5212.h:92
@ GP_TXCLIP
Definition: ar5212.h:93
@ GP_PD84
Definition: ar5212.h:95
@ GP_PD90
Definition: ar5212.h:94
@ GP_GSEL
Definition: ar5212.h:96
void ar5212AniReset(struct ath_hal *, const struct ieee80211_channel *, HAL_OPMODE, int)
Definition: ar5212_ani.c:588
u_int ar5212GetAckCTSRate(struct ath_hal *)
Definition: ar5212_misc.c:526
HAL_STATUS ar5212ProcTxDesc(struct ath_hal *ah, struct ath_desc *, struct ath_tx_status *)
Definition: ar5212_xmit.c:878
void ar5212SetCoverageClass(struct ath_hal *, uint8_t, int)
Definition: ar5212_misc.c:589
uint32_t ar5212GetRandomSeed(struct ath_hal *ah)
Definition: ar5212_misc.c:333
u_int ar5212GetWirelessModes(struct ath_hal *ah)
Definition: ar5212_misc.c:115
HAL_BOOL ar5212ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
Definition: ar5212_misc.c:1351
HAL_BOOL ar5212ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *)
HAL_BOOL ar5212AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param)
Definition: ar5212_ani.c:222
void ar5212GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel)
Definition: ar5212_gpio.c:107
void ar5212GetMacAddress(struct ath_hal *ah, uint8_t *mac)
Definition: ar5212_misc.c:38
uint32_t ar5212GetKeyCacheSize(struct ath_hal *)
HAL_BOOL ar5212GetPowerStatus(struct ath_hal *ah)
void ar5212GetTxDescLink(struct ath_hal *ah, void *ds, uint32_t *link)
Definition: ar5212_xmit.c:990
uint64_t ar5212GetTsf64(struct ath_hal *ah)
Definition: ar5212_misc.c:235
HAL_BOOL ar5212SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING)
Definition: ar5212_misc.c:429
void ar5212InitNfCalHistBuffer(struct ath_hal *)
HAL_BOOL ar5212SetAckCTSRate(struct ath_hal *, u_int)
Definition: ar5212_misc.c:532
void ar5212RequestRfgain(struct ath_hal *)
HAL_BOOL ar5212SetDecompMask(struct ath_hal *, uint16_t, int)
Definition: ar5212_misc.c:574
void ar5212SetRxDP(struct ath_hal *ah, uint32_t rxdp, HAL_RX_QUEUE)
Definition: ar5212_recv.c:46
void ar5212ResetTsf(struct ath_hal *ah)
Definition: ar5212_misc.c:279
HAL_BOOL ar5212PhyDisable(struct ath_hal *ah)
Definition: ar5212_reset.c:835
HAL_BOOL ar5212GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val)
Definition: ar5212_gpio.c:74
HAL_INT ar5212GetInterrupts(struct ath_hal *ah)
HAL_STATUS ar5212GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t, uint32_t *)
Definition: ar5212_misc.c:795
HAL_BOOL ar5212DetectCardPresent(struct ath_hal *ah)
Definition: ar5212_misc.c:348
HAL_BOOL ar5212SetRegulatoryDomain(struct ath_hal *ah, uint16_t regDomain, HAL_STATUS *stats)
Definition: ar5212_misc.c:79
uint32_t ar5212GetRxFilter(struct ath_hal *ah)
Definition: ar5212_recv.c:169
HAL_BOOL ar5212GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize)
Definition: ar5212_misc.c:1052
void ar5212SetupClock(struct ath_hal *ah, HAL_OPMODE opmode)
Definition: ar5212_misc.c:683
#define NUM_CORNER_FIX_BITS_5112
Definition: ar5212.h:86
HAL_BOOL ar5212ChipReset(struct ath_hal *ah, const struct ieee80211_channel *)
Definition: ar5212_reset.c:863
HAL_BOOL ar5212SetupRxDesc(struct ath_hal *, struct ath_desc *, uint32_t size, u_int flags)
Definition: ar5212_recv.c:222
struct ar5212AniState * ar5212AniGetCurrentState(struct ath_hal *)
Definition: ar5212_ani.c:107
HAL_BOOL ar5212ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry)
void ar5212BeaconInit(struct ath_hal *ah, uint32_t next_beacon, uint32_t beacon_period)
Definition: ar5212_beacon.c:90
HAL_BOOL ar5212IsInterruptPending(struct ath_hal *ah)
HAL_BOOL ar5212Use32KHzclock(struct ath_hal *ah, HAL_OPMODE opmode)
Definition: ar5212_misc.c:665
void ar5212WriteAssocid(struct ath_hal *ah, const uint8_t *bssid, uint16_t assocId)
Definition: ar5212_misc.c:219
void ar5212RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, const struct ieee80211_channel *)
Definition: ar5212_ani.c:971
HAL_BOOL ar5212SetKeyCacheEntryMac(struct ath_hal *, uint16_t entry, const uint8_t *mac)
uint32_t ar5212GetCurRssi(struct ath_hal *ah)
Definition: ar5212_misc.c:405
void ar5212RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode)
Definition: ar5212_misc.c:740
Definition: ah.h:783
HAL_BOOL(* getChannelMaxMinPower)(struct ath_hal *ah, const struct ieee80211_channel *, int16_t *maxPow, int16_t *minPow)
Definition: ar5212.h:147
HAL_BOOL(* setRfRegs)(struct ath_hal *, const struct ieee80211_channel *, uint16_t modesIndex, uint16_t *rfXpdGain)
Definition: ar5212.h:141
HAL_BOOL(* setPowerTable)(struct ath_hal *ah, int16_t *minPower, int16_t *maxPower, const struct ieee80211_channel *, uint16_t *rfXpdGain)
Definition: ar5212.h:144
HAL_BOOL(* setChannel)(struct ath_hal *, const struct ieee80211_channel *)
Definition: ar5212.h:139
void(* writeRegs)(struct ath_hal *, u_int modeIndex, u_int freqIndex, int regWrites)
Definition: ar5212.h:136
int16_t(* getNfAdjust)(struct ath_hal *, const HAL_CHANNEL_INTERNAL *)
Definition: ar5212.h:150
void(* rfDetach)(struct ath_hal *ah)
Definition: ar5212.h:135
void * priv
Definition: ar5212.h:133
int8_t stepName[16]
Definition: ar5211.h:76
int16_t paramVal[4]
Definition: ar5211.h:74
int32_t stepGain
Definition: ar5211.h:75
int coarseLow[5]
Definition: ar5212.h:157
uint32_t rssiThrHigh
Definition: ar5212.h:171
uint32_t ofdmTrigHigh
Definition: ar5212.h:166
int coarseHigh[5]
Definition: ar5212.h:156
int firstep[3]
Definition: ar5212.h:164
int maxNoiseImmunityLevel
Definition: ar5212.h:154
int maxFirstepLevel
Definition: ar5212.h:163
uint32_t cckTrigLow
Definition: ar5212.h:169
int maxSpurImmunityLevel
Definition: ar5212.h:160
int32_t rssiThrLow
Definition: ar5212.h:170
uint32_t ofdmPhyErrBase
Definition: ar5212.h:176
int cycPwrThr1[8]
Definition: ar5212.h:161
uint32_t ofdmTrigLow
Definition: ar5212.h:167
uint32_t cckPhyErrBase
Definition: ar5212.h:177
int totalSizeDesired[5]
Definition: ar5212.h:155
uint32_t cckTrigHigh
Definition: ar5212.h:168
int firpwr[5]
Definition: ar5212.h:158
uint8_t ofdmWeakSigDetectOff
Definition: ar5212.h:187
uint8_t noiseImmunityLevel
Definition: ar5212.h:184
uint8_t spurImmunityLevel
Definition: ar5212.h:185
const struct ar5212AniParams * params
Definition: ar5212.h:199
uint8_t firstepLevel
Definition: ar5212.h:186
uint32_t rxFrameCount
Definition: ar5212.h:193
uint32_t cycleCount
Definition: ar5212.h:194
uint32_t txFrameCount
Definition: ar5212.h:192
uint32_t ofdmPhyErrCount
Definition: ar5212.h:196
uint32_t cckPhyErrCount
Definition: ar5212.h:197
uint8_t cckWeakSigThreshold
Definition: ar5212.h:188
uint32_t listenTime
Definition: ar5212.h:189
uint8_t invalidNFcount
Definition: ar5212.h:241
int16_t privNF
Definition: ar5212.h:238
int16_t nfCalBuffer[AR512_NF_CAL_HIST_MAX]
Definition: ar5212.h:237
uint8_t currIndex
Definition: ar5212.h:239
uint8_t first_run
Definition: ar5212.h:240
HAL_BOOL ah_hasHwPhyCounters
Definition: ar5212.h:321
uint32_t ah_cycleCount
Definition: ar5212.h:344
u_int ah_pcdacTableSize
Definition: ar5212.h:335
uint32_t ah_miscMode
Definition: ar5212.h:287
GAIN_VALUES ah_gainValues
Definition: ar5212.h:254
uint32_t ah_txBusy
Definition: ar5212.h:347
HAL_ANI_STATS ah_stats
Definition: ar5212.h:265
uint32_t ah_txUrnInterruptMask
Definition: ar5212.h:272
uint32_t ah_txEolInterruptMask
Definition: ar5212.h:271
uint32_t ah_procPhyErr
Definition: ar5212.h:320
u_int ah_acktimeout
Definition: ar5212.h:308
HAL_ANT_SETTING ah_antControl
Definition: ar5212.h:277
u_int ah_ctstimeout
Definition: ar5212.h:309
HAL_INI_ARRAY ah_ini_common
Definition: ar5212.h:252
struct ar5212AniParams ah_aniParams24
Definition: ar5212.h:322
HAL_BOOL ah_cwCalRequire
Definition: ar5212.h:289
int16_t ah_txPowerIndexOffset
Definition: ar5212.h:301
struct ar5212NfCalHist ah_nfCalHist
Definition: ar5212.h:305
uint32_t ah_txDescInterruptMask
Definition: ar5212.h:270
uint32_t ah_ctlBusy
Definition: ar5212.h:345
uint32_t ah_rx_chainmask
Definition: ar5212.h:348
uint32_t ah_maskReg
Definition: ar5212.h:264
@ IQ_CAL_RUNNING
Definition: ar5212.h:281
@ IQ_CAL_DONE
Definition: ar5212.h:282
@ IQ_CAL_INACTIVE
Definition: ar5212.h:280
@ DONT_USE_32KHZ
Definition: ar5212.h:298
@ AUTO_32KHZ
Definition: ar5212.h:296
uint32_t ah_txOkInterruptMask
Definition: ar5212.h:268
struct ar5212AniState * ah_curani
Definition: ar5212.h:324
uint32_t ah_gpioSelect
Definition: ar5212.h:314
uint32_t ah_txErrInterruptMask
Definition: ar5212.h:269
uint8_t ah_txTrigLev
Definition: ar5212.h:338
u_int ah_slottime
Definition: ar5212.h:307
enum ath_hal_5212::@23 ah_enable32kHzClock
uint8_t ah_bssidmask[IEEE80211_ADDR_LEN]
Definition: ar5212.h:258
enum ath_hal_5212::@22 ah_bIQCalibration
uint32_t ah_gpioBit
Definition: ar5212.h:316
HAL_BOOL ah_phyPowerOn
Definition: ar5212.h:291
uint32_t ah_tx6PowerInHalfDbm
Definition: ar5212.h:285
uint32_t ah_staId1Defaults
Definition: ar5212.h:286
uint32_t ah_polarity
Definition: ar5212.h:315
uint32_t ah_rssiThr
Definition: ar5212.h:288
uint8_t ah_macaddr[IEEE80211_ADDR_LEN]
Definition: ar5212.h:256
HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES]
Definition: ar5212.h:273
uint32_t ah_tx_chainmask
Definition: ar5212.h:349
uint32_t ah_beaconInterval
Definition: ar5212.h:294
uint16_t * ah_pcdacTable
Definition: ar5212.h:334
uint8_t ah_maxTxTrigLev
Definition: ar5212.h:339
uint32_t ah_macTPC
Definition: ar5212.h:293
uint8_t ah_bssid[IEEE80211_ADDR_LEN]
Definition: ar5212.h:257
HAL_BOOL ah_tpcEnabled
Definition: ar5212.h:290
HAL_BOOL ah_diversity
Definition: ar5212.h:278
uint16_t ah_ratesArray[37]
Definition: ar5212.h:336
RF_HAL_FUNCS * ah_rfHal
Definition: ar5212.h:266
HAL_ANI_STATS ext_ani_stats
Definition: ar5212.h:352
uint8_t ah_decompMask[HAL_DECOMP_MASK_SIZE]
Definition: ar5212.h:276
HAL_RFGAIN ah_rfgainState
Definition: ar5212.h:284
struct ath_hal_private ah_priv
Definition: ar5212.h:245
uint32_t ah_ofdmTxPower
Definition: ar5212.h:300
u_int ah_sifstime
Definition: ar5212.h:310
HAL_BOOL ah_isHb63
Definition: ar5212.h:292
struct ar5212AniParams ah_aniParams5
Definition: ar5212.h:323
uint32_t ah_intrTxqs
Definition: ar5212.h:274
uint32_t ah_txDescMask
Definition: ar5212.h:267
uint16_t ah_assocId
Definition: ar5212.h:259
struct ar5212AniState ah_ani[AH_MAXCHAN]
Definition: ar5212.h:325
uint32_t ah_rxBusy
Definition: ar5212.h:346
HAL_INI_ARRAY ah_ini_modes
Definition: ar5212.h:251
HAL_BOOL(* ah_aniControl)(struct ath_hal *, HAL_ANI_CMD cmd, int param)
Definition: ar5212.h:328
Definition: ah.h:1219