Lines Matching full:chain
29 * There is an internal table (i.e. the rtt) for each chain (or bank).
72 static void ar9003_hw_rtt_load_hist_entry(struct ath_hw *ah, u8 chain, in ar9003_hw_rtt_load_hist_entry() argument
78 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain), val); in ar9003_hw_rtt_load_hist_entry()
83 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_load_hist_entry()
87 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_load_hist_entry()
90 if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), in ar9003_hw_rtt_load_hist_entry()
96 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_load_hist_entry()
99 ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), in ar9003_hw_rtt_load_hist_entry()
106 int chain, i; in ar9003_hw_rtt_load_hist() local
108 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { in ar9003_hw_rtt_load_hist()
109 if (!(ah->caps.rx_chainmask & (1 << chain))) in ar9003_hw_rtt_load_hist()
112 ar9003_hw_rtt_load_hist_entry(ah, chain, i, in ar9003_hw_rtt_load_hist()
113 ah->caldata->rtt_table[chain][i]); in ar9003_hw_rtt_load_hist()
115 "Load RTT value at idx %d, chain %d: 0x%x\n", in ar9003_hw_rtt_load_hist()
116 i, chain, ah->caldata->rtt_table[chain][i]); in ar9003_hw_rtt_load_hist()
121 static void ar9003_hw_patch_rtt(struct ath_hw *ah, int index, int chain) in ar9003_hw_patch_rtt() argument
128 if ((index != 5) || (chain >= 2)) in ar9003_hw_patch_rtt()
131 agc = REG_READ_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain), in ar9003_hw_patch_rtt()
136 caldac = ah->caldata->caldac[chain]; in ar9003_hw_patch_rtt()
137 ah->caldata->rtt_table[chain][index] &= 0xFFFF05FF; in ar9003_hw_patch_rtt()
139 ah->caldata->rtt_table[chain][index] |= (caldac << 4); in ar9003_hw_patch_rtt()
142 static int ar9003_hw_rtt_fill_hist_entry(struct ath_hw *ah, u8 chain, u32 index) in ar9003_hw_rtt_fill_hist_entry() argument
150 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_fill_hist_entry()
154 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_fill_hist_entry()
157 if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), in ar9003_hw_rtt_fill_hist_entry()
162 val = MS(REG_READ(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain)), in ar9003_hw_rtt_fill_hist_entry()
171 int chain, i; in ar9003_hw_rtt_fill_hist() local
173 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { in ar9003_hw_rtt_fill_hist()
174 if (!(ah->caps.rx_chainmask & (1 << chain))) in ar9003_hw_rtt_fill_hist()
177 ah->caldata->rtt_table[chain][i] = in ar9003_hw_rtt_fill_hist()
178 ar9003_hw_rtt_fill_hist_entry(ah, chain, i); in ar9003_hw_rtt_fill_hist()
180 ar9003_hw_patch_rtt(ah, i, chain); in ar9003_hw_rtt_fill_hist()
183 "RTT value at idx %d, chain %d is: 0x%x\n", in ar9003_hw_rtt_fill_hist()
184 i, chain, ah->caldata->rtt_table[chain][i]); in ar9003_hw_rtt_fill_hist()
193 int chain, i; in ar9003_hw_rtt_clear_hist() local
195 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { in ar9003_hw_rtt_clear_hist()
196 if (!(ah->caps.rx_chainmask & (1 << chain))) in ar9003_hw_rtt_clear_hist()
199 ar9003_hw_rtt_load_hist_entry(ah, chain, i, 0); in ar9003_hw_rtt_clear_hist()