Lines Matching defs:ah

26 #include "ah.h"
41 #define AR9287(ah) ((struct ar9287State *) AH5212(ah)->ah_rfHal)
45 int16_t ar9287GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c);
48 ar9287WriteRegs(struct ath_hal *ah, u_int modesIndex, u_int freqIndex,
51 (void) ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_bb_rfgain,
75 ar9287SetChannel(struct ath_hal *ah, const struct ieee80211_channel *chan)
82 OS_MARK(ah, AH_MARK_SETCHANNEL, chan->ic_freq);
84 ar5416GetChannelCenters(ah, chan, &centers);
87 reg32 = OS_REG_READ(ah, AR_PHY_SYNTH_CONTROL);
99 if (AR_SREV_KIWI_11_OR_LATER(ah)) {
101 ath_hal_ini_write(ah,
102 &AH9287(ah)->ah_ini_cckFirJapan2484, 1,
105 ath_hal_ini_write(ah,
106 &AH9287(ah)->ah_ini_cckFirNormal, 1,
111 txctl = OS_REG_READ(ah, AR_PHY_CCK_TX_CTRL);
114 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
117 OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
139 OS_A_REG_RMW_FIELD(ah, AR_AN_SYNTH9,
153 OS_REG_WRITE(ah, AR_PHY_SYNTH_CONTROL, reg32);
155 AH_PRIVATE(ah)->ah_curchan = chan;
164 ar9287GetRfBank(struct ath_hal *ah, int bank)
166 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown RF Bank %d requested\n",
176 ar9287SetRfRegs(struct ath_hal *ah, const struct ieee80211_channel *chan,
189 ar9287SetPowerTable(struct ath_hal *ah, int16_t *pPowerMin, int16_t *pPowerMax,
197 ar9287GetMinPower(struct ath_hal *ah, EXPN_DATA_PER_CHANNEL_5112 *data)
224 ar9287GetChannelMaxMinPower(struct ath_hal *ah,
229 struct ath_hal_5212 *ahp = AH5212(ah);
269 totalMin = ar9287GetMinPower(ah,&data[i]) - ar9287GetMinPower(ah, &data[last]);
270 *minPow = (int8_t) ((totalMin*(chan->channel-data[last].channelValue) + ar9287GetMinPower(ah, &data[last])*totalD)/totalD);
275 *minPow = ar9287GetMinPower(ah, &data[i]);
297 ar9287GetNoiseFloor(struct ath_hal *ah, int16_t nfarray[])
301 nf = MS(OS_REG_READ(ah, AR_PHY_CCA), AR9280_PHY_MINCCA_PWR);
304 HALDEBUG(ah, HAL_DEBUG_NFCAL,
308 nf = MS(OS_REG_READ(ah, AR_PHY_CH1_CCA), AR9280_PHY_CH1_MINCCA_PWR);
311 HALDEBUG(ah, HAL_DEBUG_NFCAL,
315 nf = MS(OS_REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR);
318 HALDEBUG(ah, HAL_DEBUG_NFCAL,
322 nf = MS(OS_REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR);
325 HALDEBUG(ah, HAL_DEBUG_NFCAL,
340 ar9287GetNfAdjust(struct ath_hal *ah, const HAL_CHANNEL_INTERNAL *c)
349 ar9287RfDetach(struct ath_hal *ah)
351 struct ath_hal_5212 *ahp = AH5212(ah);
359 ar9287RfAttach(struct ath_hal *ah, HAL_STATUS *status)
361 struct ath_hal_5212 *ahp = AH5212(ah);
364 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: attach AR9280 radio\n", __func__);
369 HALDEBUG(ah, HAL_DEBUG_ANY,
390 AH_PRIVATE(ah)->ah_getNfAdjust = priv->base.getNfAdjust;
391 AH_PRIVATE(ah)->ah_getNoiseFloor = ar9287GetNoiseFloor;
397 ar9287RfProbe(struct ath_hal *ah)
399 return (AR_SREV_KIWI(ah));