Lines Matching defs:ah

24 #include "ah.h"
39 #define AR9287(ah) ((struct ar9287State *) AH5212(ah)->ah_rfHal)
43 int16_t ar9287GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c);
46 ar9287WriteRegs(struct ath_hal *ah, u_int modesIndex, u_int freqIndex,
49 (void) ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_bb_rfgain,
73 ar9287SetChannel(struct ath_hal *ah, const struct ieee80211_channel *chan)
80 OS_MARK(ah, AH_MARK_SETCHANNEL, chan->ic_freq);
82 ar5416GetChannelCenters(ah, chan, &centers);
85 reg32 = OS_REG_READ(ah, AR_PHY_SYNTH_CONTROL);
97 if (AR_SREV_KIWI_11_OR_LATER(ah)) {
99 ath_hal_ini_write(ah,
100 &AH9287(ah)->ah_ini_cckFirJapan2484, 1,
103 ath_hal_ini_write(ah,
104 &AH9287(ah)->ah_ini_cckFirNormal, 1,
109 txctl = OS_REG_READ(ah, AR_PHY_CCK_TX_CTRL);
112 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
115 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
137 OS_A_REG_RMW_FIELD(ah, AR_AN_SYNTH9,
151 OS_REG_WRITE(ah, AR_PHY_SYNTH_CONTROL, reg32);
153 AH_PRIVATE(ah)->ah_curchan = chan;
162 ar9287GetRfBank(struct ath_hal *ah, int bank)
164 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown RF Bank %d requested\n",
174 ar9287SetRfRegs(struct ath_hal *ah, const struct ieee80211_channel *chan,
187 ar9287SetPowerTable(struct ath_hal *ah, int16_t *pPowerMin, int16_t *pPowerMax,
195 ar9287GetMinPower(struct ath_hal *ah, EXPN_DATA_PER_CHANNEL_5112 *data)
222 ar9287GetChannelMaxMinPower(struct ath_hal *ah,
227 struct ath_hal_5212 *ahp = AH5212(ah);
267 totalMin = ar9287GetMinPower(ah,&data[i]) - ar9287GetMinPower(ah, &data[last]);
268 *minPow = (int8_t) ((totalMin*(chan->channel-data[last].channelValue) + ar9287GetMinPower(ah, &data[last])*totalD)/totalD);
273 *minPow = ar9287GetMinPower(ah, &data[i]);
295 ar9287GetNoiseFloor(struct ath_hal *ah, int16_t nfarray[])
299 nf = MS(OS_REG_READ(ah, AR_PHY_CCA), AR9280_PHY_MINCCA_PWR);
302 HALDEBUG(ah, HAL_DEBUG_NFCAL,
306 nf = MS(OS_REG_READ(ah, AR_PHY_CH1_CCA), AR9280_PHY_CH1_MINCCA_PWR);
309 HALDEBUG(ah, HAL_DEBUG_NFCAL,
313 nf = MS(OS_REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR);
316 HALDEBUG(ah, HAL_DEBUG_NFCAL,
320 nf = MS(OS_REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR);
323 HALDEBUG(ah, HAL_DEBUG_NFCAL,
338 ar9287GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c)
347 ar9287RfDetach(struct ath_hal *ah)
349 struct ath_hal_5212 *ahp = AH5212(ah);
357 ar9287RfAttach(struct ath_hal *ah, HAL_STATUS *status)
359 struct ath_hal_5212 *ahp = AH5212(ah);
362 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: attach AR9280 radio\n", __func__);
367 HALDEBUG(ah, HAL_DEBUG_ANY,
388 AH_PRIVATE(ah)->ah_getNfAdjust = priv->base.getNfAdjust;
389 AH_PRIVATE(ah)->ah_getNoiseFloor = ar9287GetNoiseFloor;
395 ar9287RfProbe(struct ath_hal *ah)
397 return (AR_SREV_KIWI(ah));