• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/wireless/ath/ath9k/

Lines Matching defs:ah

20 void ar9003_paprd_enable(struct ath_hw *ah, bool val)
22 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0,
24 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B1,
26 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B2,
31 static void ar9003_paprd_setup_single_table(struct ath_hw *ah)
33 struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
48 if (ah->curchan && IS_CHAN_5GHZ(ah->curchan))
56 REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2AM, AR_PHY_PAPRD_AM2AM_MASK, am_mask);
57 REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK, am_mask);
58 REG_RMW_FIELD(ah, AR_PHY_PAPRD_HT40, AR_PHY_PAPRD_HT40_MASK, ht40_mask);
61 REG_RMW_FIELD(ah, ctrl0[i],
63 REG_RMW_FIELD(ah, ctrl1[i],
65 REG_RMW_FIELD(ah, ctrl1[i],
67 REG_RMW_FIELD(ah, ctrl1[i],
69 REG_RMW_FIELD(ah, ctrl1[i],
71 REG_RMW_FIELD(ah, ctrl1[i],
73 REG_RMW_FIELD(ah, ctrl1[i],
75 REG_RMW_FIELD(ah, ctrl0[i],
79 ar9003_paprd_enable(ah, false);
81 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
83 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
85 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
87 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
89 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
91 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
93 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
95 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL2,
97 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
99 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
101 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
103 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
105 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
107 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
110 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
112 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL4,
114 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL4,
116 REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL4,
119 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_0_B0,
121 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_1_B0,
123 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_2_B0,
125 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_3_B0,
127 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_4_B0,
129 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_5_B0,
131 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_6_B0,
133 REG_RMW_FIELD(ah, AR_PHY_PAPRD_PRE_POST_SCALE_7_B0,
137 static void ar9003_paprd_get_gain_table(struct ath_hw *ah)
139 u32 *entry = ah->paprd_gain_table_entries;
140 u8 *index = ah->paprd_gain_table_index;
144 memset(entry, 0, sizeof(ah->paprd_gain_table_entries));
145 memset(index, 0, sizeof(ah->paprd_gain_table_index));
148 entry[i] = REG_READ(ah, reg);
154 static unsigned int ar9003_get_desired_gain(struct ath_hw *ah, int chain,
165 REG_CLR_BIT(ah, AR_PHY_PAPRD_TRAINER_STAT1,
167 desired_scale = REG_READ_FIELD(ah, AR_PHY_TPC_12,
169 alpha_therm = REG_READ_FIELD(ah, AR_PHY_TPC_19,
171 alpha_volt = REG_READ_FIELD(ah, AR_PHY_TPC_19,
173 therm_cal_value = REG_READ_FIELD(ah, AR_PHY_TPC_18,
175 volt_cal_value = REG_READ_FIELD(ah, AR_PHY_TPC_18,
177 therm_value = REG_READ_FIELD(ah, AR_PHY_BB_THERM_ADC_4,
179 volt_value = REG_READ_FIELD(ah, AR_PHY_BB_THERM_ADC_4,
189 olpc_gain_delta = REG_READ_FIELD(ah, reg,
205 static void ar9003_tx_force_gain(struct ath_hw *ah, unsigned int gain_index)
209 u32 *gain_table_entries = ah->paprd_gain_table_entries;
220 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
222 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
224 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
226 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
228 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
230 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
232 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
234 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
236 REG_RMW_FIELD(ah, AR_PHY_TX_FORCED_GAIN,
238 REG_RMW_FIELD(ah, AR_PHY_TPC_1, AR_PHY_TPC_1_FORCED_DAC_GAIN, 0);
239 REG_RMW_FIELD(ah, AR_PHY_TPC_1, AR_PHY_TPC_1_FORCE_DAC_GAIN, 0);
583 void ar9003_paprd_populate_single_table(struct ath_hw *ah,
594 REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
606 REG_WRITE(ah, reg, paprd_table_val[i]);
617 REG_RMW_FIELD(ah, reg, AR_PHY_PA_GAIN123_PA_GAIN1, small_signal_gain);
619 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL1_B0,
623 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL1_B1,
627 REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL1_B2,
633 int ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain)
639 train_power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
644 desired_gain = ar9003_get_desired_gain(ah, chain, train_power);
648 if (ah->paprd_gain_table_index[i] >= desired_gain)
653 ar9003_tx_force_gain(ah, gain_index);
655 REG_CLR_BIT(ah, AR_PHY_PAPRD_TRAINER_STAT1,
662 int ar9003_paprd_create_curve(struct ath_hw *ah,
681 REG_CLR_BIT(ah, AR_PHY_CHAN_INFO_MEMORY,
686 data_L[i] = REG_READ(ah, reg + (i << 2));
688 REG_SET_BIT(ah, AR_PHY_CHAN_INFO_MEMORY,
692 data_U[i] = REG_READ(ah, reg + (i << 2));
697 REG_CLR_BIT(ah, AR_PHY_PAPRD_TRAINER_STAT1,
706 int ar9003_paprd_init_table(struct ath_hw *ah)
708 ar9003_paprd_setup_single_table(ah);
709 ar9003_paprd_get_gain_table(ah);
714 bool ar9003_paprd_is_done(struct ath_hw *ah)
716 return !!REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,