Home | History | Annotate | Download | only in dist

Lines Matching defs:ah

17  * $Id: ah.c,v 1.3 2011/03/07 11:25:42 cegger Exp $
21 #include "ah.h"
60 struct ath_hal *ah;
65 ah = chip->attach(devid, sc, st, sh, error);
66 if (ah != AH_NULL) {
68 ah->ah_devid = AH_PRIVATE(ah)->ah_devid;
69 ah->ah_subvendorid = AH_PRIVATE(ah)->ah_subvendorid;
70 ah->ah_macVersion = AH_PRIVATE(ah)->ah_macVersion;
71 ah->ah_macRev = AH_PRIVATE(ah)->ah_macRev;
72 ah->ah_phyRev = AH_PRIVATE(ah)->ah_phyRev;
73 ah->ah_analog5GhzRev = AH_PRIVATE(ah)->ah_analog5GhzRev;
74 ah->ah_analog2GhzRev = AH_PRIVATE(ah)->ah_analog2GhzRev;
75 return ah;
89 ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode)
96 if (rf->probe(ah))
108 ath_hal_wait(struct ath_hal *ah, u_int reg, uint32_t mask, uint32_t val)
114 if ((OS_REG_READ(ah, reg) & mask) == val)
118 HALDEBUG(ah, HAL_DEBUG_REGIO | HAL_DEBUG_PHYIO,
120 __func__, reg, OS_REG_READ(ah, reg), mask, val);
147 ath_hal_computetxtime(struct ath_hal *ah,
192 if (AH_PRIVATE(ah)->ah_curchan &&
193 IS_CHAN_QUARTER_RATE(AH_PRIVATE(ah)->ah_curchan)) {
202 } else if (AH_PRIVATE(ah)->ah_curchan &&
203 IS_CHAN_HALF_RATE(AH_PRIVATE(ah)->ah_curchan)) {
248 HALDEBUG(ah, HAL_DEBUG_PHYIO,
280 ath_hal_mhz2ieee(struct ath_hal *ah, u_int freq, u_int flags)
286 if (ath_hal_isgsmsku(ah))
292 if (ath_hal_ispublicsafetysku(ah) &&
304 if (ath_hal_isgsmsku(ah))
309 if (ath_hal_ispublicsafetysku(ah) &&
333 ath_hal_chan2wmode(struct ath_hal *ah, const HAL_CHANNEL *chan)
353 ath_hal_mac_clks(struct ath_hal *ah, u_int usecs)
355 const HAL_CHANNEL *c = (const HAL_CHANNEL *) AH_PRIVATE(ah)->ah_curchan;
360 clks = usecs * CLOCK_RATE[ath_hal_chan2wmode(ah, c)];
373 ath_hal_mac_usec(struct ath_hal *ah, u_int clks)
375 const HAL_CHANNEL *c = (const HAL_CHANNEL *) AH_PRIVATE(ah)->ah_curchan;
380 usec = clks / CLOCK_RATE[ath_hal_chan2wmode(ah, c)];
404 ath_hal_setupratetable(struct ath_hal *ah, HAL_RATE_TABLE *rt)
428 rt->info[i].lpAckDuration = ath_hal_computetxtime(ah, rt,
430 rt->info[i].spAckDuration = ath_hal_computetxtime(ah, rt,
437 ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
440 const HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
444 *result = AH_PRIVATE(ah)->ah_currentRD;
474 *result = AH_PRIVATE(ah)->ah_diagreg;
481 *result = AH_PRIVATE(ah)->ah_powerLimit;
484 *result = AH_PRIVATE(ah)->ah_maxPowerLevel;
487 *result = AH_PRIVATE(ah)->ah_tpScale;
502 return AH_PRIVATE(ah)->ah_rfkillEnabled ?
505 *result = AH_PRIVATE(ah)->ah_rfsilent;
516 return AH_PRIVATE(ah)->ah_rxornIsFatal ? HAL_OK : HAL_ENOTSUPP;
539 ath_hal_setcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
548 AH_PRIVATE(ah)->ah_tpScale = setting;
561 AH_PRIVATE(ah)->ah_rfkillEnabled = (setting != 0);
565 ah)->ah_rfsilent = setting;
570 AH_PRIVATE(ah)->ah_currentRD = setting;
573 AH_PRIVATE(ah)->ah_rxornIsFatal = setting;
588 ath_hal_getregdump(struct ath_hal *ah, const HAL_REGRANGE *regs,
600 *dp++ = OS_REG_READ(ah, r);
609 ath_hal_getdiagstate(struct ath_hal *ah, int request,
615 *result = &AH_PRIVATE(ah)->ah_devid;
619 *resultsize = ath_hal_getregdump(ah, args, *result,*resultsize);
622 *result = &AH_PRIVATE(ah)->ah_fatalState[0];
623 *resultsize = sizeof(AH_PRIVATE(ah)->ah_fatalState);
628 if (!ath_hal_eepromRead(ah, *(const uint16_t *)args, *result))
639 return ah->ah_setKeyCacheEntry(ah, dk->dk_keyix,
645 return ah->ah_resetKeyCacheEntry(ah, *(const uint16_t *)args);
652 return ath_hal_eepromWrite(ah, ee->ee_off, ee->ee_data);
660 AH_PRIVATE(ah)->ah_11nCompat;
662 AH_PRIVATE(ah)->ah_11nCompat = *(const uint32_t *)args;
675 ath_hal_setTxQProps(struct ath_hal *ah,
681 HALDEBUG(ah, HAL_DEBUG_TXQUEUE,
736 ath_hal_getTxQProps(struct ath_hal *ah,
740 HALDEBUG(ah, HAL_DEBUG_TXQUEUE,
774 ath_hal_getChanNoise(struct ath_hal *ah, HAL_CHANNEL *chan)
778 ichan = ath_hal_checkchannel(ah, chan);
780 HALDEBUG(ah, HAL_DEBUG_NFCAL,
786 WIRELESS_MODE mode = ath_hal_chan2wmode(ah, chan);
789 return NOISE_FLOOR[mode] + ath_hal_getNfAdjust(ah, ichan);
801 ath_hal_process_noisefloor(struct ath_hal *ah)
814 for (i = 0; i < AH_PRIVATE(ah)->ah_nchan; i++) {
818 c = &AH_PRIVATE(ah)->ah_channels[i];
821 mode = ath_hal_chan2wmode(ah, (HAL_CHANNEL *) c);
824 ath_hal_getNfAdjust(ah, c);
829 (c->rawNoiseFloor + ath_hal_getNfAdjust(ah, c));
835 (c->rawNoiseFloor + ath_hal_getNfAdjust(ah, c));
841 for (i = 0; i < AH_PRIVATE(ah)->ah_nchan; i++) {
842 c = &AH_PRIVATE(ah)->ah_channels[i];
846 c->noiseFloorAdjust = ath_hal_getNfAdjust(ah, c) +
848 HALDEBUG(ah, HAL_DEBUG_NFCAL, "%u/0x%x raw nf %d adjust %d\n",
859 ath_hal_ini_write(struct ath_hal *ah, const HAL_INI_ARRAY *ia,
865 OS_REG_WRITE(ah, HAL_INI_VAL(ia, r, 0),
882 ath_hal_ini_bank_write(struct ath_hal *ah, const HAL_INI_ARRAY *ia,
888 OS_REG_WRITE(ah, HAL_INI_VAL(ia, r, 0), data[r]);