Lines Matching refs:ch_idx
8770 u8 ch_idx; in rt2800_rxiq_calibration() local
8883 for (ch_idx = 0; ch_idx < 2; ch_idx = ch_idx + 1) { in rt2800_rxiq_calibration()
8884 if (ch_idx == 0) { in rt2800_rxiq_calibration()
9045 if (ch_idx == 0) { in rt2800_rxiq_calibration()
9348 static void rt2800_write_dc(struct rt2x00_dev *rt2x00dev, u8 ch_idx, u8 alc, u8 iorq, u8 dc) in rt2800_write_dc() argument
9356 if (ch_idx == 0) in rt2800_write_dc()
9366 static void rt2800_loft_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx, in rt2800_loft_search() argument
9387 rt2800_write_dc(rt2x00dev, ch_idx, 0, iorq, idx0); in rt2800_loft_search()
9393 rt2800_write_dc(rt2x00dev, ch_idx, 0, iorq, idx1); in rt2800_loft_search()
9413 rt2800_write_dc(rt2x00dev, ch_idx, 0, iorq, idxf[iorq]); in rt2800_loft_search()
9417 dc_result[ch_idx][alc_idx][0] = idxf[0]; in rt2800_loft_search()
9418 dc_result[ch_idx][alc_idx][1] = idxf[1]; in rt2800_loft_search()
9421 static void rt2800_iq_search(struct rt2x00_dev *rt2x00dev, u8 ch_idx, u8 *ges, u8 *pes) in rt2800_iq_search() argument
9453 bbp = (ch_idx == 0) ? ((gop == 0) ? 0x28 : 0x29) : in rt2800_iq_search()
9465 bbp = (ch_idx == 0) ? (gop == 0) ? 0x28 : 0x29 : in rt2800_iq_search()
9487 bbp = (ch_idx == 0) ? (gop == 0) ? 0x28 : 0x29 : in rt2800_iq_search()
9519 bbp = (ch_idx == 0) ? 0x28 : 0x46; in rt2800_iq_search()
9523 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_iq_search()
9541 ges[ch_idx] = gerr & 0x0F; in rt2800_iq_search()
9542 pes[ch_idx] = perr & 0x3F; in rt2800_iq_search()
9601 u8 bbp = 0, ch_idx = 0, rf_alc_idx = 0, idx = 0; in rt2800_loft_iq_calibration() local
9637 for (ch_idx = 0; ch_idx < 2; ch_idx++) in rt2800_loft_iq_calibration()
9638 rt2800_rf_configstore(rt2x00dev, rf_store, ch_idx); in rt2800_loft_iq_calibration()
9653 for (ch_idx = 0; ch_idx < 2; ch_idx++) { in rt2800_loft_iq_calibration()
9663 if (ch_idx == 0) in rt2800_loft_iq_calibration()
9670 if (ch_idx == 0) in rt2800_loft_iq_calibration()
9679 if (ch_idx == 0) in rt2800_loft_iq_calibration()
9684 vga_gain[ch_idx] = 18; in rt2800_loft_iq_calibration()
9698 rt2800_write_dc(rt2x00dev, ch_idx, 0, 1, 0x21); in rt2800_loft_iq_calibration()
9699 for (; vga_gain[ch_idx] > 0; in rt2800_loft_iq_calibration()
9700 vga_gain[ch_idx] = vga_gain[ch_idx] - 2) { in rt2800_loft_iq_calibration()
9701 rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; in rt2800_loft_iq_calibration()
9704 rt2800_write_dc(rt2x00dev, ch_idx, 0, 1, 0x00); in rt2800_loft_iq_calibration()
9705 rt2800_write_dc(rt2x00dev, ch_idx, 0, 0, 0x00); in rt2800_loft_iq_calibration()
9707 rt2800_write_dc(rt2x00dev, ch_idx, 0, 0, 0x21); in rt2800_loft_iq_calibration()
9714 rt2800_write_dc(rt2x00dev, ch_idx, 0, 0, 0x00); in rt2800_loft_iq_calibration()
9715 rt2800_write_dc(rt2x00dev, ch_idx, 0, 1, 0x00); in rt2800_loft_iq_calibration()
9717 rt2x00_dbg(rt2x00dev, "Used VGA %d %x\n", vga_gain[ch_idx], in rt2800_loft_iq_calibration()
9718 rfvga_gain_table[vga_gain[ch_idx]]); in rt2800_loft_iq_calibration()
9721 rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; in rt2800_loft_iq_calibration()
9726 rt2800_loft_search(rt2x00dev, ch_idx, rf_alc_idx, loft_dc_search_result); in rt2800_loft_iq_calibration()
9855 for (ch_idx = 0; ch_idx < 2; ch_idx++) in rt2800_loft_iq_calibration()
9856 rt2800_rf_configstore(rt2x00dev, rf_store, ch_idx); in rt2800_loft_iq_calibration()
9866 for (ch_idx = 0; ch_idx < 2; ch_idx++) { in rt2800_loft_iq_calibration()
9870 if (ch_idx == 0) { in rt2800_loft_iq_calibration()
9895 bbp = (ch_idx == 0) ? 0x28 : 0x46; in rt2800_loft_iq_calibration()
9909 for (; vga_gain[ch_idx] < 19; vga_gain[ch_idx] = (vga_gain[ch_idx] + count_step)) { in rt2800_loft_iq_calibration()
9910 rfvalue = rfvga_gain_table[vga_gain[ch_idx]]; in rt2800_loft_iq_calibration()
9914 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_loft_iq_calibration()
9921 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_loft_iq_calibration()
9933 if (vga_gain[ch_idx] != 0) in rt2800_loft_iq_calibration()
9934 vga_gain[ch_idx] = vga_gain[ch_idx] - 1; in rt2800_loft_iq_calibration()
9943 if (vga_gain[ch_idx] > 18) in rt2800_loft_iq_calibration()
9944 vga_gain[ch_idx] = 18; in rt2800_loft_iq_calibration()
9945 rt2x00_dbg(rt2x00dev, "Used VGA %d %x\n", vga_gain[ch_idx], in rt2800_loft_iq_calibration()
9946 rfvga_gain_table[vga_gain[ch_idx]]); in rt2800_loft_iq_calibration()
9948 bbp = (ch_idx == 0) ? 0x29 : 0x47; in rt2800_loft_iq_calibration()
9952 rt2800_iq_search(rt2x00dev, ch_idx, ger, per); in rt2800_loft_iq_calibration()