Lines Matching defs:ah

23 #include "ah.h"
35 static HAL_BOOL ar5210GetChipPowerLimits(struct ath_hal *ah,
38 static void ar5210ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore,
40 static void ar5210DisablePCIE(struct ath_hal *ah);
182 static HAL_BOOL ar5210FillCapabilityInfo(struct ath_hal *ah);
193 struct ath_hal *ah;
211 ah = &ahp->ah_priv.h;
214 ah->ah_sc = sc;
215 ah->ah_st = st;
216 ah->ah_sh = sh;
218 ah->ah_devid = devid; /* NB: for AH_DEBUG_ALQ */
219 AH_PRIVATE(ah)->ah_devid = devid;
220 AH_PRIVATE(ah)->ah_subvendorid = 0; /* XXX */
222 AH_PRIVATE(ah)->ah_powerLimit = AR5210_MAX_RATE_POWER;
223 AH_PRIVATE(ah)->ah_tpScale = HAL_TP_SCALE_MAX; /* no scaling */
225 ah->ah_powerMode = HAL_PM_UNDEFINED;
233 if (!ar5210ChipReset(ah, AH_NULL)) { /* reset chip */
234 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n",
241 AH_PRIVATE(ah)->ah_macVersion = 1;
242 AH_PRIVATE(ah)->ah_macRev = OS_REG_READ(ah, AR_SREV) & 0xff;
243 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIPID);
244 AH_PRIVATE(ah)->ah_analog2GhzRev = 0;
247 OS_REG_WRITE(ah, (AR_PHY_BASE + (0x34 << 2)), 0x00001c16);
249 OS_REG_WRITE(ah, (AR_PHY_BASE + (0x20 << 2)), 0x00010000);
250 revid = (OS_REG_READ(ah, AR_PHY_BASE + (256 << 2)) >> 28) & 0xf;
253 AH_PRIVATE(ah)->ah_analog5GhzRev = ath_hal_reverseBits(revid, 4) + 1;
259 pcicfg = OS_REG_READ(ah, AR_PCICFG);
260 OS_REG_WRITE(ah, AR_PCICFG, pcicfg | AR_PCICFG_EEPROMSEL);
261 ecode = ath_hal_v1EepromAttach(ah);
265 ecode = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, &eeval);
267 HALDEBUG(ah, HAL_DEBUG_ANY,
272 AH_PRIVATE(ah)->ah_currentRD = eeval;
273 ecode = ath_hal_eepromGet(ah, AR_EEP_MACADDR, ahp->ah_macaddr);
275 HALDEBUG(ah, HAL_DEBUG_ANY,
279 OS_REG_WRITE(ah, AR_PCICFG, pcicfg); /* disable EEPROM access */
281 AH_PRIVATE(ah)->ah_getNfAdjust = ar5210GetNfAdjust;
286 (void) ar5210FillCapabilityInfo(ah);
288 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__);
290 return ah;
292 OS_REG_WRITE(ah, AR_PCICFG, pcicfg); /* disable EEPROM access */
303 ar5210Detach(struct ath_hal *ah)
305 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s:\n", __func__);
307 HALASSERT(ah != AH_NULL);
308 HALASSERT(ah->ah_magic == AR5210_MAGIC);
310 ath_hal_eepromDetach(ah);
311 ath_hal_free(ah);
318 ar5210GetChannelEdges(struct ath_hal *ah,
331 ar5210GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan)
334 HALDEBUG(ah, HAL_DEBUG_ATTACH,
343 ar5210ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore, HAL_BOOL power_off)
348 ar5210DisablePCIE(struct ath_hal *ah)
356 ar5210FillCapabilityInfo(struct ath_hal *ah)
358 struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
384 if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL)) {