Lines Matching refs:ch_idx
8754 u8 ch_idx; in rt2800_rxiq_calibration() local
8867 for (ch_idx = 0; ch_idx < 2; ch_idx = ch_idx + 1) { in rt2800_rxiq_calibration()
8868 if (ch_idx == 0) { in rt2800_rxiq_calibration()
9029 if (ch_idx == 0) { in rt2800_rxiq_calibration()
9332 static void rt2800_write_dc(struct rt2x00_dev *rt2x00dev, u8 ch_idx, u8 alc, u8 iorq, u8 dc) in rt2800_write_dc() argument
9340 if (ch_idx == 0) in rt2800_write_dc()
9350 static void rt2800_loft_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx, in rt2800_loft_search() argument
9371 rt2800_write_dc(rt2x00dev, ch_idx, 0, iorq, idx0); in rt2800_loft_search()
9377 rt2800_write_dc(rt2x00dev, ch_idx, 0, iorq, idx1); in rt2800_loft_search()
9397 rt2800_write_dc(rt2x00dev, ch_idx, 0, iorq, idxf[iorq]); in rt2800_loft_search()
9401 dc_result[ch_idx][alc_idx][0] = idxf[0]; in rt2800_loft_search()
9402 dc_result[ch_idx][alc_idx][1] = idxf[1]; in rt2800_loft_search()
9405 static void rt2800_iq_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx, u8 *ges, u8 *pes) in rt2800_iq_search() argument
9437 bbp = (ch_idx == 0) ? ((gop == 0) ? 0x28 : 0x29) : in rt2800_iq_search()
9449 bbp = (ch_idx == 0) ? (gop == 0) ? 0x28 : 0x29 : in rt2800_iq_search()
9471 bbp = (ch_idx == 0) ? (gop == 0) ? 0x28 : 0x29 : in rt2800_iq_search()
9503 bbp = (ch_idx == 0) ? 0x28 : 0x46; in rt2800_iq_search()
9507 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_iq_search()
9525 ges[ch_idx] = gerr & 0x0F; in rt2800_iq_search()
9526 pes[ch_idx] = perr & 0x3F; in rt2800_iq_search()
9585 u8 bbp = 0, ch_idx = 0, rf_alc_idx = 0, idx = 0; in rt2800_loft_iq_calibration() local
9621 for (ch_idx = 0; ch_idx < 2; ch_idx++) in rt2800_loft_iq_calibration()
9622 rt2800_rf_configstore(rt2x00dev, rf_store, ch_idx); in rt2800_loft_iq_calibration()
9637 for (ch_idx = 0; ch_idx < 2; ch_idx++) { in rt2800_loft_iq_calibration()
9647 if (ch_idx == 0) in rt2800_loft_iq_calibration()
9654 if (ch_idx == 0) in rt2800_loft_iq_calibration()
9663 if (ch_idx == 0) in rt2800_loft_iq_calibration()
9668 vga_gain[ch_idx] = 18; in rt2800_loft_iq_calibration()
9682 rt2800_write_dc(rt2x00dev, ch_idx, 0, 1, 0x21); in rt2800_loft_iq_calibration()
9683 for (; vga_gain[ch_idx] > 0; in rt2800_loft_iq_calibration()
9684 vga_gain[ch_idx] = vga_gain[ch_idx] - 2) { in rt2800_loft_iq_calibration()
9685 rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; in rt2800_loft_iq_calibration()
9688 rt2800_write_dc(rt2x00dev, ch_idx, 0, 1, 0x00); in rt2800_loft_iq_calibration()
9689 rt2800_write_dc(rt2x00dev, ch_idx, 0, 0, 0x00); in rt2800_loft_iq_calibration()
9691 rt2800_write_dc(rt2x00dev, ch_idx, 0, 0, 0x21); in rt2800_loft_iq_calibration()
9698 rt2800_write_dc(rt2x00dev, ch_idx, 0, 0, 0x00); in rt2800_loft_iq_calibration()
9699 rt2800_write_dc(rt2x00dev, ch_idx, 0, 1, 0x00); in rt2800_loft_iq_calibration()
9701 rt2x00_dbg(rt2x00dev, "Used VGA %d %x\n", vga_gain[ch_idx], in rt2800_loft_iq_calibration()
9702 rfvga_gain_table[vga_gain[ch_idx]]); in rt2800_loft_iq_calibration()
9704 if (vga_gain[ch_idx] < 0) in rt2800_loft_iq_calibration()
9705 vga_gain[ch_idx] = 0; in rt2800_loft_iq_calibration()
9708 rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; in rt2800_loft_iq_calibration()
9713 rt2800_loft_search(rt2x00dev, ch_idx, rf_alc_idx, loft_dc_search_result); in rt2800_loft_iq_calibration()
9842 for (ch_idx = 0; ch_idx < 2; ch_idx++) in rt2800_loft_iq_calibration()
9843 rt2800_rf_configstore(rt2x00dev, rf_store, ch_idx); in rt2800_loft_iq_calibration()
9853 for (ch_idx = 0; ch_idx < 2; ch_idx++) { in rt2800_loft_iq_calibration()
9857 if (ch_idx == 0) { in rt2800_loft_iq_calibration()
9882 bbp = (ch_idx == 0) ? 0x28 : 0x46; in rt2800_loft_iq_calibration()
9896 for (; vga_gain[ch_idx] < 19; vga_gain[ch_idx] = (vga_gain[ch_idx] + count_step)) { in rt2800_loft_iq_calibration()
9897 rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; in rt2800_loft_iq_calibration()
9901 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_loft_iq_calibration()
9908 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_loft_iq_calibration()
9920 if (vga_gain[ch_idx] != 0) in rt2800_loft_iq_calibration()
9921 vga_gain[ch_idx] = vga_gain[ch_idx] - 1; in rt2800_loft_iq_calibration()
9930 if (vga_gain[ch_idx] > 18) in rt2800_loft_iq_calibration()
9931 vga_gain[ch_idx] = 18; in rt2800_loft_iq_calibration()
9932 rt2x00_dbg(rt2x00dev, "Used VGA %d %x\n", vga_gain[ch_idx], in rt2800_loft_iq_calibration()
9933 rfvga_gain_table[vga_gain[ch_idx]]); in rt2800_loft_iq_calibration()
9935 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_loft_iq_calibration()
9939 rt2800_iq_search(rt2x00dev, ch_idx, ger, per); in rt2800_loft_iq_calibration()