Lines Matching +full:analog +full:- +full:pass
1 /*-
2 * SPDX-License-Identifier: ISC
4 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
5 * Copyright (c) 2002-2008 Atheros Communications, Inc.
38 #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
41 #define howmany(x, y) (((x)+((y)-1))/(y))
45 #define offsetof(type, field) ((size_t)(&((type *)0)->field))
66 HAL_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
67 HAL_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
68 HAL_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
85 * Compiled-in versions will include a linker set to iterate through the
111 * used by multi-chip 5212 solutions. Single-chip solutions
155 * has to pre-populate the per-channel list with nominal values.
177 #define AH_HOME_CHAN_NFCAL_HIST(ah, ichan) (ichan ? &ichan->nf_cal_hist: NULL)
180 #define AH_HOME_CHAN_NFCAL_HIST(ah, ichan) (&AH_PRIVATE(ah)->nf_cal_hist)
184 * Internal per-channel state. These are found
213 /* all full-width channels */
215 (IEEE80211_CHAN_ALL - (IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER))
217 (IEEE80211_CHAN_ALLTURBO - \
338 * used by device-independent code such as the regulatory domain support.
343 * When declaring a device-specific ath_hal data structure this structure
352 * using an indirect pointer to a read-only data structure but this would
353 * disallow class-style method overriding.
396 uint8_t ah_devType; /* card type - CB, PCI, PCIe */
401 uint32_t ah_diagreg; /* user-specified AR_DIAG_SW */
405 u_int16_t ah_extraTxPow; /* low rates extra-txpower */
435 * Channel survey history - current channel only.
443 AH_PRIVATE(_ah)->ah_getChannelEdges(_ah, _cf, _lc, _hc)
445 AH_PRIVATE(_ah)->ah_getWirelessModes(_ah)
447 AH_PRIVATE(_ah)->ah_eepromRead(_ah, _off, _data)
449 AH_PRIVATE(_ah)->ah_eepromWrite(_ah, _off, _data)
451 (_ah)->ah_gpioCfgOutput(_ah, _gpio, _type)
453 (_ah)->ah_gpioCfgInput(_ah, _gpio)
455 (_ah)->ah_gpioGet(_ah, _gpio)
457 (_ah)->ah_gpioSet(_ah, _gpio, _val)
459 (_ah)->ah_gpioSetIntr(_ah, _gpio, _ilevel)
461 AH_PRIVATE(_ah)->ah_getChipPowerLimits(_ah, _chan)
463 AH_PRIVATE(_ah)->ah_getNfAdjust(_ah, _c)
465 AH_PRIVATE(_ah)->ah_getNoiseFloor(_ah, _nfArray)
467 (_ah)->ah_configPCIE(_ah, _reset, _poweroff)
469 (_ah)->ah_disablePCIE(_ah)
471 (_ah)->ah_setInterrupts(_ah, _mask)
481 if (AH_PRIVATE(_ah)->ah_eepromDetach != AH_NULL) \
482 AH_PRIVATE(_ah)->ah_eepromDetach(_ah); \
485 AH_PRIVATE(_ah)->ah_eepromGet(_ah, _param, _val)
487 AH_PRIVATE(_ah)->ah_eepromSet(_ah, _param, _val)
489 (AH_PRIVATE(_ah)->ah_eepromGet(_ah, _param, AH_NULL) == HAL_OK)
491 AH_PRIVATE(_ah)->ah_getSpurChan(_ah, _ix, _is2G)
493 AH_PRIVATE(_ah)->ah_eepromDiag(_ah, _request, _a, _asize, _r, _rsize)
503 #define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */
552 #define IS_CHAN_5GHZ(_c) ((_c)->channel > 4900)
558 * Deduce if the host cpu has big- or litt-endian byte order.
607 /* Analog register writes may require a delay between each one (eg Merlin?) */
640 * The typecast is purely because some callers will pass in
648 ((struct ath_hal *) (_ah))->ah_config.ah_debug & (__m))) { \
713 HALASSERT(c->ic_devdata < AH_PRIVATE(ah)->ah_nchan); in ath_hal_checkchannel()
714 cc = &AH_PRIVATE(ah)->ah_channels[c->ic_devdata]; in ath_hal_checkchannel()
715 HALASSERT(c->ic_freq == cc->channel || IEEE80211_IS_CHAN_GSM(c)); in ath_hal_checkchannel()
719 /* NB: non-inline version that checks state */
727 * takes 2.4GHz frequencies and down-converts them.
732 return ath_hal_checkchannel(ah, c)->channel; in ath_hal_gethwchannel()
737 * this routine to support chip-specific capabilities.
746 /* The diagnostic codes used to be internally defined here -adrian */
909 (_ia)->data = (const uint32_t *)(_data); \
910 (_ia)->rows = sizeof(_data) / sizeof((_data)[0]); \
911 (_ia)->cols = (_cols); \
914 ((_ia)->data[((_r)*(_ia)->cols) + (_c)])
996 AH_PRIVATE((_ah))->ah_caps.halSupportsFastClock5GHz && \
1007 struct ath_hal *ah = &ahp->h; in ath_hal_get_twice_max_regpower()
1013 return (chan->ic_maxpower); in ath_hal_get_twice_max_regpower()
1027 return (chan->ic_maxantgain); in ath_hal_getantennaallowed()
1047 * Chip registration - for modules.