FreeBSD kernel ATH device code
ar5416_attach.c
Go to the documentation of this file.
1/*-
2 * SPDX-License-Identifier: ISC
3 *
4 * Copyright (c) 2002-2008 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
27#include "ah_eeprom_v14.h"
28
29#include "ar5416/ar5416.h"
30#include "ar5416/ar5416reg.h"
31#include "ar5416/ar5416phy.h"
32
33#include "ar5416/ar5416.ini"
34
35static void ar5416ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore,
36 HAL_BOOL power_off);
37static void ar5416DisablePCIE(struct ath_hal *ah);
38static void ar5416WriteIni(struct ath_hal *ah,
39 const struct ieee80211_channel *chan);
40static void ar5416SpurMitigate(struct ath_hal *ah,
41 const struct ieee80211_channel *chan);
42
43static void
45{
46 static const struct ar5212AniParams aniparams = {
47 .maxNoiseImmunityLevel = 4, /* levels 0..4 */
48 .totalSizeDesired = { -55, -55, -55, -55, -62 },
49 .coarseHigh = { -14, -14, -14, -14, -12 },
50 .coarseLow = { -64, -64, -64, -64, -70 },
51 .firpwr = { -78, -78, -78, -78, -80 },
52 .maxSpurImmunityLevel = 7,
53 .cycPwrThr1 = { 2, 4, 6, 8, 10, 12, 14, 16 },
54 .maxFirstepLevel = 2, /* levels 0..2 */
55 .firstep = { 0, 4, 8 },
56 .ofdmTrigHigh = 500,
57 .ofdmTrigLow = 200,
58 .cckTrigHigh = 200,
59 .cckTrigLow = 100,
60 .rssiThrHigh = 40,
61 .rssiThrLow = 7,
62 .period = 100,
63 };
64 /* NB: disable ANI noise immmunity for reliable RIFS rx */
65 AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL);
66 ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE);
67}
68
69/*
70 * AR5416 doesn't do OLC or temperature compensation.
71 */
72static void
74{
75}
76
77static void
79{
80}
81
82/*
83 * Attach for an AR5416 part.
84 */
85void
86ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
88{
89 struct ath_hal_5212 *ahp;
90 struct ath_hal *ah;
91
92 ahp = &ahp5416->ah_5212;
93 ar5212InitState(ahp, devid, sc, st, sh, status);
94 ah = &ahp->ah_priv.h;
95
96 /* override 5212 methods for our needs */
100
101 /* Reset functions */
102 ah->ah_reset = ar5416Reset;
113
114 /* Transmit functions */
123
124 /* Receive Functions */
135
136 /* Misc Functions */
156
159
160 /* DFS Functions */
166
167 /* Spectral Scan Functions */
174
175 /* Power Management Functions */
177
178 /* Beacon Management Functions */
184
185 /* 802.11n Functions */
200
201 /* Interrupt functions */
205
206 /* Bluetooth Coexistence functions */
215 AH5416(ah)->ah_btCoexSetDiversity = ar5416BTCoexAntennaDiversity;
216
219#ifdef AH_SUPPORT_WRITE_EEPROM
221#endif
223
224 /* Internal ops */
225 AH5416(ah)->ah_writeIni = ar5416WriteIni;
226 AH5416(ah)->ah_spurMitigate = ar5416SpurMitigate;
227
228 /* Internal baseband ops */
229 AH5416(ah)->ah_initPLL = ar5416InitPLL;
230
231 /* Internal calibration ops */
232 AH5416(ah)->ah_cal_initcal = ar5416InitCalHardware;
233
234 /* Internal TX power control related operations */
235 AH5416(ah)->ah_olcInit = ar5416olcInit;
236 AH5416(ah)->ah_olcTempCompensation = ar5416olcTempCompensation;
237 AH5416(ah)->ah_setPowerCalTable = ar5416SetPowerCalTable;
238
239 /*
240 * Start by setting all Owl devices to 2x2
241 */
242 AH5416(ah)->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK;
243 AH5416(ah)->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK;
244
245 /* Enable all ANI functions to begin with */
246 AH5416(ah)->ah_ani_function = 0xffffffff;
247
248 /* Set overridable ANI methods */
249 AH5212(ah)->ah_aniControl = ar5416AniControl;
250
251 /*
252 * Default FIFO Trigger levels
253 *
254 * These define how filled the TX FIFO needs to be before
255 * the baseband begins to be given some data.
256 *
257 * To be paranoid, we ensure that the TX trigger level always
258 * has at least enough space for two TX DMA to occur.
259 * The TX DMA size is currently hard-coded to AR_TXCFG_DMASZ_128B.
260 * That means we need to leave at least 256 bytes available in
261 * the TX DMA FIFO.
262 */
263#define AR_FTRIG_512B 0x00000080 // 5 bits total
264 /*
265 * AR9285/AR9271 have half the size TX FIFO compared to
266 * other devices
267 */
268 if (AR_SREV_KITE(ah) || AR_SREV_9271(ah)) {
269 AH5212(ah)->ah_txTrigLev = (AR_FTRIG_256B >> AR_FTRIG_S);
270 AH5212(ah)->ah_maxTxTrigLev = ((2048 / 64) - 1);
271 } else {
272 AH5212(ah)->ah_txTrigLev = (AR_FTRIG_512B >> AR_FTRIG_S);
273 AH5212(ah)->ah_maxTxTrigLev = ((4096 / 64) - 1);
274 }
275#undef AR_FTRIG_512B
276
277 /* And now leave some headspace - 256 bytes */
278 AH5212(ah)->ah_maxTxTrigLev -= 4;
279}
280
281uint32_t
283{
284 uint32_t val;
285 int i;
286
287 /* Read Radio Chip Rev Extract */
288 OS_REG_WRITE(ah, AR_PHY(0x36), 0x00007058);
289 for (i = 0; i < 8; i++)
290 OS_REG_WRITE(ah, AR_PHY(0x20), 0x00010000);
291 val = (OS_REG_READ(ah, AR_PHY(256)) >> 24) & 0xff;
292 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);
293 return ath_hal_reverseBits(val, 8);
294}
295
296/*
297 * Attach for an AR5416 part.
298 */
299static struct ath_hal *
300ar5416Attach(uint16_t devid, HAL_SOFTC sc,
301 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata,
303{
304 struct ath_hal_5416 *ahp5416;
305 struct ath_hal_5212 *ahp;
306 struct ath_hal *ah;
307 uint32_t val;
308 HAL_STATUS ecode;
309 HAL_BOOL rfStatus;
310
311 HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, "%s: sc %p st %p sh %p\n",
312 __func__, sc, (void*) st, (void*) sh);
313
314 /* NB: memory is returned zero'd */
315 ahp5416 = ath_hal_malloc(sizeof (struct ath_hal_5416) +
316 /* extra space for Owl 2.1/2.2 WAR */
317 sizeof(ar5416Addac)
318 );
319 if (ahp5416 == AH_NULL) {
321 "%s: cannot allocate memory for state block\n", __func__);
322 *status = HAL_ENOMEM;
323 return AH_NULL;
324 }
325 ar5416InitState(ahp5416, devid, sc, st, sh, status);
326 ahp = &ahp5416->ah_5212;
327 ah = &ahp->ah_priv.h;
328
330 /* reset chip */
331 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: couldn't reset chip\n", __func__);
332 ecode = HAL_EIO;
333 goto bad;
334 }
335
337 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: couldn't wakeup chip\n", __func__);
338 ecode = HAL_EIO;
339 goto bad;
340 }
341 /* Read Revisions from Chips before taking out of reset */
342 val = OS_REG_READ(ah, AR_SREV) & AR_SREV_ID;
343 AH_PRIVATE(ah)->ah_macVersion = val >> AR_SREV_ID_S;
344 AH_PRIVATE(ah)->ah_macRev = val & AR_SREV_REVISION;
345 AH_PRIVATE(ah)->ah_ispcie = (devid == AR5416_DEVID_PCIE);
346
347 /* setup common ini data; rf backends handle remainder */
348 HAL_INI_INIT(&ahp->ah_ini_modes, ar5416Modes, 6);
349 HAL_INI_INIT(&ahp->ah_ini_common, ar5416Common, 2);
350
351 HAL_INI_INIT(&AH5416(ah)->ah_ini_bb_rfgain, ar5416BB_RfGain, 3);
352 HAL_INI_INIT(&AH5416(ah)->ah_ini_bank0, ar5416Bank0, 2);
353 HAL_INI_INIT(&AH5416(ah)->ah_ini_bank1, ar5416Bank1, 2);
354 HAL_INI_INIT(&AH5416(ah)->ah_ini_bank2, ar5416Bank2, 2);
355 HAL_INI_INIT(&AH5416(ah)->ah_ini_bank3, ar5416Bank3, 3);
356 HAL_INI_INIT(&AH5416(ah)->ah_ini_bank6, ar5416Bank6, 3);
357 HAL_INI_INIT(&AH5416(ah)->ah_ini_bank7, ar5416Bank7, 2);
358 HAL_INI_INIT(&AH5416(ah)->ah_ini_addac, ar5416Addac, 2);
359
360 if (! IS_5416V2_2(ah)) { /* Owl 2.1/2.0 */
361 ath_hal_printf(ah, "[ath] Enabling CLKDRV workaround for AR5416 < v2.2\n");
362 struct ini {
363 uint32_t *data; /* NB: !const */
364 int rows, cols;
365 };
366 /* override CLKDRV value */
367 OS_MEMCPY(&AH5416(ah)[1], ar5416Addac, sizeof(ar5416Addac));
368 AH5416(ah)->ah_ini_addac.data = (uint32_t *) &AH5416(ah)[1];
369 HAL_INI_VAL((struct ini *)&AH5416(ah)->ah_ini_addac, 31, 1) = 0;
370 }
371
372 HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, ar5416PciePhy, 2);
374
375 ecode = ath_hal_v14EepromAttach(ah);
376 if (ecode != HAL_OK)
377 goto bad;
378
379 if (!ar5416ChipReset(ah, AH_NULL, HAL_RESET_NORMAL)) { /* reset chip */
380 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n",
381 __func__);
382 ecode = HAL_EIO;
383 goto bad;
384 }
385
386 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID);
387
388 if (!ar5212ChipTest(ah)) {
389 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: hardware self-test failed\n",
390 __func__);
391 ecode = HAL_ESELFTEST;
392 goto bad;
393 }
394
395 /*
396 * Set correct Baseband to analog shift
397 * setting to access analog chips.
398 */
399 OS_REG_WRITE(ah, AR_PHY(0), 0x00000007);
400
401 /* Read Radio Chip Rev Extract */
402 AH_PRIVATE(ah)->ah_analog5GhzRev = ar5416GetRadioRev(ah);
403 switch (AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR) {
404 case AR_RAD5122_SREV_MAJOR: /* Fowl: 5G/2x2 */
405 case AR_RAD2122_SREV_MAJOR: /* Fowl: 2+5G/2x2 */
406 case AR_RAD2133_SREV_MAJOR: /* Fowl: 2G/3x3 */
407 case AR_RAD5133_SREV_MAJOR: /* Fowl: 2+5G/3x3 */
408 break;
409 default:
410 if (AH_PRIVATE(ah)->ah_analog5GhzRev == 0) {
411 /*
412 * When RF_Silen is used the analog chip is reset.
413 * So when the system boots with radio switch off
414 * the RF chip rev reads back as zero and we need
415 * to use the mac+phy revs to set the radio rev.
416 */
417 AH_PRIVATE(ah)->ah_analog5GhzRev =
419 break;
420 }
421 /* NB: silently accept anything in release code per Atheros */
422#ifdef AH_DEBUG
424 "%s: 5G Radio Chip Rev 0x%02X is not supported by "
425 "this driver\n", __func__,
426 AH_PRIVATE(ah)->ah_analog5GhzRev);
427 ecode = HAL_ENOTSUPP;
428 goto bad;
429#endif
430 }
431
432 /*
433 * Got everything we need now to setup the capabilities.
434 */
435 if (!ar5416FillCapabilityInfo(ah)) {
436 ecode = HAL_EEREAD;
437 goto bad;
438 }
439
441 if (ecode != HAL_OK) {
443 "%s: error getting mac address from EEPROM\n", __func__);
444 goto bad;
445 }
446 /* XXX How about the serial number ? */
447 /* Read Reg Domain */
448 AH_PRIVATE(ah)->ah_currentRD =
450 AH_PRIVATE(ah)->ah_currentRDext =
452
453 /*
454 * ah_miscMode is populated by ar5416FillCapabilityInfo()
455 * starting from griffin. Set here to make sure that
456 * AR_MISC_MODE_MIC_NEW_LOC_ENABLE is set before a GTK is
457 * placed into hardware.
458 */
459 if (ahp->ah_miscMode != 0)
461
462 rfStatus = ar2133RfAttach(ah, &ecode);
463 if (!rfStatus) {
464 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: RF setup failed, status %u\n",
465 __func__, ecode);
466 goto bad;
467 }
468
469 ar5416AniSetup(ah); /* Anti Noise Immunity */
470
473 AH5416(ah)->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_5416_2GHZ;
476 AH5416(ah)->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_5416_5GHZ;
477
478 ar5416InitNfHistBuff(AH5416(ah)->ah_cal.nfCalHist);
479
480 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__);
481
482 return ah;
483bad:
484 if (ahp)
485 ar5416Detach((struct ath_hal *) ahp);
486 if (status)
487 *status = ecode;
488 return AH_NULL;
489}
490
491void
493{
494 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s:\n", __func__);
495
496 HALASSERT(ah != AH_NULL);
498
499 /* Make sure that chip is awake before writing to it */
502 "%s: failed to wake up chip\n",
503 __func__);
504
505 ar5416AniDetach(ah);
506 ar5212RfDetach(ah);
507 ah->ah_disable(ah);
510 ath_hal_free(ah);
511}
512
513void
515{
516 if (AH_PRIVATE(ah)->ah_ispcie)
518 else
520}
521
522static void
523ar5416ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore, HAL_BOOL power_off)
524{
525
526 /* This is only applicable for AR5418 (AR5416 PCIe) */
527 if (! AH_PRIVATE(ah)->ah_ispcie)
528 return;
529
530 if (! restore) {
531 ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_pcieserdes, 1, 0);
532 OS_DELAY(1000);
533 }
534
535 if (power_off) { /* Power-off */
536 /* clear bit 19 to disable L1 */
538 } else { /* Power-on */
539 /* Set default WAR values for Owl */
541
542 /* set bit 19 to allow forcing of pcie core into L1 state */
544 }
545}
546
547/*
548 * Disable PCIe PHY if PCIe isn't used.
549 */
550static void
552{
553
554 /* PCIe? Don't */
555 if (AH_PRIVATE(ah)->ah_ispcie)
556 return;
557
558 /* .. Only applicable for AR5416v2 or later */
559 if (! (AR_SREV_OWL(ah) && AR_SREV_OWL_20_OR_LATER(ah)))
560 return;
561
563
564 /*
565 * Disable the PCIe PHY.
566 */
567 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
568 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
569 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x28000029);
570 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x57160824);
571 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x25980579);
572 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x00000000);
573 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x1aaabe40);
574 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0xbe105554);
575 OS_REG_WRITE(ah, AR_PCIE_SERDES, 0x000e1007);
576
577 /* Load the new settings */
578 OS_REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
579
582}
583
584static void
585ar5416WriteIni(struct ath_hal *ah, const struct ieee80211_channel *chan)
586{
587 u_int modesIndex, freqIndex;
588 int regWrites = 0;
589
590 /* Setup the indices for the next set of register array writes */
591 /* XXX Ignore 11n dynamic mode on the AR5416 for the moment */
592 if (IEEE80211_IS_CHAN_2GHZ(chan)) {
593 freqIndex = 2;
594 if (IEEE80211_IS_CHAN_HT40(chan))
595 modesIndex = 3;
596 else if (IEEE80211_IS_CHAN_108G(chan))
597 modesIndex = 5;
598 else
599 modesIndex = 4;
600 } else {
601 freqIndex = 1;
602 if (IEEE80211_IS_CHAN_HT40(chan) ||
603 IEEE80211_IS_CHAN_TURBO(chan))
604 modesIndex = 2;
605 else
606 modesIndex = 1;
607 }
608
609 /* Set correct Baseband to analog shift setting to access analog chips. */
610 OS_REG_WRITE(ah, AR_PHY(0), 0x00000007);
611
612 /*
613 * Write addac shifts
614 */
616
617 /* NB: only required for Sowl */
618 if (AR_SREV_SOWL(ah))
619 ar5416EepromSetAddac(ah, chan);
620
621 regWrites = ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_addac, 1,
622 regWrites);
624
625 regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_modes,
626 modesIndex, regWrites);
627 regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_common,
628 1, regWrites);
629
630 /* XXX updated regWrites? */
631 AH5212(ah)->ah_rfHal->writeRegs(ah, modesIndex, freqIndex, regWrites);
632}
633
634/*
635 * Convert to baseband spur frequency given input channel frequency
636 * and compute register settings below.
637 */
638
639static void
640ar5416SpurMitigate(struct ath_hal *ah, const struct ieee80211_channel *chan)
641{
642 uint16_t freq = ath_hal_gethwchannel(ah, chan);
643 static const int pilot_mask_reg[4] = { AR_PHY_TIMING7, AR_PHY_TIMING8,
645 static const int chan_mask_reg[4] = { AR_PHY_TIMING9, AR_PHY_TIMING10,
647 static const int inc[4] = { 0, 100, 0, 0 };
648
649 int bb_spur = AR_NO_SPUR;
650 int bin, cur_bin;
651 int spur_freq_sd;
652 int spur_delta_phase;
653 int denominator;
654 int upper, lower, cur_vit_mask;
655 int tmp, new;
656 int i;
657
658 int8_t mask_m[123];
659 int8_t mask_p[123];
660 int8_t mask_amt;
661 int tmp_mask;
662 int cur_bb_spur;
663 HAL_BOOL is2GHz = IEEE80211_IS_CHAN_2GHZ(chan);
664
665 OS_MEMZERO(mask_m, sizeof(mask_m));
666 OS_MEMZERO(mask_p, sizeof(mask_p));
667
668 /*
669 * Need to verify range +/- 9.5 for static ht20, otherwise spur
670 * is out-of-band and can be ignored.
671 */
672 /* XXX ath9k changes */
673 for (i = 0; i < AR5416_EEPROM_MODAL_SPURS; i++) {
674 cur_bb_spur = ath_hal_getSpurChan(ah, i, is2GHz);
675 if (AR_NO_SPUR == cur_bb_spur)
676 break;
677 cur_bb_spur = cur_bb_spur - (freq * 10);
678 if ((cur_bb_spur > -95) && (cur_bb_spur < 95)) {
679 bb_spur = cur_bb_spur;
680 break;
681 }
682 }
683 if (AR_NO_SPUR == bb_spur)
684 return;
685
686 bin = bb_spur * 32;
687
693
695
697
704 /*
705 * Should offset bb_spur by +/- 10 MHz for dynamic 2040 MHz
706 * config, no offset for HT20.
707 * spur_delta_phase = bb_spur/40 * 2**21 for static ht20,
708 * /80 for dyn2040.
709 */
710 spur_delta_phase = ((bb_spur * 524288) / 100) &
712 /*
713 * in 11A mode the denominator of spur_freq_sd should be 40 and
714 * it should be 44 in 11G
715 */
716 denominator = IEEE80211_IS_CHAN_2GHZ(chan) ? 440 : 400;
717 spur_freq_sd = ((bb_spur * 2048) / denominator) & 0x3ff;
718
720 SM(spur_freq_sd, AR_PHY_TIMING11_SPUR_FREQ_SD) |
721 SM(spur_delta_phase, AR_PHY_TIMING11_SPUR_DELTA_PHASE));
723
724 /*
725 * ============================================
726 * pilot mask 1 [31:0] = +6..-26, no 0 bin
727 * pilot mask 2 [19:0] = +26..+7
728 *
729 * channel mask 1 [31:0] = +6..-26, no 0 bin
730 * channel mask 2 [19:0] = +26..+7
731 */
732 //cur_bin = -26;
733 cur_bin = -6000;
734 upper = bin + 100;
735 lower = bin - 100;
736
737 for (i = 0; i < 4; i++) {
738 int pilot_mask = 0;
739 int chan_mask = 0;
740 int bp = 0;
741 for (bp = 0; bp < 30; bp++) {
742 if ((cur_bin > lower) && (cur_bin < upper)) {
743 pilot_mask = pilot_mask | 0x1 << bp;
744 chan_mask = chan_mask | 0x1 << bp;
745 }
746 cur_bin += 100;
747 }
748 cur_bin += inc[i];
749 OS_REG_WRITE(ah, pilot_mask_reg[i], pilot_mask);
750 OS_REG_WRITE(ah, chan_mask_reg[i], chan_mask);
751 }
752
753 /* =================================================
754 * viterbi mask 1 based on channel magnitude
755 * four levels 0-3
756 * - mask (-27 to 27) (reg 64,0x9900 to 67,0x990c)
757 * [1 2 2 1] for -9.6 or [1 2 1] for +16
758 * - enable_mask_ppm, all bins move with freq
759 *
760 * - mask_select, 8 bits for rates (reg 67,0x990c)
761 * - mask_rate_cntl, 8 bits for rates (reg 67,0x990c)
762 * choose which mask to use mask or mask2
763 */
764
765 /*
766 * viterbi mask 2 2nd set for per data rate puncturing
767 * four levels 0-3
768 * - mask_select, 8 bits for rates (reg 67)
769 * - mask (-27 to 27) (reg 98,0x9988 to 101,0x9994)
770 * [1 2 2 1] for -9.6 or [1 2 1] for +16
771 */
772 cur_vit_mask = 6100;
773 upper = bin + 120;
774 lower = bin - 120;
775
776 for (i = 0; i < 123; i++) {
777 if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) {
778 if ((abs(cur_vit_mask - bin)) < 75) {
779 mask_amt = 1;
780 } else {
781 mask_amt = 0;
782 }
783 if (cur_vit_mask < 0) {
784 mask_m[abs(cur_vit_mask / 100)] = mask_amt;
785 } else {
786 mask_p[cur_vit_mask / 100] = mask_amt;
787 }
788 }
789 cur_vit_mask -= 100;
790 }
791
792 tmp_mask = (mask_m[46] << 30) | (mask_m[47] << 28)
793 | (mask_m[48] << 26) | (mask_m[49] << 24)
794 | (mask_m[50] << 22) | (mask_m[51] << 20)
795 | (mask_m[52] << 18) | (mask_m[53] << 16)
796 | (mask_m[54] << 14) | (mask_m[55] << 12)
797 | (mask_m[56] << 10) | (mask_m[57] << 8)
798 | (mask_m[58] << 6) | (mask_m[59] << 4)
799 | (mask_m[60] << 2) | (mask_m[61] << 0);
800 OS_REG_WRITE(ah, AR_PHY_BIN_MASK_1, tmp_mask);
802
803 tmp_mask = (mask_m[31] << 28)
804 | (mask_m[32] << 26) | (mask_m[33] << 24)
805 | (mask_m[34] << 22) | (mask_m[35] << 20)
806 | (mask_m[36] << 18) | (mask_m[37] << 16)
807 | (mask_m[48] << 14) | (mask_m[39] << 12)
808 | (mask_m[40] << 10) | (mask_m[41] << 8)
809 | (mask_m[42] << 6) | (mask_m[43] << 4)
810 | (mask_m[44] << 2) | (mask_m[45] << 0);
811 OS_REG_WRITE(ah, AR_PHY_BIN_MASK_2, tmp_mask);
812 OS_REG_WRITE(ah, AR_PHY_MASK2_M_31_45, tmp_mask);
813
814 tmp_mask = (mask_m[16] << 30) | (mask_m[16] << 28)
815 | (mask_m[18] << 26) | (mask_m[18] << 24)
816 | (mask_m[20] << 22) | (mask_m[20] << 20)
817 | (mask_m[22] << 18) | (mask_m[22] << 16)
818 | (mask_m[24] << 14) | (mask_m[24] << 12)
819 | (mask_m[25] << 10) | (mask_m[26] << 8)
820 | (mask_m[27] << 6) | (mask_m[28] << 4)
821 | (mask_m[29] << 2) | (mask_m[30] << 0);
822 OS_REG_WRITE(ah, AR_PHY_BIN_MASK_3, tmp_mask);
823 OS_REG_WRITE(ah, AR_PHY_MASK2_M_16_30, tmp_mask);
824
825 tmp_mask = (mask_m[ 0] << 30) | (mask_m[ 1] << 28)
826 | (mask_m[ 2] << 26) | (mask_m[ 3] << 24)
827 | (mask_m[ 4] << 22) | (mask_m[ 5] << 20)
828 | (mask_m[ 6] << 18) | (mask_m[ 7] << 16)
829 | (mask_m[ 8] << 14) | (mask_m[ 9] << 12)
830 | (mask_m[10] << 10) | (mask_m[11] << 8)
831 | (mask_m[12] << 6) | (mask_m[13] << 4)
832 | (mask_m[14] << 2) | (mask_m[15] << 0);
833 OS_REG_WRITE(ah, AR_PHY_MASK_CTL, tmp_mask);
834 OS_REG_WRITE(ah, AR_PHY_MASK2_M_00_15, tmp_mask);
835
836 tmp_mask = (mask_p[15] << 28)
837 | (mask_p[14] << 26) | (mask_p[13] << 24)
838 | (mask_p[12] << 22) | (mask_p[11] << 20)
839 | (mask_p[10] << 18) | (mask_p[ 9] << 16)
840 | (mask_p[ 8] << 14) | (mask_p[ 7] << 12)
841 | (mask_p[ 6] << 10) | (mask_p[ 5] << 8)
842 | (mask_p[ 4] << 6) | (mask_p[ 3] << 4)
843 | (mask_p[ 2] << 2) | (mask_p[ 1] << 0);
844 OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_1, tmp_mask);
845 OS_REG_WRITE(ah, AR_PHY_MASK2_P_15_01, tmp_mask);
846
847 tmp_mask = (mask_p[30] << 28)
848 | (mask_p[29] << 26) | (mask_p[28] << 24)
849 | (mask_p[27] << 22) | (mask_p[26] << 20)
850 | (mask_p[25] << 18) | (mask_p[24] << 16)
851 | (mask_p[23] << 14) | (mask_p[22] << 12)
852 | (mask_p[21] << 10) | (mask_p[20] << 8)
853 | (mask_p[19] << 6) | (mask_p[18] << 4)
854 | (mask_p[17] << 2) | (mask_p[16] << 0);
855 OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_2, tmp_mask);
856 OS_REG_WRITE(ah, AR_PHY_MASK2_P_30_16, tmp_mask);
857
858 tmp_mask = (mask_p[45] << 28)
859 | (mask_p[44] << 26) | (mask_p[43] << 24)
860 | (mask_p[42] << 22) | (mask_p[41] << 20)
861 | (mask_p[40] << 18) | (mask_p[39] << 16)
862 | (mask_p[38] << 14) | (mask_p[37] << 12)
863 | (mask_p[36] << 10) | (mask_p[35] << 8)
864 | (mask_p[34] << 6) | (mask_p[33] << 4)
865 | (mask_p[32] << 2) | (mask_p[31] << 0);
866 OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_3, tmp_mask);
867 OS_REG_WRITE(ah, AR_PHY_MASK2_P_45_31, tmp_mask);
868
869 tmp_mask = (mask_p[61] << 30) | (mask_p[60] << 28)
870 | (mask_p[59] << 26) | (mask_p[58] << 24)
871 | (mask_p[57] << 22) | (mask_p[56] << 20)
872 | (mask_p[55] << 18) | (mask_p[54] << 16)
873 | (mask_p[53] << 14) | (mask_p[52] << 12)
874 | (mask_p[51] << 10) | (mask_p[50] << 8)
875 | (mask_p[49] << 6) | (mask_p[48] << 4)
876 | (mask_p[47] << 2) | (mask_p[46] << 0);
877 OS_REG_WRITE(ah, AR_PHY_BIN_MASK2_4, tmp_mask);
878 OS_REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask);
879
882}
883
884/*
885 * Fill all software cached or static hardware state information.
886 * Return failure if capabilities are to come from EEPROM and
887 * cannot be read.
888 */
891{
892 struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
893 HAL_CAPABILITIES *pCap = &ahpriv->ah_caps;
894 uint16_t val;
895
896 /* Construct wireless mode from EEPROM */
897 pCap->halWirelessModes = 0;
903 ;
904 }
910 ;
915 ;
916 }
917
918 pCap->halLow2GhzChan = 2312;
919 pCap->halHigh2GhzChan = 2732;
920
921 pCap->halLow5GhzChan = 4915;
922 pCap->halHigh5GhzChan = 6100;
923
927
931 /*
932 * Starting with Griffin TX+RX mic keys can be combined
933 * in one key cache slot.
934 */
938
940 pCap->halBurstSupport = AH_TRUE;
944
946
947 pCap->halPSPollBroken = AH_TRUE; /* XXX fixed in later revs? */
948 pCap->halNumMRRetries = 4; /* Hardware supports 4 MRR */
949 pCap->halNumTxMaps = 1; /* Single TX ptr per descr */
950 pCap->halVEOLSupport = AH_TRUE;
952 pCap->halMcastKeySrchSupport = AH_TRUE; /* Works on AR5416 and later */
954 pCap->hal4AddrAggrSupport = AH_FALSE; /* Broken in Owl */
955 pCap->halSpectralScanSupport = AH_FALSE; /* AR9280 and later */
956
957 if (ath_hal_eepromGet(ah, AR_EEP_MAXQCU, &val) == HAL_OK)
958 pCap->halTotalQueues = val;
959 else
961
962 if (ath_hal_eepromGet(ah, AR_EEP_KCENTRIES, &val) == HAL_OK)
963 pCap->halKeyCacheSize = val;
964 else
966
967 /* XXX Which chips? */
968 pCap->halChanHalfRate = AH_TRUE;
970
971 pCap->halTxTstampPrecision = 32;
972 pCap->halRxTstampPrecision = 32;
975 | HAL_INT_RX
976 | HAL_INT_TX
984 ;
985
987 pCap->halNumGpioPins = 14;
988 pCap->halWowSupport = AH_FALSE;
990 pCap->halBtCoexSupport = AH_FALSE; /* XXX need support */
993 /* Disable this so Block-ACK works correctly */
995#if 0 /* XXX not yet */
996 pCap->halNumAntCfg2GHz = ar5416GetNumAntConfig(ahp, HAL_FREQ_BAND_2GHZ);
997 pCap->halNumAntCfg5GHz = ar5416GetNumAntConfig(ahp, HAL_FREQ_BAND_5GHZ);
998#endif
999 pCap->halHTSupport = AH_TRUE;
1001 /* XXX CB71 uses GPIO 0 to indicate 3 rx chains */
1003 /* AR5416 may have 3 antennas but is a 2x2 stream device */
1004 pCap->halTxStreams = 2;
1005 pCap->halRxStreams = 2;
1006
1007 /*
1008 * If the TX or RX chainmask has less than 2 chains active,
1009 * mark it as a 1-stream device for the relevant stream.
1010 */
1011 if (owl_get_ntxchains(pCap->halTxChainMask) == 1)
1012 pCap->halTxStreams = 1;
1013 /* XXX Eww */
1014 if (owl_get_ntxchains(pCap->halRxChainMask) == 1)
1015 pCap->halRxStreams = 1;
1016 pCap->halRtsAggrLimit = 8*1024; /* Owl 2.0 limit */
1017 pCap->halMbssidAggrSupport = AH_FALSE; /* Broken on Owl */
1021 pCap->halGTTSupport = AH_TRUE;
1022 pCap->halCSTSupport = AH_TRUE;
1024 /*
1025 * BB Read WAR: this is only for AR5008/AR9001 NICs
1026 * It is also set individually in the AR91xx attach functions.
1027 */
1028 if (AR_SREV_OWL(ah))
1029 pCap->halHasBBReadWar = AH_TRUE;
1030
1033 /* NB: enabled by default */
1034 ahpriv->ah_rfkillEnabled = AH_TRUE;
1036 }
1037
1038 /*
1039 * The MAC will mark frames as RXed if there's a descriptor
1040 * to write them to. So if it hits a self-linked final descriptor,
1041 * it'll keep ACKing frames even though they're being silently
1042 * dropped. Thus, this particular feature of the driver can't
1043 * be used for 802.11n devices.
1044 */
1045 ahpriv->ah_rxornIsFatal = AH_FALSE;
1046
1047 /*
1048 * If it's a PCI NIC, ask the HAL OS layer to serialise
1049 * register access, or SMP machines may cause the hardware
1050 * to hang. This is applicable to AR5416 and AR9220; I'm not
1051 * sure about AR9160 or AR9227.
1052 */
1053 if (! AH_PRIVATE(ah)->ah_ispcie)
1054 pCap->halSerialiseRegWar = 1;
1055
1056 /*
1057 * AR5416 and later NICs support MYBEACON filtering.
1058 */
1059 pCap->halRxDoMyBeacon = AH_TRUE;
1060
1061 return AH_TRUE;
1062}
1063
1064static const char*
1065ar5416Probe(uint16_t vendorid, uint16_t devid)
1066{
1067 if (vendorid == ATHEROS_VENDOR_ID) {
1068 if (devid == AR5416_DEVID_PCI)
1069 return "Atheros 5416";
1070 if (devid == AR5416_DEVID_PCIE)
1071 return "Atheros 5418";
1072 }
1073 return AH_NULL;
1074}
uint32_t ath_hal_reverseBits(uint32_t val, uint32_t n)
Definition: ah.c:333
int ath_hal_ini_write(struct ath_hal *ah, const HAL_INI_ARRAY *ia, int col, int regWr)
Definition: ah.c:1312
HAL_STATUS
Definition: ah.h:71
@ HAL_EIO
Definition: ah.h:75
@ HAL_ESELFTEST
Definition: ah.h:86
@ HAL_EEREAD
Definition: ah.h:80
@ HAL_ENOTSUPP
Definition: ah.h:85
@ HAL_OK
Definition: ah.h:72
@ HAL_ENOMEM
Definition: ah.h:74
@ HAL_MODE_108G
Definition: ah.h:666
@ HAL_MODE_11NG_HT40PLUS
Definition: ah.h:674
@ HAL_MODE_11NG_HT40MINUS
Definition: ah.h:675
@ HAL_MODE_11NA_HT40MINUS
Definition: ah.h:677
@ HAL_MODE_11NA_HT40PLUS
Definition: ah.h:676
@ HAL_MODE_11NA_HT20
Definition: ah.h:673
@ HAL_MODE_11G
Definition: ah.h:664
@ HAL_MODE_11NG_HT20
Definition: ah.h:672
@ HAL_MODE_11A
Definition: ah.h:657
#define HAL_NUM_TX_QUEUES
Definition: ah.h:251
@ HAL_PM_AWAKE
Definition: ah.h:440
@ HAL_PM_FULL_SLEEP
Definition: ah.h:441
@ HAL_RESET_NORMAL
Definition: ah.h:772
@ HAL_ANI_NOISE_IMMUNITY_LEVEL
Definition: ah.h:972
@ HAL_FREQ_BAND_2GHZ
Definition: ah.h:749
@ HAL_FREQ_BAND_5GHZ
Definition: ah.h:748
@ HAL_INT_BNR
Definition: ah.h:493
@ HAL_INT_GTT
Definition: ah.h:504
@ HAL_INT_COMMON
Definition: ah.h:514
@ HAL_INT_FATAL
Definition: ah.h:505
@ HAL_INT_TX
Definition: ah.h:481
@ HAL_INT_DTIMSYNC
Definition: ah.h:496
@ HAL_INT_CST
Definition: ah.h:503
@ HAL_INT_RX
Definition: ah.h:473
@ HAL_INT_TSFOOR
Definition: ah.h:499
@ HAL_INT_BMISC
Definition: ah.h:507
@ HAL_RESET_POWER_ON
Definition: ah.h:778
HAL_BOOL
Definition: ah.h:93
@ AH_FALSE
Definition: ah.h:94
@ AH_TRUE
Definition: ah.h:95
@ HAL_DEBUG_ANY
Definition: ah_debug.h:62
@ HAL_DEBUG_UNMASKABLE
Definition: ah_debug.h:61
@ HAL_DEBUG_ATTACH
Definition: ah_debug.h:30
#define AR5416_DEVID_PCIE
Definition: ah_devid.h:78
#define AR5416_DEVID_PCI
Definition: ah_devid.h:77
#define ATHEROS_VENDOR_ID
Definition: ah_devid.h:25
#define AR_NO_SPUR
Definition: ah_eeprom.h:160
@ AR_EEP_GMODE
Definition: ah_eeprom.h:72
@ AR_EEP_MACADDR
Definition: ah_eeprom.h:77
@ AR_EEP_AES
Definition: ah_eeprom.h:80
@ AR_EEP_REGDMN_0
Definition: ah_eeprom.h:86
@ AR_EEP_RXMASK
Definition: ah_eeprom.h:96
@ AR_EEP_TXMASK
Definition: ah_eeprom.h:95
@ AR_EEP_MAXQCU
Definition: ah_eeprom.h:82
@ AR_EEP_KCENTRIES
Definition: ah_eeprom.h:83
@ AR_EEP_RFKILL
Definition: ah_eeprom.h:69
@ AR_EEP_RFSILENT
Definition: ah_eeprom.h:90
@ AR_EEP_REGDMN_1
Definition: ah_eeprom.h:87
@ AR_EEP_AMODE
Definition: ah_eeprom.h:70
HAL_STATUS ath_hal_v14EepromAttach(struct ath_hal *ah)
#define owl_get_ntxchains(_txchainmask)
Definition: ah_eeprom_v14.h:34
#define AR5416_EEPROM_MODAL_SPURS
Definition: ah_eeprom_v14.h:76
#define OS_REG_SET_BIT(_a, _r, _f)
Definition: ah_internal.h:594
#define HAL_INI_INIT(_ia, _data, _cols)
Definition: ah_internal.h:910
#define SM(_v, _f)
Definition: ah_internal.h:587
#define ath_hal_configPCIE(_ah, _reset, _poweroff)
Definition: ah_internal.h:468
#define ath_hal_eepromGet(_ah, _param, _val)
Definition: ah_internal.h:486
#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_getSpurChan(_ah, _ix, _is2G)
Definition: ah_internal.h:492
void * ath_hal_malloc(size_t)
static OS_INLINE uint16_t ath_hal_gethwchannel(struct ath_hal *ah, const struct ieee80211_channel *c)
Definition: ah_internal.h:732
#define HAL_INI_VAL(_ia, _r, _c)
Definition: ah_internal.h:915
#define AH_NULL
Definition: ah_internal.h:28
#define HALASSERT(_x)
Definition: ah_internal.h:683
#define HALDEBUG(_ah, __m,...)
Definition: ah_internal.h:658
#define ath_hal_disablePCIE(_ah)
Definition: ah_internal.h:470
#define ath_hal_eepromGetFlag(_ah, _param)
Definition: ah_internal.h:490
#define ath_hal_eepromDetach(_ah)
Definition: ah_internal.h:482
void ath_hal_free(void *p)
Definition: ah_osdep.c:116
void ath_hal_printf(struct ath_hal *, const char *,...)
Definition: ah_osdep.c:80
#define abs(_a)
Definition: ah_osdep.h:76
#define OS_DELAY(_n)
Definition: ah_osdep.h:69
#define OS_REG_WRITE_BUFFER_DISABLE(_ah)
Definition: ah_osdep.h:109
bus_space_tag_t HAL_BUS_TAG
Definition: ah_osdep.h:50
#define OS_MEMZERO(_a, _n)
Definition: ah_osdep.h:72
#define OS_REG_WRITE(_ah, _reg, _val)
Definition: ah_osdep.h:139
void * HAL_SOFTC
Definition: ah_osdep.h:49
#define OS_REG_WRITE_BUFFER_ENABLE(_ah)
Definition: ah_osdep.h:107
bus_space_handle_t HAL_BUS_HANDLE
Definition: ah_osdep.h:51
#define OS_MEMCPY(_d, _s, _n)
Definition: ah_osdep.h:73
#define OS_REG_WRITE_BUFFER_FLUSH(_ah)
Definition: ah_osdep.h:111
#define OS_REG_READ(_ah, _reg)
Definition: ah_osdep.h:140
HAL_BOOL ar2133RfAttach(struct ath_hal *ah, HAL_STATUS *status)
Definition: ar2133.c:530
#define AR_PHY(_n)
Definition: ar5210phy.h:30
#define AR_SREV
Definition: ar5210reg.h:63
#define AR_PHY_CHIP_ID
Definition: ar5211phy.h:36
#define AR_SREV_ID_S
Definition: ar5211reg.h:711
HAL_BOOL ar5212ChipTest(struct ath_hal *ah)
#define ar5212RfDetach(ah)
Definition: ar5212.h:405
void ar5212InitState(struct ath_hal_5212 *, uint16_t devid, HAL_SOFTC, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
#define AH5212(_ah)
Definition: ar5212.h:354
#define AR_PHY_TIMING11
Definition: ar5212phy.h:273
#define AR_PHY_MASK_CTL
Definition: ar5212phy.h:154
#define AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK
Definition: ar5212phy.h:173
#define AR_PHY_BIN_MASK2_2
Definition: ar5212phy.h:262
#define AR_PHY_TIMING11_SPUR_FREQ_SD
Definition: ar5212phy.h:276
#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_FILTER
Definition: ar5212phy.h:172
#define AR_PHY_TIMING8
Definition: ar5212phy.h:257
#define AR_PHY_BIN_MASK2_3
Definition: ar5212phy.h:263
#define AR_PHY_BIN_MASK_1
Definition: ar5212phy.h:150
#define AR_PHY_BIN_MASK2_4
Definition: ar5212phy.h:264
#define AR_PHY_TIMING11_USE_SPUR_IN_AGC
Definition: ar5212phy.h:278
#define AR_PHY_BIN_MASK2_1
Definition: ar5212phy.h:261
#define AR_PHY_TIMING9
Definition: ar5212phy.h:268
#define AR_PHY_BIN_MASK_3
Definition: ar5212phy.h:152
#define AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK
Definition: ar5212phy.h:174
#define AR_PHY_TIMING7
Definition: ar5212phy.h:256
#define AR_PHY_TIMING10
Definition: ar5212phy.h:269
#define AR_PHY_BIN_MASK_2
Definition: ar5212phy.h:151
#define AR_PHY_TIMING11_SPUR_DELTA_PHASE
Definition: ar5212phy.h:274
#define AR_PCIE_SERDES2
Definition: ar5212reg.h:247
#define AR_PCIE_SERDES
Definition: ar5212reg.h:246
#define AR_SREV_ID
Definition: ar5212reg.h:758
#define AR_SREV_REVISION
Definition: ar5212reg.h:760
#define AR_MISC_MODE
Definition: ar5212reg.h:321
#define AR_FTRIG_S
Definition: ar5212reg.h:370
#define AR_FTRIG_256B
Definition: ar5212reg.h:375
#define AR_RADIO_SREV_MAJOR
Definition: ar5212reg.h:796
void ar5416Set11nBurstDuration(struct ath_hal *ah, struct ath_desc *ds, u_int burstDuration)
Definition: ar5416_xmit.c:1068
HAL_BOOL ar5416AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param)
Definition: ar5416_ani.c:175
void ar5416SetBeaconTimers(struct ath_hal *, const HAL_BEACON_TIMERS *)
Definition: ar5416_beacon.c:48
void ar5416AniPoll(struct ath_hal *, const struct ieee80211_channel *)
Definition: ar5416_ani.c:929
void ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, struct ath_desc *ds, u_int vmf)
Definition: ar5416_xmit.c:1053
HAL_BOOL ar5416ChainTxDesc(struct ath_hal *ah, struct ath_desc *ds, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int keyIx, HAL_CIPHER cipher, uint8_t delims, HAL_BOOL firstSeg, HAL_BOOL lastSeg, HAL_BOOL lastAggr)
Definition: ar5416_xmit.c:525
void ar5416RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, const struct ieee80211_channel *)
Definition: ar5416_ani.c:917
void ar5416ResetTsf(struct ath_hal *ah)
Definition: ar5416_misc.c:171
void ar5416SetBTCoexInfo(struct ath_hal *ah, HAL_BT_COEX_INFO *btinfo)
Definition: ar5416_btcoex.c:39
#define AR5416_DEFAULT_TXCHAINMASK
Definition: ar5416.h:50
HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx, u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, u_int compivLen, u_int comp)
Definition: ar5416_xmit.c:323
HAL_BOOL ar5416GetPendingInterrupts(struct ath_hal *, HAL_INT *masked)
HAL_BOOL ar5416EepromRead(struct ath_hal *, u_int off, uint16_t *data)
Definition: ar5416_eeprom.c:37
u_int ar5416GetWirelessModes(struct ath_hal *ah)
Definition: ar5416_misc.c:42
HAL_BOOL ar5416SetBoardValues(struct ath_hal *, const struct ieee80211_channel *)
#define AR5416_SPUR_RSSI_THRESH
Definition: ar5416.h:59
void ar5416ResetStaBeaconTimers(struct ath_hal *ah)
void ar5416ConfigureSpectralScan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
HAL_BOOL ar5416GetTxCompletionRates(struct ath_hal *ah, const struct ath_desc *ds0, int *rates, int *tries)
Definition: ar5416_xmit.c:1099
HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah)
Definition: ar5416_misc.c:377
void ar5416GetSpectralParams(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
HAL_BOOL ar5416SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry, const HAL_KEYVAL *k, const uint8_t *mac, int xorKey)
void ar5416StopSpectralScan(struct ath_hal *ah)
uint64_t ar5416GetTsf64(struct ath_hal *ah)
Definition: ar5416_misc.c:109
HAL_STATUS ar5416GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t *result)
Definition: ar5416_misc.c:449
void ar5416BTCoexConfig(struct ath_hal *ah, HAL_BT_COEX_CONFIG *btconf)
Definition: ar5416_btcoex.c:54
#define AH5416(_ah)
Definition: ar5416.h:162
void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum)
Definition: ar5416_btcoex.c:87
void ar5416GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel)
Definition: ar5416_gpio.c:210
void ar5416SetTsf64(struct ath_hal *ah, uint64_t tsf64)
Definition: ar5416_misc.c:146
#define AR5416_MAGIC
Definition: ar5416.h:28
void ar5416SetRxFilter(struct ath_hal *ah, uint32_t bits)
void ar5416BeaconInit(struct ath_hal *ah, uint32_t next_beacon, uint32_t beacon_period)
Definition: ar5416_beacon.c:84
void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan)
HAL_RFGAIN ar5416GetRfgain(struct ath_hal *ah)
uint32_t ar5416GpioGet(struct ath_hal *ah, uint32_t gpio)
Definition: ar5416_gpio.c:184
HAL_INT ar5416SetInterrupts(struct ath_hal *ah, HAL_INT ints)
HAL_BOOL ar5416SetupRxDesc(struct ath_hal *, struct ath_desc *, uint32_t size, u_int flags)
Definition: ar5416_recv.c:142
HAL_BOOL ar5416GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
Definition: ar5416_misc.c:218
HAL_BOOL ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *chan, HAL_BOOL bChannelChange, HAL_RESET_TYPE, HAL_STATUS *status)
Definition: ar5416_reset.c:78
HAL_BOOL ar5416ChipReset(struct ath_hal *ah, const struct ieee80211_channel *, HAL_RESET_TYPE)
Definition: ar5416_reset.c:779
HAL_BOOL ar5416StopDmaReceive(struct ath_hal *ah)
Definition: ar5416_recv.c:75
HAL_BOOL ar5416ResetTxQueue(struct ath_hal *ah, u_int q)
Definition: ar5416_xmit.c:1245
HAL_BOOL ar5416ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry)
HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
Definition: ar5416_power.c:127
const HAL_RATE_TABLE * ar5416GetRateTable(struct ath_hal *, u_int mode)
Definition: ar5416_phy.c:109
void ar5416StartPcuReceive(struct ath_hal *ah, HAL_BOOL)
Definition: ar5416_recv.c:109
void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode)
Definition: ar5416_misc.c:357
void ar5416SetLedState(struct ath_hal *ah, HAL_LED_STATE state)
Definition: ar5416_misc.c:68
HAL_BOOL ar5416SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING)
Definition: ar5416_misc.c:194
void ar5416Set11nRateScenario(struct ath_hal *ah, struct ath_desc *ds, u_int durUpdateEn, u_int rtsctsRate, HAL_11N_RATE_SERIES series[], u_int nseries, u_int flags)
Definition: ar5416_xmit.c:875
HAL_BOOL ar5416GpioCfgOutput(struct ath_hal *, uint32_t gpio, HAL_GPIO_MUX_TYPE)
Definition: ar5416_gpio.c:86
HAL_BOOL ar5416GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val)
Definition: ar5416_gpio.c:163
HAL_BOOL ar5416EepromWrite(struct ath_hal *, u_int off, uint16_t data)
HAL_BOOL ar5416GpioCfgInput(struct ath_hal *, uint32_t gpio)
Definition: ar5416_gpio.c:139
HAL_BOOL ar5416SetTransmitPower(struct ath_hal *, const struct ieee80211_channel *, uint16_t *)
void ar5416SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t)
Definition: ar5416_misc.c:265
void ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5416_radar.c:125
void ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds)
Definition: ar5416_xmit.c:1043
HAL_BOOL ar5416GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5416_radar.c:56
HAL_BOOL ar5416SetupXTxDesc(struct ath_hal *, struct ath_desc *, u_int txRate1, u_int txRetries1, u_int txRate2, u_int txRetries2, u_int txRate3, u_int txRetries3)
Definition: ar5416_xmit.c:431
void ar5416BTCoexSetParameter(struct ath_hal *ah, uint32_t type, uint32_t value)
void ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ar5416_radar.c:83
HAL_BOOL ar5416IsSpectralActive(struct ath_hal *ah)
#define AR5416_KEYTABLE_SIZE
Definition: ar5416.h:52
void ar5416SetCoverageClass(struct ath_hal *, uint8_t, int)
Definition: ar5416_misc.c:208
void ar5416StopPcuReceive(struct ath_hal *ah)
Definition: ar5416_recv.c:129
void ar5416AniDetach(struct ath_hal *)
Definition: ar5416_ani.c:165
HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize)
Definition: ar5416_misc.c:532
uint64_t ar5416GetNextTBTT(struct ath_hal *)
Definition: ar5416_beacon.c:37
void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, uint32_t thresh)
HAL_BOOL ar5416FillTxDesc(struct ath_hal *ah, struct ath_desc *ds, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg, const struct ath_desc *ds0)
Definition: ar5416_xmit.c:461
HAL_BOOL ar5416IsFastClockEnabled(struct ath_hal *ah)
Definition: ar5416_radar.c:429
uint32_t ar5416Get11nExtBusy(struct ath_hal *ah)
Definition: ar5416_misc.c:282
void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType)
void ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims)
Definition: ar5416_xmit.c:1014
void ar5416EepromSetAddac(struct ath_hal *ah, const struct ieee80211_channel *chan)
void ar5416Set11nAggrFirst(struct ath_hal *ah, struct ath_desc *ds, u_int aggrLen, u_int numDelims)
Definition: ar5416_xmit.c:979
int ar5416BTCoexEnable(struct ath_hal *ah)
void ar5416BTCoexAntennaDiversity(struct ath_hal *ah)
HAL_BOOL ar5416IsSpectralEnabled(struct ath_hal *ah)
HAL_STATUS ar5416SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag)
Definition: ar5416_misc.c:423
HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q)
Definition: ar5416_xmit.c:36
HAL_BOOL ar5416PhyDisable(struct ath_hal *ah)
HAL_BOOL ar5416Disable(struct ath_hal *ah)
HAL_BOOL ar5416SetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t val, HAL_STATUS *status)
void ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds)
Definition: ar5416_xmit.c:1033
HAL_BOOL ar5416SetTxPowerLimit(struct ath_hal *ah, uint32_t limit)
Definition: ar5416_reset.c:915
HAL_STATUS ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc *, uint32_t, struct ath_desc *, uint64_t, struct ath_rx_status *)
Definition: ar5416_recv.c:171
void ar5416BTCoexDisable(struct ath_hal *ah)
HAL_BOOL ar5416SetupLastTxDesc(struct ath_hal *ah, struct ath_desc *ds, const struct ath_desc *ds0)
Definition: ar5416_xmit.c:681
void ar5416StartSpectralScan(struct ath_hal *ah)
void ar5416AniAttach(struct ath_hal *, const struct ar5212AniParams *, const struct ar5212AniParams *, HAL_BOOL ena)
Definition: ar5416_ani.c:133
HAL_STATUS ar5416ProcTxDesc(struct ath_hal *ah, struct ath_desc *, struct ath_tx_status *)
Definition: ar5416_xmit.c:719
void ar5416ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *)
Definition: ar5416_ani.c:653
#define AR5416_DEFAULT_RXCHAINMASK
Definition: ar5416.h:49
HAL_BOOL ar5416SetupFirstTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int aggrLen, u_int flags, u_int txPower, u_int txRate0, u_int txTries0, u_int antMode, u_int rtsctsRate, u_int rtsctsDuration)
Definition: ar5416_xmit.c:620
int ar5416SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, const HAL_TXQ_INFO *qInfo)
Definition: ar5416_xmit.c:1124
HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset)
HAL_BOOL ar5416SetResetReg(struct ath_hal *, uint32_t type)
HAL_BOOL ar5416GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan)
Definition: ar5416_reset.c:925
HAL_BOOL ar5416IsInterruptPending(struct ath_hal *ah)
HAL_BOOL ar5416ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
Definition: ar5416_radar.c:235
uint32_t ar5416GetRxFilter(struct ath_hal *ah)
Definition: ar5416_recv.c:35
void ar5416Set11nRxClear(struct ath_hal *ah, HAL_HT_RXCLEAR rxclear)
Definition: ar5416_misc.c:403
void ar5416SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *)
HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int)
Definition: ar5416_misc.c:201
#define AR_FTRIG_512B
static void ar5416WriteIni(struct ath_hal *ah, const struct ieee80211_channel *chan)
void ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
Definition: ar5416_attach.c:86
static void ar5416olcTempCompensation(struct ath_hal *ah)
Definition: ar5416_attach.c:78
static void ar5416olcInit(struct ath_hal *ah)
Definition: ar5416_attach.c:73
static void ar5416DisablePCIE(struct ath_hal *ah)
void ar5416Detach(struct ath_hal *ah)
AH_CHIP(AR5416, ar5416Probe, ar5416Attach)
void ar5416AttachPCIE(struct ath_hal *ah)
static void ar5416SpurMitigate(struct ath_hal *ah, const struct ieee80211_channel *chan)
static void ar5416AniSetup(struct ath_hal *ah)
Definition: ar5416_attach.c:44
static const char * ar5416Probe(uint16_t vendorid, uint16_t devid)
HAL_BOOL ar5416FillCapabilityInfo(struct ath_hal *ah)
uint32_t ar5416GetRadioRev(struct ath_hal *ah)
static struct ath_hal * ar5416Attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config, HAL_STATUS *status)
static void ar5416ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore, HAL_BOOL power_off)
HAL_BOOL ar5416PerCalibrationN(struct ath_hal *ah, struct ieee80211_channel *chan, u_int rxchainmask, HAL_BOOL longcal, HAL_BOOL *isCalDone)
Definition: ar5416_cal.c:445
HAL_BOOL ar5416ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *chan)
Definition: ar5416_cal.c:340
void ar5416InitNfHistBuff(struct ar5212NfCalHist *h)
Definition: ar5416_cal.c:696
HAL_BOOL ar5416InitCalHardware(struct ath_hal *ah, const struct ieee80211_channel *chan)
Definition: ar5416_cal.c:203
HAL_BOOL ar5416PerCalibration(struct ath_hal *ah, struct ieee80211_channel *chan, HAL_BOOL *isIQdone)
Definition: ar5416_cal.c:544
#define AR_PHY_MASK2_M_16_30
Definition: ar5416phy.h:332
#define AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ
Definition: ar5416phy.h:376
#define AR_PHY_SEL_EXTERNAL_RADIO
Definition: ar5416phy.h:165
#define AR_PHY_SEL_INTERNAL_ADDAC
Definition: ar5416phy.h:164
#define AR_PHY_SPUR_REG
Definition: ar5416phy.h:339
#define AR_PHY_MASK2_P_30_16
Definition: ar5416phy.h:335
#define AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ
Definition: ar5416phy.h:378
#define AR_PHY_SPUR_REG_MASK_RATE_CNTL
Definition: ar5416phy.h:352
#define AR_PHY_MASK2_M_00_15
Definition: ar5416phy.h:333
#define AR_PHY_MASK2_M_31_45
Definition: ar5416phy.h:331
#define AR_PHY_ADC_SERIAL_CTL
Definition: ar5416phy.h:163
#define AR_PHY_PILOT_MASK_31_60
Definition: ar5416phy.h:363
#define AR_PHY_SPUR_REG_MASK_RATE_SELECT
Definition: ar5416phy.h:356
#define AR_PHY_MASK2_P_15_01
Definition: ar5416phy.h:334
#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH
Definition: ar5416phy.h:359
#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_RSSI
Definition: ar5416phy.h:158
#define AR_PHY_CHANNEL_MASK_31_60
Definition: ar5416phy.h:366
#define AR_PHY_PILOT_MASK_01_30
Definition: ar5416phy.h:362
#define AR_PHY_MASK2_P_45_31
Definition: ar5416phy.h:336
#define AR_PHY_CCA_NOM_VAL_5416_5GHZ
Definition: ar5416phy.h:374
#define AR_PHY_CHANNEL_MASK_01_30
Definition: ar5416phy.h:365
#define AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ
Definition: ar5416phy.h:375
#define AR_PHY_VIT_MASK2_M_46_61
Definition: ar5416phy.h:330
#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM
Definition: ar5416phy.h:355
#define AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ
Definition: ar5416phy.h:377
#define AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI
Definition: ar5416phy.h:358
#define AR_PHY_CCA_NOM_VAL_5416_2GHZ
Definition: ar5416phy.h:373
#define AR_PHY_TIMING_CTRL4_CHAIN(_i)
Definition: ar5416phy.h:147
#define AR_PHY_MASK2_P_61_45
Definition: ar5416phy.h:337
#define AR_RAD5122_SREV_MAJOR
Definition: ar5416reg.h:644
#define AR_SREV_OWL_20_OR_LATER(_ah)
Definition: ar5416reg.h:706
#define AR_RAD5133_SREV_MAJOR
Definition: ar5416reg.h:642
#define AR_SREV_KITE(_ah)
Definition: ar5416reg.h:754
#define AR_WA_DEFAULT
Definition: ar5416reg.h:275
#define AR_SREV_SOWL(_ah)
Definition: ar5416reg.h:725
#define AR_PCIE_PM_CTRL_ENA
Definition: ar5416reg.h:279
#define IS_5416V2_2(_ah)
Definition: ar5416reg.h:650
#define AR_RAD2122_SREV_MAJOR
Definition: ar5416reg.h:645
#define AR_RAD2133_SREV_MAJOR
Definition: ar5416reg.h:643
#define AR_PCIE_PM_CTRL
Definition: ar5416reg.h:37
#define AR_SREV_OWL(_ah)
Definition: ar5416reg.h:702
#define AR_SREV_9271(_ah)
Definition: ar5416reg.h:810
#define AR_WA
Definition: ar5416reg.h:36
uint8_t halRxStreams
Definition: ah_internal.h:310
uint32_t halChanSpreadSupport
Definition: ah_internal.h:223
uint32_t halRfSilentSupport
Definition: ah_internal.h:247
uint32_t halMbssidAggrSupport
Definition: ah_internal.h:266
uint32_t halWowMatchPatternExact
Definition: ah_internal.h:250
uint32_t hal4AddrAggrSupport
Definition: ah_internal.h:260
uint32_t halBssidMatchSupport
Definition: ah_internal.h:267
uint32_t halAutoSleepSupport
Definition: ah_internal.h:251
uint32_t halTurboPrimeSupport
Definition: ah_internal.h:230
uint32_t halHwPhyCounterSupport
Definition: ah_internal.h:248
uint32_t halMicCkipSupport
Definition: ah_internal.h:232
uint8_t halNumGpioPins
Definition: ah_internal.h:305
uint16_t halLow5GhzChan
Definition: ah_internal.h:298
uint32_t halFastFramesSupport
Definition: ah_internal.h:227
uint32_t halIntrMask
Definition: ah_internal.h:308
uint32_t halForcePpmSupport
Definition: ah_internal.h:263
uint32_t halMicAesCcmSupport
Definition: ah_internal.h:231
uint16_t halHigh5GhzChan
Definition: ah_internal.h:298
uint32_t halCSTSupport
Definition: ah_internal.h:257
uint32_t halBssIdMaskSupport
Definition: ah_internal.h:240
uint32_t halCipherAesCcmSupport
Definition: ah_internal.h:235
uint32_t halRxDoMyBeacon
Definition: ah_internal.h:292
uint32_t halBtCoexSupport
Definition: ah_internal.h:253
uint32_t halTurboGSupport
Definition: ah_internal.h:229
uint16_t halLow2GhzChan
Definition: ah_internal.h:299
uint16_t halKeyCacheSize
Definition: ah_internal.h:297
uint32_t halCipherTkipSupport
Definition: ah_internal.h:237
uint32_t halVEOLSupport
Definition: ah_internal.h:239
uint16_t halTotalQueues
Definition: ah_internal.h:296
uint16_t halHigh2GhzChan
Definition: ah_internal.h:299
uint8_t halNumAntCfg5GHz
Definition: ah_internal.h:307
uint32_t halSerialiseRegWar
Definition: ah_internal.h:272
uint32_t halHTSupport
Definition: ah_internal.h:245
uint32_t halCipherCkipSupport
Definition: ah_internal.h:236
uint32_t halCompressSupport
Definition: ah_internal.h:225
uint8_t halTxStreams
Definition: ah_internal.h:309
uint32_t halFastCCSupport
Definition: ah_internal.h:252
uint32_t halWowSupport
Definition: ah_internal.h:249
uint32_t halGTTSupport
Definition: ah_internal.h:256
uint32_t halMcastKeySrchSupport
Definition: ah_internal.h:241
uint32_t halTsfAddSupport
Definition: ah_internal.h:242
uint32_t halWirelessModes
Definition: ah_internal.h:295
uint32_t halEnhancedPmSupport
Definition: ah_internal.h:264
uint32_t halSpectralScanSupport
Definition: ah_internal.h:290
uint32_t halTkipMicTxRxKeySupport
Definition: ah_internal.h:234
uint32_t halMicTkipSupport
Definition: ah_internal.h:233
uint32_t halChanHalfRate
Definition: ah_internal.h:243
uint32_t halHasRxSelfLinkedTail
Definition: ah_internal.h:269
uint32_t halChapTuningSupport
Definition: ah_internal.h:228
uint32_t halChanQuarterRate
Definition: ah_internal.h:244
uint8_t halNumAntCfg2GHz
Definition: ah_internal.h:306
uint8_t halTxChainMask
Definition: ah_internal.h:303
uint8_t halRxChainMask
Definition: ah_internal.h:304
uint32_t halHasBBReadWar
Definition: ah_internal.h:271
uint32_t halPSPollBroken
Definition: ah_internal.h:238
uint32_t halBurstSupport
Definition: ah_internal.h:226
uint32_t hal4kbSplitTransSupport
Definition: ah_internal.h:268
uint32_t halEnhancedDfsSupport
Definition: ah_internal.h:265
uint32_t halSleepAfterBeaconBroken
Definition: ah_internal.h:224
int maxNoiseImmunityLevel
Definition: ar5212.h:154
uint32_t ah_miscMode
Definition: ar5212.h:287
HAL_INI_ARRAY ah_ini_common
Definition: ar5212.h:252
uint8_t ah_macaddr[IEEE80211_ADDR_LEN]
Definition: ar5212.h:256
struct ath_hal_private ah_priv
Definition: ar5212.h:245
HAL_INI_ARRAY ah_ini_modes
Definition: ar5212.h:251
struct ath_hal_5212 ah_5212
Definition: ar5416.h:68
HAL_CAPABILITIES ah_caps
Definition: ah_internal.h:402
struct ath_hal h
Definition: ah_internal.h:358
u_int(* ah_getWirelessModes)(struct ath_hal *)
Definition: ah_internal.h:364
HAL_BOOL ah_rfkillEnabled
Definition: ah_internal.h:426
HAL_BOOL(* ah_eepromWrite)(struct ath_hal *, u_int off, uint16_t data)
Definition: ah_internal.h:367
HAL_BOOL(* ah_getChipPowerLimits)(struct ath_hal *, struct ieee80211_channel *)
Definition: ah_internal.h:369
uint8_t ah_ispcie
Definition: ah_internal.h:397
HAL_BOOL(* ah_eepromRead)(struct ath_hal *, u_int off, uint16_t *data)
Definition: ah_internal.h:365
uint16_t ah_rfsilent
Definition: ah_internal.h:425
Definition: ah.h:1219
HAL_BOOL __ahdecl(* ah_gpioCfgInput)(struct ath_hal *, uint32_t gpio)
Definition: ah.h:1372
void __ahdecl(* ah_setRxFilter)(struct ath_hal *, uint32_t)
Definition: ah.h:1336
HAL_BOOL __ahdecl(* ah_stopDmaReceive)(struct ath_hal *)
Definition: ah.h:1326
HAL_BOOL __ahdecl(* ah_gpioSet)(struct ath_hal *, uint32_t gpio, uint32_t val)
Definition: ah.h:1374
void __ahdecl(* ah_set11nRateScenario)(struct ath_hal *, struct ath_desc *, u_int, u_int, HAL_11N_RATE_SERIES[], u_int, u_int)
Definition: ah.h:1476
HAL_BOOL __ahdecl(* ah_fillTxDesc)(struct ath_hal *, struct ath_desc *, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg, const struct ath_desc *)
Definition: ah.h:1301
HAL_BOOL __ahdecl(* ah_isFastClockEnabled)(struct ath_hal *ah)
Definition: ah.h:1420
HAL_BOOL __ahdecl(* ah_resetCalValid)(struct ath_hal *, const struct ieee80211_channel *)
Definition: ah.h:1265
void __ahdecl(* ah_resetTsf)(struct ath_hal *)
Definition: ah.h:1380
HAL_BOOL __ahdecl(* ah_phyDisable)(struct ath_hal *)
Definition: ah.h:1254
HAL_BOOL __ahdecl(* ah_setupXTxDesc)(struct ath_hal *, struct ath_desc *, u_int txRate1, u_int txTries1, u_int txRate2, u_int txTries2, u_int txRate3, u_int txTries3)
Definition: ah.h:1297
void __ahdecl(* ah_btCoexSetConfig)(struct ath_hal *, HAL_BT_COEX_CONFIG *)
Definition: ah.h:1521
void __ahdecl(* ah_set11nRxClear)(struct ath_hal *, HAL_HT_RXCLEAR)
Definition: ah.h:1509
HAL_BOOL __ahdecl(* ah_chainTxDesc)(struct ath_hal *, struct ath_desc *, HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, u_int, u_int, HAL_PKT_TYPE, u_int, HAL_CIPHER, uint8_t, HAL_BOOL, HAL_BOOL, HAL_BOOL)
Definition: ah.h:1464
void __ahdecl(* ah_btCoexSetParameter)(struct ath_hal *, uint32_t, uint32_t)
Definition: ah.h:1529
void __ahdecl(* ah_set11nAggrMiddle)(struct ath_hal *, struct ath_desc *, u_int)
Definition: ah.h:1491
HAL_BOOL __ahdecl(* ah_getTxCompletionRates)(struct ath_hal *, const struct ath_desc *ds, int *rates, int *tries)
Definition: ah.h:1309
void __ahdecl(* ah_set11nMac2040)(struct ath_hal *, HAL_HT_MACMODE)
Definition: ah.h:1506
HAL_BOOL __ahdecl(* ah_resetTxQueue)(struct ath_hal *ah, u_int q)
Definition: ah.h:1283
HAL_BOOL __ahdecl(* ah_setKeyCacheEntry)(struct ath_hal *, uint16_t, const HAL_KEYVAL *, const uint8_t *, int)
Definition: ah.h:1439
HAL_STATUS __ahdecl(* ah_procTxDesc)(struct ath_hal *, struct ath_desc *, struct ath_tx_status *)
Definition: ah.h:1305
HAL_INT __ahdecl(* ah_setInterrupts)(struct ath_hal *, HAL_INT)
Definition: ah.h:1516
void __ahdecl(* ah_spectralStart)(struct ath_hal *)
Definition: ah.h:1428
HAL_BOOL __ahdecl(* ah_isInterruptPending)(struct ath_hal *)
Definition: ah.h:1513
void __ahdecl(* ah_startPcuReceive)(struct ath_hal *, HAL_BOOL)
Definition: ah.h:1327
HAL_BOOL __ahdecl(* ah_setupFirstTxDesc)(struct ath_hal *, struct ath_desc *, u_int, u_int, u_int, u_int, u_int, u_int, u_int, u_int)
Definition: ah.h:1471
HAL_STATUS __ahdecl(* ah_getCapability)(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t capability, uint32_t *result)
Definition: ah.h:1352
void __ahdecl(* ah_beaconInit)(struct ath_hal *, uint32_t nexttbtt, uint32_t intval)
Definition: ah.h:1456
HAL_BOOL __ahdecl(* ah_setCapability)(struct ath_hal *, HAL_CAPABILITY_TYPE, uint32_t capability, uint32_t setting, HAL_STATUS *)
Definition: ah.h:1355
HAL_BOOL __ahdecl(* ah_setTxPower)(struct ath_hal *, const struct ieee80211_channel *, uint16_t *)
Definition: ah.h:1267
void __ahdecl(* ah_spectralStop)(struct ath_hal *)
Definition: ah.h:1429
void __ahdecl(* ah_rxMonitor)(struct ath_hal *, const HAL_NODE_STATS *, const struct ieee80211_channel *)
Definition: ah.h:1343
HAL_BOOL __ahdecl(* ah_setAntennaSwitch)(struct ath_hal *, HAL_ANT_SETTING)
Definition: ah.h:1388
int __ahdecl(* ah_btCoexEnable)(struct ath_hal *)
Definition: ah.h:1532
uint64_t __ahdecl(* ah_getNextTBTT)(struct ath_hal *)
Definition: ah.h:1461
void __ahdecl(* ah_clr11nAggr)(struct ath_hal *, struct ath_desc *)
Definition: ah.h:1495
void __ahdecl(* ah_setTsf64)(struct ath_hal *, uint64_t)
Definition: ah.h:1379
HAL_BOOL __ahdecl(* ah_spectralIsEnabled)(struct ath_hal *)
Definition: ah.h:1430
HAL_RFGAIN __ahdecl(* ah_getRfGain)(struct ath_hal *)
Definition: ah.h:1384
HAL_BOOL __ahdecl(* ah_setupLastTxDesc)(struct ath_hal *, struct ath_desc *, const struct ath_desc *)
Definition: ah.h:1474
uint32_t ah_magic
Definition: ah.h:1220
HAL_BOOL __ahdecl(* ah_resetKeyCacheEntry)(struct ath_hal *, uint16_t)
Definition: ah.h:1436
int __ahdecl(* ah_setupTxQueue)(struct ath_hal *, HAL_TX_QUEUE, const HAL_TXQ_INFO *qInfo)
Definition: ah.h:1276
HAL_BOOL __ahdecl(* ah_spectralIsActive)(struct ath_hal *)
Definition: ah.h:1431
HAL_STATUS __ahdecl(* ah_setQuiet)(struct ath_hal *ah, uint32_t period, uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag)
Definition: ah.h:1402
void __ahdecl(* ah_btCoexSetWeights)(struct ath_hal *, uint32_t)
Definition: ah.h:1525
HAL_BOOL __ahdecl(* ah_getDiagState)(struct ath_hal *, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize)
Definition: ah.h:1358
uint32_t __ahdecl(* ah_get11nExtBusy)(struct ath_hal *)
Definition: ah.h:1505
HAL_OPS_CONFIG ah_config
Definition: ah.h:1243
void __ahdecl(* ah_setCoverageClass)(struct ath_hal *, uint8_t, int)
Definition: ah.h:1401
void __ahdecl(* ah_spectralGetConfig)(struct ath_hal *ah, HAL_SPECTRAL_PARAM *sp)
Definition: ah.h:1426
HAL_BOOL __ahdecl(* ah_procRadarEvent)(struct ath_hal *ah, struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
Definition: ah.h:1417
uint32_t __ahdecl(* ah_gpioGet)(struct ath_hal *, uint32_t gpio)
Definition: ah.h:1373
HAL_BOOL __ahdecl(* ah_perCalibration)(struct ath_hal *, struct ieee80211_channel *, HAL_BOOL *)
Definition: ah.h:1260
void __ahdecl(* ah_btCoexSetQcuThresh)(struct ath_hal *, int)
Definition: ah.h:1523
HAL_HT_RXCLEAR __ahdecl(* ah_get11nRxClear)(struct ath_hal *ah)
Definition: ah.h:1508
void __ahdecl(* ah_aniPoll)(struct ath_hal *, const struct ieee80211_channel *)
Definition: ah.h:1346
void __ahdecl(* ah_btCoexSetInfo)(struct ath_hal *, HAL_BT_COEX_INFO *)
Definition: ah.h:1519
HAL_BOOL __ahdecl(* ah_disable)(struct ath_hal *)
Definition: ah.h:1255
void __ahdecl(* ah_setBeaconTimers)(struct ath_hal *, const HAL_BEACON_TIMERS *)
Definition: ah.h:1453
void __ahdecl(* ah_set11nVirtMoreFrag)(struct ath_hal *, struct ath_desc *, u_int)
Definition: ah.h:1499
HAL_BOOL __ahdecl(* ah_setTxPowerLimit)(struct ath_hal *, uint32_t)
Definition: ah.h:1269
void __ahdecl(* ah_set11nBurstDuration)(struct ath_hal *, struct ath_desc *, u_int)
Definition: ah.h:1497
void __ahdecl(* ah_detach)(struct ath_hal *)
Definition: ah.h:1246
void __ahdecl(* ah_setStationBeaconTimers)(struct ath_hal *, const HAL_BEACON_STATE *)
Definition: ah.h:1458
void __ahdecl(* ah_disablePCIE)(struct ath_hal *)
Definition: ah.h:1258
HAL_BOOL __ahdecl(* ah_gpioCfgOutput)(struct ath_hal *, uint32_t gpio, HAL_GPIO_MUX_TYPE)
Definition: ah.h:1370
void __ahdecl(* ah_resetStationBeaconTimers)(struct ath_hal *)
Definition: ah.h:1460
void __ahdecl(* ah_getDfsThresh)(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ah.h:1413
HAL_BOOL __ahdecl(* ah_getPendingInterrupts)(struct ath_hal *, HAL_INT *)
Definition: ah.h:1514
HAL_BOOL __ahdecl(* ah_setDecompMask)(struct ath_hal *, uint16_t, int)
Definition: ah.h:1400
void __ahdecl(* ah_setChainMasks)(struct ath_hal *, uint32_t, uint32_t)
Definition: ah.h:1405
HAL_BOOL __ahdecl(* ah_stopTxDma)(struct ath_hal *, u_int)
Definition: ah.h:1288
uint32_t __ahdecl(* ah_getRxFilter)(struct ath_hal *)
Definition: ah.h:1335
HAL_STATUS __ahdecl(* ah_procRxDesc)(struct ath_hal *, struct ath_desc *, uint32_t phyAddr, struct ath_desc *next, uint64_t tsf, struct ath_rx_status *)
Definition: ah.h:1339
HAL_BOOL __ahdecl(* ah_perCalibrationN)(struct ath_hal *, struct ieee80211_channel *, u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone)
Definition: ah.h:1262
HAL_BOOL __ahdecl(* ah_setupRxDesc)(struct ath_hal *, struct ath_desc *, uint32_t size, u_int flags)
Definition: ah.h:1337
void __ahdecl(* ah_enableDfs)(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ah.h:1411
uint64_t __ahdecl(* ah_getTsf64)(struct ath_hal *)
Definition: ah.h:1378
const HAL_RATE_TABLE *__ahdecl(* ah_getRateTable)(struct ath_hal *, u_int mode)
Definition: ah.h:1244
void __ahdecl(* ah_spectralConfigure)(struct ath_hal *ah, HAL_SPECTRAL_PARAM *sp)
Definition: ah.h:1424
HAL_BOOL __ahdecl(* ah_setupTxDesc)(struct ath_hal *, struct ath_desc *, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx, u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, u_int compivLen, u_int comp)
Definition: ah.h:1289
void __ahdecl(* ah_btCoexDisable)(struct ath_hal *)
Definition: ah.h:1531
void __ahdecl(* ah_gpioSetIntr)(struct ath_hal *, u_int, uint32_t)
Definition: ah.h:1376
void __ahdecl(* ah_configPCIE)(struct ath_hal *, HAL_BOOL restore, HAL_BOOL power_off)
Definition: ah.h:1256
void __ahdecl(* ah_setLedState)(struct ath_hal *, HAL_LED_STATE)
Definition: ah.h:1367
void __ahdecl(* ah_stopPcuReceive)(struct ath_hal *)
Definition: ah.h:1328
void __ahdecl(* ah_set11nAggrLast)(struct ath_hal *, struct ath_desc *)
Definition: ah.h:1493
HAL_BOOL __ahdecl(* ah_getDfsDefaultThresh)(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
Definition: ah.h:1415
void __ahdecl(* ah_procMibEvent)(struct ath_hal *, const HAL_NODE_STATS *)
Definition: ah.h:1348
HAL_BOOL __ahdecl(* ah_setPowerMode)(struct ath_hal *, HAL_POWER_MODE mode, int setChip)
Definition: ah.h:1446
HAL_BOOL __ahdecl(* ah_setBoardValues)(struct ath_hal *, const struct ieee80211_channel *)
Definition: ah.h:1270
void __ahdecl(* ah_set11nAggrFirst)(struct ath_hal *, struct ath_desc *, u_int, u_int)
Definition: ah.h:1489
HAL_BOOL __ahdecl(* ah_reset)(struct ath_hal *, HAL_OPMODE, struct ieee80211_channel *, HAL_BOOL bChannelChange, HAL_RESET_TYPE resetType, HAL_STATUS *status)
Definition: ah.h:1249
HAL_BOOL __ahdecl(* ah_getMibCycleCounts)(struct ath_hal *, HAL_SURVEY_SAMPLE *)
Definition: ah.h:1502
void __ahdecl(* ah_btCoexSetBmissThresh)(struct ath_hal *, uint32_t)
Definition: ah.h:1527
int rows
int cols
uint32_t * data