FreeBSD kernel ATH device code
ar5212_misc.c
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#include "opt_ah.h"
22
23#include "ah.h"
24#include "ah_internal.h"
25#include "ah_devid.h"
26#include "ah_desc.h" /* NB: for HAL_PHYERR* */
27
28#include "ar5212/ar5212.h"
29#include "ar5212/ar5212reg.h"
30#include "ar5212/ar5212phy.h"
31
32#include "ah_eeprom_v3.h"
33
34#define AR_NUM_GPIO 6 /* 6 GPIO pins */
35#define AR_GPIOD_MASK 0x0000002F /* GPIO data reg r/w mask */
36
37void
38ar5212GetMacAddress(struct ath_hal *ah, uint8_t *mac)
39{
40 struct ath_hal_5212 *ahp = AH5212(ah);
41
43}
44
46ar5212SetMacAddress(struct ath_hal *ah, const uint8_t *mac)
47{
48 struct ath_hal_5212 *ahp = AH5212(ah);
49
51 return AH_TRUE;
52}
53
54void
55ar5212GetBssIdMask(struct ath_hal *ah, uint8_t *mask)
56{
57 struct ath_hal_5212 *ahp = AH5212(ah);
58
60}
61
63ar5212SetBssIdMask(struct ath_hal *ah, const uint8_t *mask)
64{
65 struct ath_hal_5212 *ahp = AH5212(ah);
66
67 /* save it since it must be rewritten on reset */
69
72 return AH_TRUE;
73}
74
75/*
76 * Attempt to change the cards operating regulatory domain to the given value
77 */
80 uint16_t regDomain, HAL_STATUS *status)
81{
82 HAL_STATUS ecode;
83
84 if (AH_PRIVATE(ah)->ah_currentRD == regDomain) {
85 ecode = HAL_EINVAL;
86 goto bad;
87 }
89 ecode = HAL_EEWRITE;
90 goto bad;
91 }
92#ifdef AH_SUPPORT_WRITE_REGDOMAIN
95 "%s: set regulatory domain to %u (0x%x)\n",
96 __func__, regDomain, regDomain);
97 AH_PRIVATE(ah)->ah_currentRD = regDomain;
98 return AH_TRUE;
99 }
100#endif
101 ecode = HAL_EIO;
102bad:
103 if (status)
104 *status = ecode;
105 return AH_FALSE;
106}
107
108/*
109 * Return the wireless modes (a,b,g,t) supported by hardware.
110 *
111 * This value is what is actually supported by the hardware
112 * and is unaffected by regulatory/country code settings.
113 */
114u_int
116{
117 u_int mode = 0;
118
120 mode = HAL_MODE_11A;
123 if (AH_PRIVATE(ah)->ah_caps.halChanHalfRate)
125 if (AH_PRIVATE(ah)->ah_caps.halChanQuarterRate)
127 }
129 mode |= HAL_MODE_11B;
131 AH_PRIVATE(ah)->ah_subvendorid != AR_SUBVENDOR_ID_NOG) {
132 mode |= HAL_MODE_11G;
134 mode |= HAL_MODE_108G;
135 if (AH_PRIVATE(ah)->ah_caps.halChanHalfRate)
137 if (AH_PRIVATE(ah)->ah_caps.halChanQuarterRate)
139 }
140 return mode;
141}
142
143/*
144 * Set the interrupt and GPIO values so the ISR can disable RF
145 * on a switch signal. Assumes GPIO port and interrupt polarity
146 * are set prior to call.
147 */
148void
150{
151 uint16_t rfsilent = AH_PRIVATE(ah)->ah_rfsilent;
152 int select = MS(rfsilent, AR_EEPROM_RFSILENT_GPIO_SEL);
153 int polarity = MS(rfsilent, AR_EEPROM_RFSILENT_POLARITY);
154
155 /*
156 * Configure the desired GPIO port for input
157 * and enable baseband rf silence.
158 */
159 ath_hal_gpioCfgInput(ah, select);
160 OS_REG_SET_BIT(ah, AR_PHY(0), 0x00002000);
161 /*
162 * If radio disable switch connection to GPIO bit x is enabled
163 * program GPIO interrupt.
164 * If rfkill bit on eeprom is 1, setupeeprommap routine has already
165 * verified that it is a later version of eeprom, it has a place for
166 * rfkill bit and it is set to 1, indicating that GPIO bit x hardware
167 * connection is present.
168 */
169 ath_hal_gpioSetIntr(ah, select,
170 (ath_hal_gpioGet(ah, select) == polarity ? !polarity : polarity));
171}
172
173/*
174 * Change the LED blinking pattern to correspond to the connectivity
175 */
176void
178{
179 static const uint32_t ledbits[8] = {
180 AR_PCICFG_LEDCTL_NONE, /* HAL_LED_INIT */
181 AR_PCICFG_LEDCTL_PEND, /* HAL_LED_SCAN */
182 AR_PCICFG_LEDCTL_PEND, /* HAL_LED_AUTH */
183 AR_PCICFG_LEDCTL_ASSOC, /* HAL_LED_ASSOC*/
184 AR_PCICFG_LEDCTL_ASSOC, /* HAL_LED_RUN */
188 };
189 uint32_t bits;
190
191 bits = OS_REG_READ(ah, AR_PCICFG);
192 if (IS_2417(ah)) {
193 /*
194 * Enable LED for Nala. There is a bit marked reserved
195 * that must be set and we also turn on the power led.
196 * Because we mark s/w LED control setting the control
197 * status bits below is meangless (the driver must flash
198 * the LED(s) using the GPIO lines).
199 */
200 bits = (bits &~ AR_PCICFG_LEDMODE)
202#if 0
204#endif
205 | 0x08000000;
206 }
207 bits = (bits &~ AR_PCICFG_LEDCTL)
208 | SM(ledbits[state & 0x7], AR_PCICFG_LEDCTL);
209 OS_REG_WRITE(ah, AR_PCICFG, bits);
210}
211
212/*
213 * Change association related fields programmed into the hardware.
214 * Writing a valid BSSID to the hardware effectively enables the hardware
215 * to synchronize its TSF to the correct beacons and receive frames coming
216 * from that BSSID. It is called by the SME JOIN operation.
217 */
218void
219ar5212WriteAssocid(struct ath_hal *ah, const uint8_t *bssid, uint16_t assocId)
220{
221 struct ath_hal_5212 *ahp = AH5212(ah);
222
223 /* save bssid for possible re-use on reset */
225 ahp->ah_assocId = assocId;
228 ((assocId & 0x3fff)<<AR_BSS_ID1_AID_S));
229}
230
231/*
232 * Get the current hardware tsf for stamlme
233 */
234uint64_t
236{
237 uint32_t low1, low2, u32;
238
239 /* sync multi-word read */
240 low1 = OS_REG_READ(ah, AR_TSF_L32);
241 u32 = OS_REG_READ(ah, AR_TSF_U32);
242 low2 = OS_REG_READ(ah, AR_TSF_L32);
243 if (low2 < low1) { /* roll over */
244 /*
245 * If we are not preempted this will work. If we are
246 * then we re-reading AR_TSF_U32 does no good as the
247 * low bits will be meaningless. Likewise reading
248 * L32, U32, U32, then comparing the last two reads
249 * to check for rollover doesn't help if preempted--so
250 * we take this approach as it costs one less PCI read
251 * which can be noticeable when doing things like
252 * timestamping packets in monitor mode.
253 */
254 u32++;
255 }
256 return (((uint64_t) u32) << 32) | ((uint64_t) low2);
257}
258
259/*
260 * Get the current hardware tsf for stamlme
261 */
262uint32_t
264{
265 return OS_REG_READ(ah, AR_TSF_L32);
266}
267
268void
269ar5212SetTsf64(struct ath_hal *ah, uint64_t tsf64)
270{
271 OS_REG_WRITE(ah, AR_TSF_L32, tsf64 & 0xffffffff);
272 OS_REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
273}
274
275/*
276 * Reset the current hardware tsf for stamlme.
277 */
278void
280{
281
282 uint32_t val = OS_REG_READ(ah, AR_BEACON);
283
285 /*
286 * When resetting the TSF, write twice to the
287 * corresponding register; each write to the RESET_TSF bit toggles
288 * the internal signal to cause a reset of the TSF - but if the signal
289 * is left high, it will reset the TSF on the next chip reset also!
290 * writing the bit an even number of times fixes this issue
291 */
293}
294
295/*
296 * Set or clear hardware basic rate bit
297 * Set hardware basic rate set if basic rate is found
298 * and basic rate is equal or less than 2Mbps
299 */
300void
302{
303 const struct ieee80211_channel *chan = AH_PRIVATE(ah)->ah_curchan;
304 uint32_t reg;
305 uint8_t xset;
306 int i;
307
308 if (chan == AH_NULL || !IEEE80211_IS_CHAN_CCK(chan))
309 return;
310 xset = 0;
311 for (i = 0; i < rs->rs_count; i++) {
312 uint8_t rset = rs->rs_rates[i];
313 /* Basic rate defined? */
314 if ((rset & 0x80) && (rset &= 0x7f) >= xset)
315 xset = rset;
316 }
317 /*
318 * Set the h/w bit to reflect whether or not the basic
319 * rate is found to be equal or less than 2Mbps.
320 */
321 reg = OS_REG_READ(ah, AR_STA_ID1);
322 if (xset && xset/2 <= 2)
324 else
326}
327
328/*
329 * Grab a semi-random value from hardware registers - may not
330 * change often
331 */
332uint32_t
334{
335 uint32_t nf;
336
337 nf = (OS_REG_READ(ah, AR_PHY(25)) >> 19) & 0x1ff;
338 if (nf & 0x100)
339 nf = 0 - ((nf ^ 0x1ff) + 1);
340 return (OS_REG_READ(ah, AR_TSF_U32) ^
341 OS_REG_READ(ah, AR_TSF_L32) ^ nf);
342}
343
344/*
345 * Detect if our card is present
346 */
349{
350 uint16_t macVersion, macRev;
351 uint32_t v;
352
353 /*
354 * Read the Silicon Revision register and compare that
355 * to what we read at attach time. If the same, we say
356 * a card/device is present.
357 */
358 v = OS_REG_READ(ah, AR_SREV) & AR_SREV_ID;
359 macVersion = v >> AR_SREV_ID_S;
360 macRev = v & AR_SREV_REVISION;
361 return (AH_PRIVATE(ah)->ah_macVersion == macVersion &&
362 AH_PRIVATE(ah)->ah_macRev == macRev);
363}
364
365void
367{
368 /* NB: this just resets the mib counter machinery */
371}
372
373void
375{
377}
378
379/*
380 * Update MIB Counters
381 */
382void
384{
385 stats->ackrcv_bad += OS_REG_READ(ah, AR_ACK_FAIL);
386 stats->rts_bad += OS_REG_READ(ah, AR_RTS_FAIL);
387 stats->fcs_bad += OS_REG_READ(ah, AR_FCS_FAIL);
388 stats->rts_good += OS_REG_READ(ah, AR_RTS_OK);
389 stats->beacons += OS_REG_READ(ah, AR_BEACON_CNT);
390}
391
392/*
393 * Detect if the HW supports spreading a CCK signal on channel 14
394 */
397{
398 return AH_TRUE;
399}
400
401/*
402 * Get the rssi of frame curently being received.
403 */
404uint32_t
406{
407 return (OS_REG_READ(ah, AR_PHY_CURRENT_RSSI) & 0xff);
408}
409
410u_int
412{
413 return (OS_REG_READ(ah, AR_DEF_ANTENNA) & 0x7);
414}
415
416void
417ar5212SetDefAntenna(struct ath_hal *ah, u_int antenna)
418{
419 OS_REG_WRITE(ah, AR_DEF_ANTENNA, (antenna & 0x7));
420}
421
424{
425 return AH5212(ah)->ah_antControl;
426}
427
430{
431 struct ath_hal_5212 *ahp = AH5212(ah);
432 const struct ieee80211_channel *chan = AH_PRIVATE(ah)->ah_curchan;
433
434 if (!ahp->ah_phyPowerOn || chan == AH_NULL) {
435 /* PHY powered off, just stash settings */
436 ahp->ah_antControl = setting;
437 ahp->ah_diversity = (setting == HAL_ANT_VARIABLE);
438 return AH_TRUE;
439 }
440 return ar5212SetAntennaSwitchInternal(ah, setting, chan);
441}
442
445{
446 return AH_TRUE;
447}
448
450ar5212SetSifsTime(struct ath_hal *ah, u_int us)
451{
452 struct ath_hal_5212 *ahp = AH5212(ah);
453
454 if (us > ath_hal_mac_usec(ah, 0xffff)) {
455 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: bad SIFS time %u\n",
456 __func__, us);
457 ahp->ah_sifstime = (u_int) -1; /* restore default handling */
458 return AH_FALSE;
459 } else {
460 /* convert to system clocks */
462 ahp->ah_sifstime = us;
463 return AH_TRUE;
464 }
465}
466
467u_int
469{
470 u_int clks = OS_REG_READ(ah, AR_D_GBL_IFS_SIFS) & 0xffff;
471 return ath_hal_mac_usec(ah, clks)+2; /* convert from system clocks */
472}
473
475ar5212SetSlotTime(struct ath_hal *ah, u_int us)
476{
477 struct ath_hal_5212 *ahp = AH5212(ah);
478
479 if (us < HAL_SLOT_TIME_6 || us > ath_hal_mac_usec(ah, 0xffff)) {
480 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: bad slot time %u\n",
481 __func__, us);
482 ahp->ah_slottime = (u_int) -1; /* restore default handling */
483 return AH_FALSE;
484 } else {
485 /* convert to system clocks */
487 ahp->ah_slottime = us;
488 return AH_TRUE;
489 }
490}
491
492u_int
494{
495 u_int clks = OS_REG_READ(ah, AR_D_GBL_IFS_SLOT) & 0xffff;
496 return ath_hal_mac_usec(ah, clks); /* convert from system clocks */
497}
498
500ar5212SetAckTimeout(struct ath_hal *ah, u_int us)
501{
502 struct ath_hal_5212 *ahp = AH5212(ah);
503
504 if (us > ath_hal_mac_usec(ah, MS(0xffffffff, AR_TIME_OUT_ACK))) {
505 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: bad ack timeout %u\n",
506 __func__, us);
507 ahp->ah_acktimeout = (u_int) -1; /* restore default handling */
508 return AH_FALSE;
509 } else {
510 /* convert to system clocks */
513 ahp->ah_acktimeout = us;
514 return AH_TRUE;
515 }
516}
517
518u_int
520{
521 u_int clks = MS(OS_REG_READ(ah, AR_TIME_OUT), AR_TIME_OUT_ACK);
522 return ath_hal_mac_usec(ah, clks); /* convert from system clocks */
523}
524
525u_int
527{
528 return ((AH5212(ah)->ah_staId1Defaults & AR_STA_ID1_ACKCTS_6MB) == 0);
529}
530
532ar5212SetAckCTSRate(struct ath_hal *ah, u_int high)
533{
534 struct ath_hal_5212 *ahp = AH5212(ah);
535
536 if (high) {
538 ahp->ah_staId1Defaults &= ~AR_STA_ID1_ACKCTS_6MB;
539 } else {
542 }
543 return AH_TRUE;
544}
545
547ar5212SetCTSTimeout(struct ath_hal *ah, u_int us)
548{
549 struct ath_hal_5212 *ahp = AH5212(ah);
550
551 if (us > ath_hal_mac_usec(ah, MS(0xffffffff, AR_TIME_OUT_CTS))) {
552 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: bad cts timeout %u\n",
553 __func__, us);
554 ahp->ah_ctstimeout = (u_int) -1; /* restore default handling */
555 return AH_FALSE;
556 } else {
557 /* convert to system clocks */
560 ahp->ah_ctstimeout = us;
561 return AH_TRUE;
562 }
563}
564
565u_int
567{
568 u_int clks = MS(OS_REG_READ(ah, AR_TIME_OUT), AR_TIME_OUT_CTS);
569 return ath_hal_mac_usec(ah, clks); /* convert from system clocks */
570}
571
572/* Setup decompression for given key index */
574ar5212SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en)
575{
576 struct ath_hal_5212 *ahp = AH5212(ah);
577
578 if (keyidx >= HAL_DECOMP_MASK_SIZE)
579 return AH_FALSE;
580 OS_REG_WRITE(ah, AR_DCM_A, keyidx);
581 OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0);
582 ahp->ah_decompMask[keyidx] = en;
583
584 return AH_TRUE;
585}
586
587/* Setup coverage class */
588void
589ar5212SetCoverageClass(struct ath_hal *ah, uint8_t coverageclass, int now)
590{
591 uint32_t slot, timeout, eifs;
592 u_int clkRate;
593
594 AH_PRIVATE(ah)->ah_coverageClass = coverageclass;
595
596 if (now) {
597 if (AH_PRIVATE(ah)->ah_coverageClass == 0)
598 return;
599
600 /* Don't apply coverage class to non A channels */
601 if (!IEEE80211_IS_CHAN_A(AH_PRIVATE(ah)->ah_curchan))
602 return;
603
604 /* Get core clock rate */
605 clkRate = ath_hal_mac_clks(ah, 1);
606
607 /* Compute EIFS */
608 slot = coverageclass * 3 * clkRate;
609 eifs = coverageclass * 6 * clkRate;
610 if (IEEE80211_IS_CHAN_HALF(AH_PRIVATE(ah)->ah_curchan)) {
611 slot += IFS_SLOT_HALF_RATE;
612 eifs += IFS_EIFS_HALF_RATE;
613 } else if (IEEE80211_IS_CHAN_QUARTER(AH_PRIVATE(ah)->ah_curchan)) {
614 slot += IFS_SLOT_QUARTER_RATE;
615 eifs += IFS_EIFS_QUARTER_RATE;
616 } else { /* full rate */
617 slot += IFS_SLOT_FULL_RATE;
618 eifs += IFS_EIFS_FULL_RATE;
619 }
620
621 /*
622 * Add additional time for air propagation for ACK and CTS
623 * timeouts. This value is in core clocks.
624 */
625 timeout = ACK_CTS_TIMEOUT_11A + (coverageclass * 3 * clkRate);
626
627 /*
628 * Write the values: slot, eifs, ack/cts timeouts.
629 */
633 SM(timeout, AR_TIME_OUT_CTS)
634 | SM(timeout, AR_TIME_OUT_ACK));
635 }
636}
637
639ar5212SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration,
640 uint32_t nextStart, HAL_QUIET_FLAG flag)
641{
642 OS_REG_WRITE(ah, AR_QUIET2, period | (duration << AR_QUIET2_QUIET_DUR_S));
643 if (flag & HAL_QUIET_ENABLE) {
644 OS_REG_WRITE(ah, AR_QUIET1, nextStart | (1 << 16));
645 }
646 else {
647 OS_REG_WRITE(ah, AR_QUIET1, nextStart);
648 }
649 return HAL_OK;
650}
651
652void
654{
655 ar5212SetOperatingMode(ah, AH_PRIVATE(ah)->ah_opmode);
656}
657
658/*
659 * Return whether an external 32KHz crystal should be used
660 * to reduce power consumption when sleeping. We do so if
661 * the crystal is present (obtained from EEPROM) and if we
662 * are not running as an AP and are configured to use it.
663 */
666{
667 if (opmode != HAL_M_HOSTAP) {
668 struct ath_hal_5212 *ahp = AH5212(ah);
672 } else
673 return AH_FALSE;
674}
675
676/*
677 * If 32KHz clock exists, use it to lower power consumption during sleep
678 *
679 * Note: If clock is set to 32 KHz, delays on accessing certain
680 * baseband registers (27-31, 124-127) are required.
681 */
682void
684{
685 if (ar5212Use32KHzclock(ah, opmode)) {
686 /*
687 * Enable clocks to be turned OFF in BB during sleep
688 * and also enable turning OFF 32MHz/40MHz Refclk
689 * from A2.
690 */
693 IS_RAD5112_ANY(ah) || IS_5413(ah) ? 0x14 : 0x18);
695 OS_REG_WRITE(ah, AR_TSF_PARM, 61); /* 32 KHz TSF incr */
697
698 if (IS_2413(ah) || IS_5413(ah) || IS_2417(ah)) {
701 OS_REG_WRITE(ah, AR_PHY_M_SLEEP, 0x07);
703 /* # Set sleep clock rate to 32 KHz. */
705 } else {
708 OS_REG_WRITE(ah, AR_PHY_M_SLEEP, 0x03);
711 }
712 } else {
715
716 OS_REG_WRITE(ah, AR_TSF_PARM, 1); /* 32MHz TSF inc */
717
720
721 if (IS_2417(ah))
723 else if (IS_HB63(ah))
725 else
727 OS_REG_WRITE(ah, AR_PHY_M_SLEEP, 0x0c);
730 IS_RAD5112_ANY(ah) || IS_5413(ah) || IS_2417(ah) ? 0x14 : 0x18);
732 IS_RAD5112_ANY(ah) || IS_5413(ah) ? 39 : 31);
733 }
734}
735
736/*
737 * If 32KHz clock exists, turn it off and turn back on the 32Mhz
738 */
739void
741{
742 if (ar5212Use32KHzclock(ah, opmode)) {
743 /* # Set sleep clock rate back to 32 MHz. */
746
747 OS_REG_WRITE(ah, AR_TSF_PARM, 1); /* 32 MHz TSF incr */
749 IS_RAD5112_ANY(ah) || IS_5413(ah) ? 39 : 31);
750
751 /*
752 * Restore BB registers to power-on defaults
753 */
757 OS_REG_WRITE(ah, AR_PHY_M_SLEEP, 0x0c);
760 IS_RAD5112_ANY(ah) || IS_5413(ah) ? 0x14 : 0x18);
761 }
762}
763
764/*
765 * Adjust NF based on statistical values for 5GHz frequencies.
766 * Default method: this may be overridden by the rf backend.
767 */
768int16_t
770{
771 static const struct {
772 uint16_t freqLow;
773 int16_t adjust;
774 } adjustDef[] = {
775 { 5790, 11 }, /* NB: ordered high -> low */
776 { 5730, 10 },
777 { 5690, 9 },
778 { 5660, 8 },
779 { 5610, 7 },
780 { 5530, 5 },
781 { 5450, 4 },
782 { 5379, 2 },
783 { 5209, 0 },
784 { 3000, 1 },
785 { 0, 0 },
786 };
787 int i;
788
789 for (i = 0; c->channel <= adjustDef[i].freqLow; i++)
790 ;
791 return adjustDef[i].adjust;
792}
793
796 uint32_t capability, uint32_t *result)
797{
798#define MACVERSION(ah) AH_PRIVATE(ah)->ah_macVersion
799 struct ath_hal_5212 *ahp = AH5212(ah);
800 const HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
801 const struct ar5212AniState *ani;
802
803 switch (type) {
804 case HAL_CAP_CIPHER: /* cipher handled in hardware */
805 switch (capability) {
807 return pCap->halCipherAesCcmSupport ?
810 case HAL_CIPHER_TKIP:
811 case HAL_CIPHER_WEP:
812 case HAL_CIPHER_MIC:
813 case HAL_CIPHER_CLR:
814 return HAL_OK;
815 default:
816 return HAL_ENOTSUPP;
817 }
818 case HAL_CAP_TKIP_MIC: /* handle TKIP MIC in hardware */
819 switch (capability) {
820 case 0: /* hardware capability */
821 return HAL_OK;
822 case 1:
823 return (ahp->ah_staId1Defaults &
825 }
826 return HAL_EINVAL;
827 case HAL_CAP_TKIP_SPLIT: /* hardware TKIP uses split keys */
828 switch (capability) {
829 case 0: /* hardware capability */
830 return pCap->halTkipMicTxRxKeySupport ?
832 case 1: /* current setting */
833 return (ahp->ah_miscMode &
835 }
836 return HAL_EINVAL;
837 case HAL_CAP_WME_TKIPMIC: /* hardware can do TKIP MIC w/ WMM */
838 /* XXX move to capability bit */
839 return MACVERSION(ah) > AR_SREV_VERSION_VENICE ||
841 AH_PRIVATE(ah)->ah_macRev >= 8) ? HAL_OK : HAL_ENOTSUPP;
842 case HAL_CAP_DIVERSITY: /* hardware supports fast diversity */
843 switch (capability) {
844 case 0: /* hardware capability */
845 return HAL_OK;
846 case 1: /* current setting */
847 return ahp->ah_diversity ? HAL_OK : HAL_ENXIO;
849 *result = OS_REG_READ(ah, AR_PHY_RESTART);
850 *result = MS(*result, AR_PHY_RESTART_DIV_GC);
851 return HAL_OK;
852 }
853 return HAL_EINVAL;
854 case HAL_CAP_DIAG:
855 *result = AH_PRIVATE(ah)->ah_diagreg;
856 return HAL_OK;
857 case HAL_CAP_TPC:
858 switch (capability) {
859 case 0: /* hardware capability */
860 return HAL_OK;
861 case 1:
862 return ahp->ah_tpcEnabled ? HAL_OK : HAL_ENXIO;
863 }
864 return HAL_OK;
865 case HAL_CAP_PHYDIAG: /* radar pulse detection capability */
866 switch (capability) {
867 case HAL_CAP_RADAR:
870 case HAL_CAP_AR:
871 return (ath_hal_eepromGetFlag(ah, AR_EEP_GMODE) ||
874 }
875 return HAL_ENXIO;
876 case HAL_CAP_MCAST_KEYSRCH: /* multicast frame keycache search */
877 switch (capability) {
878 case 0: /* hardware capability */
879 return pCap->halMcastKeySrchSupport ? HAL_OK : HAL_ENXIO;
880 case 1:
881 return (ahp->ah_staId1Defaults &
883 }
884 return HAL_EINVAL;
885 case HAL_CAP_TSF_ADJUST: /* hardware has beacon tsf adjust */
886 switch (capability) {
887 case 0: /* hardware capability */
888 return pCap->halTsfAddSupport ? HAL_OK : HAL_ENOTSUPP;
889 case 1:
890 return (ahp->ah_miscMode & AR_MISC_MODE_TX_ADD_TSF) ?
892 }
893 return HAL_EINVAL;
894 case HAL_CAP_TPC_ACK:
895 *result = MS(ahp->ah_macTPC, AR_TPC_ACK);
896 return HAL_OK;
897 case HAL_CAP_TPC_CTS:
898 *result = MS(ahp->ah_macTPC, AR_TPC_CTS);
899 return HAL_OK;
900 case HAL_CAP_INTMIT: /* interference mitigation */
901 switch (capability) {
902 case HAL_CAP_INTMIT_PRESENT: /* hardware capability */
903 return HAL_OK;
905 return (ahp->ah_procPhyErr & HAL_ANI_ENA) ?
912 ani = ar5212AniGetCurrentState(ah);
913 if (ani == AH_NULL)
914 return HAL_ENXIO;
915 switch (capability) {
916 case 2: *result = ani->noiseImmunityLevel; break;
917 case 3: *result = !ani->ofdmWeakSigDetectOff; break;
918 case 4: *result = ani->cckWeakSigThreshold; break;
919 case 5: *result = ani->firstepLevel; break;
920 case 6: *result = ani->spurImmunityLevel; break;
921 }
922 return HAL_OK;
923 }
924 return HAL_EINVAL;
925 default:
926 return ath_hal_getcapability(ah, type, capability, result);
927 }
928#undef MACVERSION
929}
930
933 uint32_t capability, uint32_t setting, HAL_STATUS *status)
934{
935#define N(a) (sizeof(a)/sizeof(a[0]))
936 struct ath_hal_5212 *ahp = AH5212(ah);
937 const HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
938 uint32_t v;
939
940 switch (type) {
941 case HAL_CAP_TKIP_MIC: /* handle TKIP MIC in hardware */
942 if (setting)
944 else
945 ahp->ah_staId1Defaults &= ~AR_STA_ID1_CRPT_MIC_ENABLE;
946 return AH_TRUE;
947 case HAL_CAP_TKIP_SPLIT: /* hardware TKIP uses split keys */
948 if (!pCap->halTkipMicTxRxKeySupport)
949 return AH_FALSE;
950 /* NB: true =>'s use split key cache layout */
951 if (setting)
952 ahp->ah_miscMode &= ~AR_MISC_MODE_MIC_NEW_LOC_ENABLE;
953 else
955 /* NB: write here so keys can be setup w/o a reset */
957 return AH_TRUE;
959 switch (capability) {
960 case 0:
961 return AH_FALSE;
962 case 1: /* setting */
963 if (ahp->ah_phyPowerOn) {
964 if (capability == HAL_CAP_STRONG_DIV) {
966 if (setting)
968 else
969 v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV;
971 }
972 }
973 ahp->ah_diversity = (setting != 0);
974 return AH_TRUE;
975
977 if (! ahp->ah_phyPowerOn)
978 return AH_FALSE;
980 v &= ~AR_PHY_RESTART_DIV_GC;
981 v |= SM(setting, AR_PHY_RESTART_DIV_GC);
983 return AH_TRUE;
984 default:
985 return AH_FALSE;
986 }
987 case HAL_CAP_DIAG: /* hardware diagnostic support */
988 /*
989 * NB: could split this up into virtual capabilities,
990 * (e.g. 1 => ACK, 2 => CTS, etc.) but it hardly
991 * seems worth the additional complexity.
992 */
993 AH_PRIVATE(ah)->ah_diagreg = setting;
994 OS_REG_WRITE(ah, AR_DIAG_SW, AH_PRIVATE(ah)->ah_diagreg);
995 return AH_TRUE;
996 case HAL_CAP_TPC:
997 ahp->ah_tpcEnabled = (setting != 0);
998 return AH_TRUE;
999 case HAL_CAP_MCAST_KEYSRCH: /* multicast frame keycache search */
1000 if (setting)
1002 else
1003 ahp->ah_staId1Defaults &= ~AR_STA_ID1_MCAST_KSRCH;
1004 return AH_TRUE;
1005 case HAL_CAP_TPC_ACK:
1006 case HAL_CAP_TPC_CTS:
1007 setting += ahp->ah_txPowerIndexOffset;
1008 if (setting > 63)
1009 setting = 63;
1010 if (type == HAL_CAP_TPC_ACK) {
1011 ahp->ah_macTPC &= AR_TPC_ACK;
1012 ahp->ah_macTPC |= MS(setting, AR_TPC_ACK);
1013 } else {
1014 ahp->ah_macTPC &= AR_TPC_CTS;
1015 ahp->ah_macTPC |= MS(setting, AR_TPC_CTS);
1016 }
1017 OS_REG_WRITE(ah, AR_TPC, ahp->ah_macTPC);
1018 return AH_TRUE;
1019 case HAL_CAP_INTMIT: { /* interference mitigation */
1020 /* This maps the public ANI commands to the internal ANI commands */
1021 /* Private: HAL_ANI_CMD; Public: HAL_CAP_INTMIT_CMD */
1022 static const HAL_ANI_CMD cmds[] = {
1030 };
1031 return capability < N(cmds) ?
1032 AH5212(ah)->ah_aniControl(ah, cmds[capability], setting) :
1033 AH_FALSE;
1034 }
1035 case HAL_CAP_TSF_ADJUST: /* hardware has beacon tsf adjust */
1036 if (pCap->halTsfAddSupport) {
1037 if (setting)
1039 else
1040 ahp->ah_miscMode &= ~AR_MISC_MODE_TX_ADD_TSF;
1041 return AH_TRUE;
1042 }
1043 /* fall thru... */
1044 default:
1045 return ath_hal_setcapability(ah, type, capability,
1046 setting, status);
1047 }
1048#undef N
1049}
1050
1052ar5212GetDiagState(struct ath_hal *ah, int request,
1053 const void *args, uint32_t argsize,
1054 void **result, uint32_t *resultsize)
1055{
1056 struct ath_hal_5212 *ahp = AH5212(ah);
1057 HAL_ANI_STATS *astats;
1058
1059 (void) ahp;
1060 if (ath_hal_getdiagstate(ah, request, args, argsize, result, resultsize))
1061 return AH_TRUE;
1062 switch (request) {
1063 case HAL_DIAG_EEPROM:
1067 case HAL_DIAG_RFGAIN:
1068 return ath_hal_eepromDiag(ah, request,
1069 args, argsize, result, resultsize);
1071 *result = __DECONST(void *, ahp->ah_gainValues.currStep);
1072 *resultsize = (*result == AH_NULL) ?
1073 0 : sizeof(GAIN_OPTIMIZATION_STEP);
1074 return AH_TRUE;
1075 case HAL_DIAG_PCDAC:
1076 *result = ahp->ah_pcdacTable;
1077 *resultsize = ahp->ah_pcdacTableSize;
1078 return AH_TRUE;
1079 case HAL_DIAG_TXRATES:
1080 *result = &ahp->ah_ratesArray[0];
1081 *resultsize = sizeof(ahp->ah_ratesArray);
1082 return AH_TRUE;
1084 *result = ar5212AniGetCurrentState(ah);
1085 *resultsize = (*result == AH_NULL) ?
1086 0 : sizeof(struct ar5212AniState);
1087 return AH_TRUE;
1088 case HAL_DIAG_ANI_STATS:
1089 OS_MEMZERO(&ahp->ext_ani_stats, sizeof(ahp->ext_ani_stats));
1090 astats = ar5212AniGetCurrentStats(ah);
1091 if (astats == NULL) {
1092 *result = NULL;
1093 *resultsize = 0;
1094 } else {
1095 OS_MEMCPY(&ahp->ext_ani_stats, astats, sizeof(HAL_ANI_STATS));
1096 *result = &ahp->ext_ani_stats;
1097 *resultsize = sizeof(ahp->ext_ani_stats);
1098 }
1099 return AH_TRUE;
1100 case HAL_DIAG_ANI_CMD:
1101 if (argsize != 2*sizeof(uint32_t))
1102 return AH_FALSE;
1103 AH5212(ah)->ah_aniControl(ah, ((const uint32_t *)args)[0],
1104 ((const uint32_t *)args)[1]);
1105 return AH_TRUE;
1107 /*
1108 * NB: We assume struct ar5212AniParams is identical
1109 * to HAL_ANI_PARAMS; if they diverge then we'll need
1110 * to handle it here
1111 */
1112 if (argsize == 0 && args == AH_NULL) {
1113 struct ar5212AniState *aniState =
1115 if (aniState == AH_NULL)
1116 return AH_FALSE;
1117 *result = __DECONST(void *, aniState->params);
1118 *resultsize = sizeof(struct ar5212AniParams);
1119 return AH_TRUE;
1120 } else {
1121 if (argsize != sizeof(struct ar5212AniParams))
1122 return AH_FALSE;
1123 return ar5212AniSetParams(ah, args, args);
1124 }
1125 break;
1126 }
1127 return AH_FALSE;
1128}
1129
1130/*
1131 * Check whether there's an in-progress NF completion.
1132 *
1133 * Returns AH_TRUE if there's a in-progress NF calibration, AH_FALSE
1134 * otherwise.
1135 */
1138{
1140 return AH_TRUE;
1141 return AH_FALSE;
1142}
1143
1144/*
1145 * Wait for an in-progress NF calibration to complete.
1146 *
1147 * The completion function waits "i" times 10uS.
1148 * It returns AH_TRUE if the NF calibration completed (or was never
1149 * in progress); AH_FALSE if it was still in progress after "i" checks.
1150 */
1153{
1154 int j;
1155 if (i <= 0)
1156 i = 1; /* it should run at least once */
1157 for (j = 0; j < i; j++) {
1158 if (! ar5212IsNFCalInProgress(ah))
1159 return AH_TRUE;
1160 OS_DELAY(10);
1161 }
1162 return AH_FALSE;
1163}
1164
1165void
1167{
1168 uint32_t val;
1169 val = OS_REG_READ(ah, AR_PHY_RADAR_0);
1170
1171 if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) {
1172 val &= ~AR_PHY_RADAR_0_FIRPWR;
1173 val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR);
1174 }
1175 if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) {
1176 val &= ~AR_PHY_RADAR_0_RRSSI;
1177 val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI);
1178 }
1179 if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) {
1180 val &= ~AR_PHY_RADAR_0_HEIGHT;
1181 val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT);
1182 }
1183 if (pe->pe_prssi != HAL_PHYERR_PARAM_NOVAL) {
1184 val &= ~AR_PHY_RADAR_0_PRSSI;
1185 val |= SM(pe->pe_prssi, AR_PHY_RADAR_0_PRSSI);
1186 }
1187 if (pe->pe_inband != HAL_PHYERR_PARAM_NOVAL) {
1188 val &= ~AR_PHY_RADAR_0_INBAND;
1189 val |= SM(pe->pe_inband, AR_PHY_RADAR_0_INBAND);
1190 }
1191 if (pe->pe_enabled)
1192 val |= AR_PHY_RADAR_0_ENA;
1193 else
1194 val &= ~ AR_PHY_RADAR_0_ENA;
1195
1196 if (IS_5413(ah)) {
1197 if (pe->pe_blockradar == 1)
1200 else
1203
1204 if (pe->pe_en_relstep_check == 1)
1207 else
1210
1211 if (pe->pe_usefir128 == 1)
1214 else
1217
1218 if (pe->pe_enmaxrssi == 1)
1221 else
1224
1225 if (pe->pe_enrelpwr == 1)
1228 else
1231
1235
1239
1243 }
1244
1245 OS_REG_WRITE(ah, AR_PHY_RADAR_0, val);
1246}
1247
1248/*
1249 * Parameters for the AR5212 PHY.
1250 */
1251#define AR5212_DFS_FIRPWR -35
1252#define AR5212_DFS_RRSSI 20
1253#define AR5212_DFS_HEIGHT 14
1254#define AR5212_DFS_PRSSI 6
1255#define AR5212_DFS_INBAND 4
1256
1257/*
1258 * Default parameters for the AR5413 PHY.
1259 */
1260#define AR5413_DFS_FIRPWR -34
1261#define AR5413_DFS_RRSSI 20
1262#define AR5413_DFS_HEIGHT 10
1263#define AR5413_DFS_PRSSI 15
1264#define AR5413_DFS_INBAND 6
1265#define AR5413_DFS_RELPWR 8
1266#define AR5413_DFS_RELSTEP 31
1267#define AR5413_DFS_MAXLEN 255
1268
1271{
1272
1273 if (IS_5413(ah)) {
1282 pe->pe_usefir128 = 0;
1283 pe->pe_blockradar = 1;
1284 pe->pe_enmaxrssi = 1;
1285 pe->pe_enrelpwr = 1;
1286 pe->pe_en_relstep_check = 0;
1287 } else {
1293 pe->pe_relpwr = 0;
1294 pe->pe_relstep = 0;
1295 pe->pe_maxlen = 0;
1296 pe->pe_usefir128 = 0;
1297 pe->pe_blockradar = 0;
1298 pe->pe_enmaxrssi = 0;
1299 pe->pe_enrelpwr = 0;
1300 pe->pe_en_relstep_check = 0;
1301 }
1302
1303 return (AH_TRUE);
1304}
1305
1306void
1308{
1309 uint32_t val,temp;
1310
1311 val = OS_REG_READ(ah, AR_PHY_RADAR_0);
1312
1313 temp = MS(val,AR_PHY_RADAR_0_FIRPWR);
1314 temp |= 0xFFFFFF80;
1315 pe->pe_firpwr = temp;
1316 pe->pe_rrssi = MS(val, AR_PHY_RADAR_0_RRSSI);
1318 pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI);
1320 pe->pe_enabled = !! (val & AR_PHY_RADAR_0_ENA);
1321
1322 pe->pe_relpwr = 0;
1323 pe->pe_relstep = 0;
1324 pe->pe_maxlen = 0;
1325 pe->pe_usefir128 = 0;
1326 pe->pe_blockradar = 0;
1327 pe->pe_enmaxrssi = 0;
1328 pe->pe_enrelpwr = 0;
1329 pe->pe_en_relstep_check = 0;
1330 pe->pe_extchannel = AH_FALSE;
1331
1332 if (IS_5413(ah)) {
1333 val = OS_REG_READ(ah, AR_PHY_RADAR_2);
1334 pe->pe_relpwr = !! MS(val, AR_PHY_RADAR_2_RELPWR);
1335 pe->pe_relstep = !! MS(val, AR_PHY_RADAR_2_RELSTEP);
1336 pe->pe_maxlen = !! MS(val, AR_PHY_RADAR_2_MAXLEN);
1337
1338 pe->pe_usefir128 = !! (val & AR_PHY_RADAR_2_USEFIR128);
1340 pe->pe_enmaxrssi = !! (val & AR_PHY_RADAR_2_ENMAXRSSI);
1341 pe->pe_enrelpwr = !! (val & AR_PHY_RADAR_2_ENRELPWRCHK);
1343 !! (val & AR_PHY_RADAR_2_ENRELSTEPCHK);
1344 }
1345}
1346
1347/*
1348 * Process the radar phy error and extract the pulse duration.
1349 */
1352 uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
1353{
1354 uint8_t dur;
1355 uint8_t rssi;
1356
1357 /* Check whether the given phy error is a radar event */
1358 if ((rxs->rs_phyerr != HAL_PHYERR_RADAR) &&
1360 return AH_FALSE;
1361
1362 /*
1363 * The first byte is the pulse width - if there's
1364 * no data, simply set the duration to 0
1365 */
1366 if (rxs->rs_datalen >= 1)
1367 /* The pulse width is byte 0 of the data */
1368 dur = ((uint8_t) buf[0]) & 0xff;
1369 else
1370 dur = 0;
1371
1372 /* Pulse RSSI is the normal reported RSSI */
1373 rssi = (uint8_t) rxs->rs_rssi;
1374
1375 /* 0 duration/rssi is not a valid radar event */
1376 if (dur == 0 && rssi == 0)
1377 return AH_FALSE;
1378
1379 HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, dur=%d\n",
1380 __func__, rssi, dur);
1381
1382 /* Record the event */
1383 event->re_full_ts = fulltsf;
1384 event->re_ts = rxs->rs_tstamp;
1385 event->re_rssi = rssi;
1386 event->re_dur = dur;
1387 event->re_flags = HAL_DFS_EVENT_PRICH;
1388
1389 return AH_TRUE;
1390}
1391
1392/*
1393 * Return whether 5GHz fast-clock (44MHz) is enabled.
1394 * It's always disabled for AR5212 series NICs.
1395 */
1398{
1399 return AH_FALSE;
1400}
1401
1402/*
1403 * Return what percentage of the extension channel is busy.
1404 * This is always disabled for AR5212 series NICs.
1405 */
1406uint32_t
1408{
1409 return 0;
1410}
1411
1412/*
1413 * Channel survey support.
1414 */
1417{
1418 struct ath_hal_5212 *ahp = AH5212(ah);
1419 u_int32_t good = AH_TRUE;
1420
1421 /* XXX freeze/unfreeze mib counters */
1422 uint32_t rc = OS_REG_READ(ah, AR_RCCNT);
1423 uint32_t rf = OS_REG_READ(ah, AR_RFCNT);
1424 uint32_t tf = OS_REG_READ(ah, AR_TFCNT);
1425 uint32_t cc = OS_REG_READ(ah, AR_CCCNT); /* read cycles last */
1426
1427 if (ahp->ah_cycleCount == 0 || ahp->ah_cycleCount > cc) {
1428 /*
1429 * Cycle counter wrap (or initial call); it's not possible
1430 * to accurately calculate a value because the registers
1431 * right shift rather than wrap--so punt and return 0.
1432 */
1434 "%s: cycle counter wrap. ExtBusy = 0\n", __func__);
1435 good = AH_FALSE;
1436 } else {
1437 hsample->cycle_count = cc - ahp->ah_cycleCount;
1438 hsample->chan_busy = rc - ahp->ah_ctlBusy;
1439 hsample->ext_chan_busy = 0;
1440 hsample->rx_busy = rf - ahp->ah_rxBusy;
1441 hsample->tx_busy = tf - ahp->ah_txBusy;
1442 }
1443
1444 /*
1445 * Keep a copy of the MIB results so the next sample has something
1446 * to work from.
1447 */
1448 ahp->ah_cycleCount = cc;
1449 ahp->ah_rxBusy = rf;
1450 ahp->ah_ctlBusy = rc;
1451 ahp->ah_txBusy = tf;
1452
1453 return (good);
1454}
1455
1456void
1457ar5212SetChainMasks(struct ath_hal *ah, uint32_t tx_chainmask,
1458 uint32_t rx_chainmask)
1459{
1460}
1461
1462/*
1463 * Get the current NAV value from the hardware.
1464 *
1465 * 0xdeadbeef indicates the hardware is currently powered off.
1466 */
1467u_int
1469{
1470 uint32_t reg;
1471
1472 reg = OS_REG_READ(ah, AR_NAV);
1473
1474 if (reg == 0xdeadbeef)
1475 return (0);
1476 return (reg);
1477}
1478
1479/*
1480 * Set the current NAV value to the hardware.
1481 */
1482void
1483ar5212SetNav(struct ath_hal *ah, u_int val)
1484{
1485
1486 OS_REG_WRITE(ah, AR_NAV, val);
1487}
u_int ath_hal_mac_clks(struct ath_hal *ah, u_int usecs)
Definition: ah.c:597
u_int ath_hal_mac_usec(struct ath_hal *ah, u_int clks)
Definition: ah.c:625
HAL_STATUS
Definition: ah.h:71
@ HAL_EIO
Definition: ah.h:75
@ HAL_ENOTSUPP
Definition: ah.h:85
@ HAL_EEWRITE
Definition: ah.h:83
@ HAL_ENXIO
Definition: ah.h:73
@ HAL_OK
Definition: ah.h:72
@ HAL_EINVAL
Definition: ah.h:84
@ HAL_MODE_11A_HALF_RATE
Definition: ah.h:668
@ HAL_MODE_11G_QUARTER_RATE
Definition: ah.h:671
@ HAL_MODE_108G
Definition: ah.h:666
@ HAL_MODE_11A_QUARTER_RATE
Definition: ah.h:669
@ HAL_MODE_11G_HALF_RATE
Definition: ah.h:670
@ HAL_MODE_TURBO
Definition: ah.h:658
@ HAL_MODE_11G
Definition: ah.h:664
@ HAL_MODE_108A
Definition: ah.h:667
@ HAL_MODE_11A
Definition: ah.h:657
@ HAL_MODE_11B
Definition: ah.h:659
#define HAL_PHYERR_PARAM_NOVAL
Definition: ah.h:1027
HAL_OPMODE
Definition: ah.h:764
@ HAL_M_HOSTAP
Definition: ah.h:767
HAL_CAPABILITY_TYPE
Definition: ah.h:98
@ HAL_CAP_WME_TKIPMIC
Definition: ah.h:120
@ HAL_CAP_DIVERSITY
Definition: ah.h:104
@ HAL_CAP_TPC_ACK
Definition: ah.h:124
@ HAL_CAP_TKIP_SPLIT
Definition: ah.h:102
@ HAL_CAP_CIPHER
Definition: ah.h:100
@ HAL_CAP_TPC
Definition: ah.h:114
@ HAL_CAP_INTMIT
Definition: ah.h:204
@ HAL_CAP_TPC_CTS
Definition: ah.h:125
@ HAL_CAP_TKIP_MIC
Definition: ah.h:101
@ HAL_CAP_DIAG
Definition: ah.h:109
@ HAL_CAP_MCAST_KEYSRCH
Definition: ah.h:117
@ HAL_CAP_PHYDIAG
Definition: ah.h:115
@ HAL_CAP_TSF_ADJUST
Definition: ah.h:118
#define HAL_DFS_EVENT_PRICH
Definition: ah.h:1097
@ HAL_CIPHER_CLR
Definition: ah.h:810
@ HAL_CIPHER_AES_CCM
Definition: ah.h:807
@ HAL_CIPHER_MIC
Definition: ah.h:812
@ HAL_CIPHER_TKIP
Definition: ah.h:809
@ HAL_CIPHER_WEP
Definition: ah.h:805
@ HAL_CIPHER_AES_OCB
Definition: ah.h:806
HAL_ANT_SETTING
Definition: ah.h:758
@ HAL_ANT_VARIABLE
Definition: ah.h:759
HAL_ANI_CMD
Definition: ah.h:970
@ HAL_ANI_FIRSTEP_LEVEL
Definition: ah.h:975
@ HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION
Definition: ah.h:973
@ HAL_ANI_PRESENT
Definition: ah.h:971
@ HAL_ANI_MODE
Definition: ah.h:977
@ HAL_ANI_NOISE_IMMUNITY_LEVEL
Definition: ah.h:972
@ HAL_ANI_SPUR_IMMUNITY_LEVEL
Definition: ah.h:976
@ HAL_ANI_CCK_WEAK_SIGNAL_THR
Definition: ah.h:974
HAL_QUIET_FLAG
Definition: ah.h:1090
@ HAL_QUIET_ENABLE
Definition: ah.h:1092
@ HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL
Definition: ah.h:997
@ HAL_CAP_INTMIT_FIRSTEP_LEVEL
Definition: ah.h:996
@ HAL_CAP_INTMIT_CCK_WEAK_SIGNAL_THR
Definition: ah.h:995
@ HAL_CAP_INTMIT_OFDM_WEAK_SIGNAL_LEVEL
Definition: ah.h:994
@ HAL_CAP_INTMIT_ENABLE
Definition: ah.h:992
@ HAL_CAP_INTMIT_PRESENT
Definition: ah.h:991
@ HAL_CAP_INTMIT_NOISE_IMMUNITY_LEVEL
Definition: ah.h:993
HAL_BOOL
Definition: ah.h:93
@ AH_FALSE
Definition: ah.h:94
@ AH_TRUE
Definition: ah.h:95
HAL_LED_STATE
Definition: ah.h:227
@ HAL_DEBUG_ANY
Definition: ah_debug.h:62
@ HAL_DEBUG_DFS
Definition: ah_debug.h:50
@ HAL_PHYERR_RADAR
Definition: ah_desc.h:185
@ HAL_PHYERR_FALSE_RADAR_EXT
Definition: ah_desc.h:196
#define AR_SUBVENDOR_ID_NOG
Definition: ah_devid.h:101
@ HAL_DIAG_EEPROM_EXP_11G
Definition: ah_diagcodes.h:44
@ HAL_DIAG_ANI_STATS
Definition: ah_diagcodes.h:48
@ HAL_DIAG_EEPROM_EXP_11B
Definition: ah_diagcodes.h:43
@ HAL_DIAG_PCDAC
Definition: ah_diagcodes.h:51
@ HAL_DIAG_EEPROM
Definition: ah_diagcodes.h:41
@ HAL_DIAG_RFGAIN
Definition: ah_diagcodes.h:49
@ HAL_DIAG_ANI_CMD
Definition: ah_diagcodes.h:54
@ HAL_DIAG_ANI_PARAMS
Definition: ah_diagcodes.h:64
@ HAL_DIAG_ANI_CURRENT
Definition: ah_diagcodes.h:45
@ HAL_DIAG_EEPROM_EXP_11A
Definition: ah_diagcodes.h:42
@ HAL_DIAG_RFGAIN_CURSTEP
Definition: ah_diagcodes.h:50
@ HAL_DIAG_TXRATES
Definition: ah_diagcodes.h:52
@ AR_EEP_GMODE
Definition: ah_eeprom.h:72
@ AR_EEP_BMODE
Definition: ah_eeprom.h:71
@ AR_EEP_TURBO2DISABLE
Definition: ah_eeprom.h:74
@ AR_EEP_WRITEPROTECT
Definition: ah_eeprom.h:104
@ AR_EEP_32KHZCRYSTAL
Definition: ah_eeprom.h:76
@ AR_EEP_TURBO5DISABLE
Definition: ah_eeprom.h:73
@ AR_EEP_AMODE
Definition: ah_eeprom.h:70
#define AR_EEPROM_REG_DOMAIN
Definition: ah_eeprom_v1.h:48
#define AR_EEPROM_RFSILENT_GPIO_SEL
Definition: ah_eeprom_v1.h:64
#define AR_EEPROM_RFSILENT_POLARITY
Definition: ah_eeprom_v1.h:66
#define LE_READ_4(p)
Definition: ah_internal.h:577
#define OS_REG_SET_BIT(_a, _r, _f)
Definition: ah_internal.h:594
#define LE_READ_2(p)
Definition: ah_internal.h:574
#define SM(_v, _f)
Definition: ah_internal.h:587
#define HAL_CAP_STRONG_DIV
Definition: ah_internal.h:82
#define MS(_v, _f)
Definition: ah_internal.h:588
#define IEEE80211_ADDR_LEN
Definition: ah_internal.h:501
#define OS_REG_CLR_BIT(_a, _r, _f)
Definition: ah_internal.h:596
#define AH_PRIVATE(_ah)
Definition: ah_internal.h:442
#define ath_hal_eepromWrite(_ah, _off, _data)
Definition: ah_internal.h:450
@ HAL_CAP_RADAR
Definition: ah_internal.h:75
@ HAL_CAP_AR
Definition: ah_internal.h:76
#define OS_REG_RMW_FIELD(_a, _r, _f, _v)
Definition: ah_internal.h:591
#define AH_NULL
Definition: ah_internal.h:28
#define ath_hal_eepromDiag(_ah, _request, _a, _asize, _r, _rsize)
Definition: ah_internal.h:494
#define HALDEBUG(_ah, __m,...)
Definition: ah_internal.h:658
#define ath_hal_gpioCfgInput(_ah, _gpio)
Definition: ah_internal.h:454
#define ath_hal_eepromGetFlag(_ah, _param)
Definition: ah_internal.h:490
#define ath_hal_gpioGet(_ah, _gpio)
Definition: ah_internal.h:456
#define ath_hal_gpioSetIntr(_ah, _gpio, _ilevel)
Definition: ah_internal.h:460
#define OS_DELAY(_n)
Definition: ah_osdep.h:69
#define OS_MEMZERO(_a, _n)
Definition: ah_osdep.h:72
#define OS_REG_WRITE(_ah, _reg, _val)
Definition: ah_osdep.h:139
#define OS_MEMCPY(_d, _s, _n)
Definition: ah_osdep.h:73
#define OS_REG_READ(_ah, _reg)
Definition: ah_osdep.h:140
#define AR_PHY(_n)
Definition: ar5210phy.h:30
#define AR_MIBC_CMC
Definition: ar5210reg.h:232
#define AR_TIME_OUT
Definition: ar5210reg.h:75
#define AR_MIBC_MCS
Definition: ar5210reg.h:233
#define AR_BEACON
Definition: ar5210reg.h:79
#define AR_STA_ID1_ACKCTS_6MB
Definition: ar5210reg.h:312
#define AR_TIME_OUT_CTS
Definition: ar5210reg.h:322
#define AR_BEACON_CNT
Definition: ar5210reg.h:106
#define AR_NAV
Definition: ar5210reg.h:101
#define AR_STA_ID1
Definition: ar5210reg.h:71
#define AR_SREV
Definition: ar5210reg.h:63
#define AR_MIBC_FMC
Definition: ar5210reg.h:231
#define AR_TSF_U32
Definition: ar5210reg.h:97
#define AR_MIBC
Definition: ar5210reg.h:48
#define AR_BSS_ID0
Definition: ar5210reg.h:72
#define AR_PCICFG
Definition: ar5210reg.h:59
#define AR_MIBC_COW
Definition: ar5210reg.h:230
#define AR_RFCNT
Definition: ar5210reg.h:53
#define AR_FCS_FAIL
Definition: ar5210reg.h:105
#define AR_RTS_OK
Definition: ar5210reg.h:102
#define AR_BEACON_RESET_TSF
Definition: ar5210reg.h:353
#define AR_BSS_ID1
Definition: ar5210reg.h:73
#define AR_TSF_L32
Definition: ar5210reg.h:96
#define AR_TIME_OUT_ACK
Definition: ar5210reg.h:320
#define AR_RTS_FAIL
Definition: ar5210reg.h:103
#define AR_ACK_FAIL
Definition: ar5210reg.h:104
#define AR_BSS_ID1_AID_S
Definition: ar5210reg.h:318
#define AR_DIAG_SW
Definition: ar5210reg.h:95
#define AR_USEC
Definition: ar5210reg.h:78
#define AR_PHY_AGC_CONTROL_NF
Definition: ar5211phy.h:44
#define AR_PHY_RADAR_0
Definition: ar5211phy.h:81
#define AR_PHY_RADAR_0_ENA
Definition: ar5211phy.h:82
#define AR_PHY_CURRENT_RSSI
Definition: ar5211phy.h:87
#define AR_PHY_AGC_CONTROL
Definition: ar5211phy.h:42
#define AR_SREV_ID_S
Definition: ar5211reg.h:711
#define AR_PCICFG_LEDCTL_NONE
Definition: ar5211reg.h:651
#define AR_D_GBL_IFS_SLOT
Definition: ar5211reg.h:212
#define AR_PCICFG_LEDMODE
Definition: ar5211reg.h:661
#define AR_PCICFG_LEDCTL
Definition: ar5211reg.h:650
#define AR_DEF_ANTENNA
Definition: ar5211reg.h:262
#define AR_PCICFG_LEDCTL_PEND
Definition: ar5211reg.h:652
#define AR_D_GBL_IFS_SIFS
Definition: ar5211reg.h:211
#define AR_STA_ID1_BASE_RATE_11B
Definition: ar5211reg.h:770
#define AR_PCICFG_LEDCTL_ASSOC
Definition: ar5211reg.h:653
#define AR_D_GBL_IFS_EIFS
Definition: ar5211reg.h:213
HAL_BOOL ar5212AniSetParams(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *)
Definition: ar5212_ani.c:183
void ar5212SetOperatingMode(struct ath_hal *ah, int opmode)
Definition: ar5212_reset.c:804
#define IFS_EIFS_QUARTER_RATE
Definition: ar5212.h:64
#define HAL_DECOMP_MASK_SIZE
Definition: ar5212.h:80
HAL_ANI_STATS * ar5212AniGetCurrentStats(struct ath_hal *)
Definition: ar5212_ani.c:116
#define IS_5413(ah)
Definition: ar5212.h:374
#define HAL_ANI_ENA
Definition: ar5212.h:202
#define IS_HB63(ah)
Definition: ar5212.h:380
#define IFS_EIFS_HALF_RATE
Definition: ar5212.h:63
#define ACK_CTS_TIMEOUT_11A
Definition: ar5212.h:66
#define IS_2417(ah)
Definition: ar5212.h:378
#define IS_RAD5112_ANY(ah)
Definition: ar5212.h:393
HAL_BOOL ar5212SetAntennaSwitchInternal(struct ath_hal *ah, HAL_ANT_SETTING settings, const struct ieee80211_channel *)
#define AH5212(_ah)
Definition: ar5212.h:354
#define IFS_EIFS_FULL_RATE
Definition: ar5212.h:62
#define IFS_SLOT_QUARTER_RATE
Definition: ar5212.h:61
#define IFS_SLOT_FULL_RATE
Definition: ar5212.h:59
struct ar5212AniState * ar5212AniGetCurrentState(struct ath_hal *)
Definition: ar5212_ani.c:107
#define IFS_SLOT_HALF_RATE
Definition: ar5212.h:60
#define IS_2413(ah)
Definition: ar5212.h:368
HAL_BOOL ar5212SetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t setting, HAL_STATUS *status)
Definition: ar5212_misc.c:932
HAL_BOOL ar5212WaitNFCalComplete(struct ath_hal *ah, int i)
Definition: ar5212_misc.c:1152
#define AR5413_DFS_PRSSI
Definition: ar5212_misc.c:1263
HAL_BOOL ar5212SetAntennaSwitch(struct ath_hal *ah, HAL_ANT_SETTING setting)
Definition: ar5212_misc.c:429
HAL_BOOL ar5212SetSlotTime(struct ath_hal *ah, u_int us)
Definition: ar5212_misc.c:475
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
uint32_t ar5212GetTsf32(struct ath_hal *ah)
Definition: ar5212_misc.c:263
HAL_BOOL ar5212SetRegulatoryDomain(struct ath_hal *ah, uint16_t regDomain, HAL_STATUS *status)
Definition: ar5212_misc.c:79
void ar5212SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *rs)
Definition: ar5212_misc.c:301
HAL_BOOL ar5212GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5212_misc.c:1270
u_int ar5212GetSifsTime(struct ath_hal *ah)
Definition: ar5212_misc.c:468
u_int ar5212GetSlotTime(struct ath_hal *ah)
Definition: ar5212_misc.c:493
HAL_BOOL ar5212SetBssIdMask(struct ath_hal *ah, const uint8_t *mask)
Definition: ar5212_misc.c:63
HAL_STATUS ar5212GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t *result)
Definition: ar5212_misc.c:795
u_int ar5212GetAckCTSRate(struct ath_hal *ah)
Definition: ar5212_misc.c:526
#define AR5413_DFS_HEIGHT
Definition: ar5212_misc.c:1262
int16_t ar5212GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c)
Definition: ar5212_misc.c:769
void ar5212SetChainMasks(struct ath_hal *ah, uint32_t tx_chainmask, uint32_t rx_chainmask)
Definition: ar5212_misc.c:1457
HAL_BOOL ar5212SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en)
Definition: ar5212_misc.c:574
HAL_BOOL ar5212IsFastClockEnabled(struct ath_hal *ah)
Definition: ar5212_misc.c:1397
#define AR5212_DFS_RRSSI
Definition: ar5212_misc.c:1252
#define AR5413_DFS_MAXLEN
Definition: ar5212_misc.c:1267
#define AR5413_DFS_RELSTEP
Definition: ar5212_misc.c:1266
void ar5212EnableMibCounters(struct ath_hal *ah)
Definition: ar5212_misc.c:366
void ar5212UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS *stats)
Definition: ar5212_misc.c:383
HAL_ANT_SETTING ar5212GetAntennaSwitch(struct ath_hal *ah)
Definition: ar5212_misc.c:423
void ar5212SetTsf64(struct ath_hal *ah, uint64_t tsf64)
Definition: ar5212_misc.c:269
u_int ar5212GetNav(struct ath_hal *ah)
Definition: ar5212_misc.c:1468
u_int ar5212GetCTSTimeout(struct ath_hal *ah)
Definition: ar5212_misc.c:566
#define AR5212_DFS_FIRPWR
Definition: ar5212_misc.c:1251
uint32_t ar5212Get11nExtBusy(struct ath_hal *ah)
Definition: ar5212_misc.c:1407
#define AR5212_DFS_HEIGHT
Definition: ar5212_misc.c:1253
void ar5212SetLedState(struct ath_hal *ah, HAL_LED_STATE state)
Definition: ar5212_misc.c:177
HAL_BOOL ar5212SetAckTimeout(struct ath_hal *ah, u_int us)
Definition: ar5212_misc.c:500
HAL_BOOL ar5212SetCTSTimeout(struct ath_hal *ah, u_int us)
Definition: ar5212_misc.c:547
HAL_BOOL ar5212SetAckCTSRate(struct ath_hal *ah, u_int high)
Definition: ar5212_misc.c:532
HAL_BOOL ar5212IsNFCalInProgress(struct ath_hal *ah)
Definition: ar5212_misc.c:1137
HAL_BOOL ar5212GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
Definition: ar5212_misc.c:1416
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
#define AR5413_DFS_RELPWR
Definition: ar5212_misc.c:1265
#define AR5413_DFS_RRSSI
Definition: ar5212_misc.c:1261
void ar5212SetPCUConfig(struct ath_hal *ah)
Definition: ar5212_misc.c:653
void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5212_misc.c:1166
#define AR5212_DFS_INBAND
Definition: ar5212_misc.c:1255
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 ar5212SetSifsTime(struct ath_hal *ah, u_int us)
Definition: ar5212_misc.c:450
void ar5212EnableRfKill(struct ath_hal *ah)
Definition: ar5212_misc.c:149
void ar5212GetBssIdMask(struct ath_hal *ah, uint8_t *mask)
Definition: ar5212_misc.c:55
void ar5212GetMacAddress(struct ath_hal *ah, uint8_t *mac)
Definition: ar5212_misc.c:38
uint64_t ar5212GetTsf64(struct ath_hal *ah)
Definition: ar5212_misc.c:235
#define AR5212_DFS_PRSSI
Definition: ar5212_misc.c:1254
void ar5212ResetTsf(struct ath_hal *ah)
Definition: ar5212_misc.c:279
#define AR5413_DFS_FIRPWR
Definition: ar5212_misc.c:1260
void ar5212DisableMibCounters(struct ath_hal *ah)
Definition: ar5212_misc.c:374
HAL_BOOL ar5212SetMacAddress(struct ath_hal *ah, const uint8_t *mac)
Definition: ar5212_misc.c:46
void ar5212SetNav(struct ath_hal *ah, u_int val)
Definition: ar5212_misc.c:1483
HAL_BOOL ar5212DetectCardPresent(struct ath_hal *ah)
Definition: ar5212_misc.c:348
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
u_int ar5212GetAckTimeout(struct ath_hal *ah)
Definition: ar5212_misc.c:519
#define MACVERSION(ah)
#define N(a)
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
#define AR5413_DFS_INBAND
Definition: ar5212_misc.c:1264
void ar5212SetCoverageClass(struct ath_hal *ah, uint8_t coverageclass, int now)
Definition: ar5212_misc.c:589
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
#define AR_PHY_RADAR_0_INBAND
Definition: ar5212phy.h:214
#define AR_PHY_CCK_DETECT
Definition: ar5212phy.h:315
#define AR_PHY_RADAR_2_ENRELPWRCHK
Definition: ar5212phy.h:231
#define AR_PHY_SLEEP_CTR_CONTROL
Definition: ar5212phy.h:137
#define AR_PHY_RESTART_DIV_GC
Definition: ar5212phy.h:250
#define AR_PHY_RADAR_0_PRSSI
Definition: ar5212phy.h:216
#define AR_PHY_RADAR_0_HEIGHT
Definition: ar5212phy.h:218
#define AR_PHY_RADAR_0_RRSSI
Definition: ar5212phy.h:220
#define AR_PHY_RADAR_2_ENRELSTEPCHK
Definition: ar5212phy.h:227
#define AR_PHY_RADAR_2_RELSTEP
Definition: ar5212phy.h:234
#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV
Definition: ar5212phy.h:318
#define AR_PHY_SLEEP_CTR_LIMIT
Definition: ar5212phy.h:138
#define AR_PHY_RADAR_2_USEFIR128
Definition: ar5212phy.h:230
#define AR_PHY_REFCLKPD
Definition: ar5212phy.h:285
#define AR_PHY_M_SLEEP
Definition: ar5212phy.h:283
#define AR_PHY_SLEEP_SCAL
Definition: ar5212phy.h:139
#define AR_PHY_RADAR_2_RELPWR
Definition: ar5212phy.h:236
#define AR_PHY_RESTART
Definition: ar5212phy.h:249
#define AR_PHY_RADAR_2_MAXLEN
Definition: ar5212phy.h:232
#define AR_PHY_REFCLKDLY
Definition: ar5212phy.h:284
#define AR_PHY_RADAR_0_FIRPWR
Definition: ar5212phy.h:222
#define AR_PHY_RADAR_2_ENMAXRSSI
Definition: ar5212phy.h:228
#define AR_PHY_RADAR_2_BLOCKOFDMWEAK
Definition: ar5212phy.h:229
#define AR_PHY_RADAR_2
Definition: ar5212phy.h:226
#define AR_MISC_MODE_TX_ADD_TSF
Definition: ar5212reg.h:965
#define AR_QUIET2
Definition: ar5212reg.h:309
#define AR_QUIET1
Definition: ar5212reg.h:302
#define AR_PCICFG_LEDMODE_NETON
Definition: ar5212reg.h:735
#define AR_PCICFG_LEDMODE_POWON
Definition: ar5212reg.h:734
#define AR_TPC
Definition: ar5212reg.h:296
#define AR_PCICFG_SCLK_RATE_IND
Definition: ar5212reg.h:741
#define AR_RCCNT
Definition: ar5212reg.h:299
#define AR_STA_ID1_MCAST_KSRCH
Definition: ar5212reg.h:860
#define AR_TFCNT
Definition: ar5212reg.h:297
#define AR_SREV_ID
Definition: ar5212reg.h:758
#define AR_TPC_ACK
Definition: ar5212reg.h:939
#define AR_STA_ID1_CRPT_MIC_ENABLE
Definition: ar5212reg.h:856
#define AR_TSF_PARM
Definition: ar5212reg.h:315
#define AR_SREV_REVISION
Definition: ar5212reg.h:760
#define AR_MISC_MODE_MIC_NEW_LOC_ENABLE
Definition: ar5212reg.h:964
#define AR_MISC_MODE
Definition: ar5212reg.h:321
#define AR_USEC_USEC32
Definition: ar5212reg.h:879
#define AR_DCM_A
Definition: ar5212reg.h:75
#define AR_PCICFG_SCLK_SEL
Definition: ar5212reg.h:706
#define AR_SREV_VERSION_VENICE
Definition: ar5212reg.h:779
#define AR_QUIET2_QUIET_DUR_S
Definition: ar5212reg.h:312
#define AR_BSSMSKU
Definition: ar5212reg.h:295
#define AR_DCM_D_EN
Definition: ar5212reg.h:990
#define AR_BSSMSKL
Definition: ar5212reg.h:294
#define AR_TPC_CTS
Definition: ar5212reg.h:941
#define AR_DCM_D
Definition: ar5212reg.h:76
#define AR_CCCNT
Definition: ar5212reg.h:300
#define ath_hal_setcapability(_ah, _cap, _param, _v, _status)
Definition: if_athvar.h:1210
#define ath_hal_getcapability(_ah, _cap, _param, _result)
Definition: if_athvar.h:1208
#define ath_hal_getdiagstate(_ah, _id, _indata, _insize, _outdata, _outsize)
Definition: if_athvar.h:1165
const GAIN_OPTIMIZATION_STEP * currStep
Definition: ar5211.h:92
uint32_t halCipherAesCcmSupport
Definition: ah_internal.h:235
uint32_t halMcastKeySrchSupport
Definition: ah_internal.h:241
uint32_t halTsfAddSupport
Definition: ah_internal.h:242
uint32_t halTkipMicTxRxKeySupport
Definition: ah_internal.h:234
uint32_t ackrcv_bad
Definition: ah.h:637
uint32_t beacons
Definition: ah.h:641
uint32_t fcs_bad
Definition: ah.h:640
uint32_t rts_bad
Definition: ah.h:638
uint32_t rts_good
Definition: ah.h:639
int32_t pe_extchannel
Definition: ah.h:1021
int32_t pe_en_relstep_check
Definition: ah.h:1024
u_int32_t pe_relpwr
Definition: ah.h:1008
int32_t pe_height
Definition: ah.h:1003
int32_t pe_blockradar
Definition: ah.h:1012
int32_t pe_usefir128
Definition: ah.h:1011
u_int32_t pe_maxlen
Definition: ah.h:1010
u_int32_t pe_relstep
Definition: ah.h:1009
int32_t pe_enrelpwr
Definition: ah.h:1023
int32_t pe_enmaxrssi
Definition: ah.h:1017
int32_t pe_prssi
Definition: ah.h:1004
int32_t pe_firpwr
Definition: ah.h:1001
int32_t pe_rrssi
Definition: ah.h:1002
int32_t pe_inband
Definition: ah.h:1005
int32_t pe_enabled
Definition: ah.h:1022
u_int rs_count
Definition: ah.h:701
uint8_t rs_rates[64]
Definition: ah.h:702
uint32_t rx_busy
Definition: ah.h:940
uint32_t ext_chan_busy
Definition: ah.h:942
uint32_t tx_busy
Definition: ah.h:939
uint32_t cycle_count
Definition: ah.h:943
uint32_t chan_busy
Definition: ah.h:941
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
uint8_t cckWeakSigThreshold
Definition: ar5212.h:188
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
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
int16_t ah_txPowerIndexOffset
Definition: ar5212.h:301
uint32_t ah_ctlBusy
Definition: ar5212.h:345
@ AUTO_32KHZ
Definition: ar5212.h:296
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
HAL_BOOL ah_phyPowerOn
Definition: ar5212.h:291
uint32_t ah_staId1Defaults
Definition: ar5212.h:286
uint8_t ah_macaddr[IEEE80211_ADDR_LEN]
Definition: ar5212.h:256
uint16_t * ah_pcdacTable
Definition: ar5212.h:334
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
HAL_ANI_STATS ext_ani_stats
Definition: ar5212.h:352
uint8_t ah_decompMask[HAL_DECOMP_MASK_SIZE]
Definition: ar5212.h:276
u_int ah_sifstime
Definition: ar5212.h:310
uint16_t ah_assocId
Definition: ar5212.h:259
uint32_t ah_rxBusy
Definition: ar5212.h:346
Definition: ah.h:1219
uint16_t rs_datalen
Definition: ah_desc.h:100
uint8_t rs_phyerr
Definition: ah_desc.h:102
int8_t rs_rssi
Definition: ah_desc.h:103
uint32_t rs_tstamp
Definition: ah_desc.h:107