Lines Matching refs:ah_gain
425 ah->ah_gain.g_step_idx = rfgain_opt_5111.go_default; in ath5k_hw_rfgain_opt_init()
426 ah->ah_gain.g_low = 20; in ath5k_hw_rfgain_opt_init()
427 ah->ah_gain.g_high = 35; in ath5k_hw_rfgain_opt_init()
428 ah->ah_gain.g_state = AR5K_RFGAIN_ACTIVE; in ath5k_hw_rfgain_opt_init()
431 ah->ah_gain.g_step_idx = rfgain_opt_5112.go_default; in ath5k_hw_rfgain_opt_init()
432 ah->ah_gain.g_low = 20; in ath5k_hw_rfgain_opt_init()
433 ah->ah_gain.g_high = 85; in ath5k_hw_rfgain_opt_init()
434 ah->ah_gain.g_state = AR5K_RFGAIN_ACTIVE; in ath5k_hw_rfgain_opt_init()
462 if (ah->ah_gain.g_state != AR5K_RFGAIN_ACTIVE) in ath5k_hw_request_rfgain_probe()
471 ah->ah_gain.g_state = AR5K_RFGAIN_READ_REQUESTED; in ath5k_hw_request_rfgain_probe()
499 g_step = &go->go_step[ah->ah_gain.g_step_idx]; in ath5k_hw_rf_gainf_corr()
504 ah->ah_gain.g_f_corr = 0; in ath5k_hw_rf_gainf_corr()
518 ah->ah_gain.g_f_corr = step * 2; in ath5k_hw_rf_gainf_corr()
521 ah->ah_gain.g_f_corr = (step - 5) * 2; in ath5k_hw_rf_gainf_corr()
524 ah->ah_gain.g_f_corr = step; in ath5k_hw_rf_gainf_corr()
527 ah->ah_gain.g_f_corr = 0; in ath5k_hw_rf_gainf_corr()
531 return ah->ah_gain.g_f_corr; in ath5k_hw_rf_gainf_corr()
567 ah->ah_gain.g_high = level[3] - in ath5k_hw_rf_check_gainf_readback()
569 ah->ah_gain.g_low = level[0] + in ath5k_hw_rf_check_gainf_readback()
585 ah->ah_gain.g_high = 55; in ath5k_hw_rf_check_gainf_readback()
589 return (ah->ah_gain.g_current >= level[0] && in ath5k_hw_rf_check_gainf_readback()
590 ah->ah_gain.g_current <= level[1]) || in ath5k_hw_rf_check_gainf_readback()
591 (ah->ah_gain.g_current >= level[2] && in ath5k_hw_rf_check_gainf_readback()
592 ah->ah_gain.g_current <= level[3]); in ath5k_hw_rf_check_gainf_readback()
620 g_step = &go->go_step[ah->ah_gain.g_step_idx]; in ath5k_hw_rf_gainf_adjust()
622 if (ah->ah_gain.g_current >= ah->ah_gain.g_high) { in ath5k_hw_rf_gainf_adjust()
625 if (ah->ah_gain.g_step_idx == 0) in ath5k_hw_rf_gainf_adjust()
628 for (ah->ah_gain.g_target = ah->ah_gain.g_current; in ath5k_hw_rf_gainf_adjust()
629 ah->ah_gain.g_target >= ah->ah_gain.g_high && in ath5k_hw_rf_gainf_adjust()
630 ah->ah_gain.g_step_idx > 0; in ath5k_hw_rf_gainf_adjust()
631 g_step = &go->go_step[ah->ah_gain.g_step_idx]) in ath5k_hw_rf_gainf_adjust()
632 ah->ah_gain.g_target -= 2 * in ath5k_hw_rf_gainf_adjust()
633 (go->go_step[--(ah->ah_gain.g_step_idx)].gos_gain - in ath5k_hw_rf_gainf_adjust()
640 if (ah->ah_gain.g_current <= ah->ah_gain.g_low) { in ath5k_hw_rf_gainf_adjust()
643 if (ah->ah_gain.g_step_idx == (go->go_steps_count - 1)) in ath5k_hw_rf_gainf_adjust()
646 for (ah->ah_gain.g_target = ah->ah_gain.g_current; in ath5k_hw_rf_gainf_adjust()
647 ah->ah_gain.g_target <= ah->ah_gain.g_low && in ath5k_hw_rf_gainf_adjust()
648 ah->ah_gain.g_step_idx < go->go_steps_count - 1; in ath5k_hw_rf_gainf_adjust()
649 g_step = &go->go_step[ah->ah_gain.g_step_idx]) in ath5k_hw_rf_gainf_adjust()
650 ah->ah_gain.g_target -= 2 * in ath5k_hw_rf_gainf_adjust()
651 (go->go_step[++ah->ah_gain.g_step_idx].gos_gain - in ath5k_hw_rf_gainf_adjust()
661 ret, ah->ah_gain.g_step_idx, ah->ah_gain.g_current, in ath5k_hw_rf_gainf_adjust()
662 ah->ah_gain.g_target); in ath5k_hw_rf_gainf_adjust()
684 ah->ah_gain.g_state == AR5K_RFGAIN_INACTIVE) in ath5k_hw_gainf_calibrate()
689 if (ah->ah_gain.g_state != AR5K_RFGAIN_READ_REQUESTED) in ath5k_hw_gainf_calibrate()
698 ah->ah_gain.g_current = data >> AR5K_PHY_PAPD_PROBE_GAINF_S; in ath5k_hw_gainf_calibrate()
705 ah->ah_gain.g_current += in ath5k_hw_gainf_calibrate()
708 ah->ah_gain.g_current += in ath5k_hw_gainf_calibrate()
716 ah->ah_gain.g_current = in ath5k_hw_gainf_calibrate()
717 ah->ah_gain.g_current >= ah->ah_gain.g_f_corr ? in ath5k_hw_gainf_calibrate()
718 (ah->ah_gain.g_current - ah->ah_gain.g_f_corr) : in ath5k_hw_gainf_calibrate()
726 AR5K_GAIN_CHECK_ADJUST(&ah->ah_gain) && in ath5k_hw_gainf_calibrate()
728 ah->ah_gain.g_state = AR5K_RFGAIN_NEED_CHANGE; in ath5k_hw_gainf_calibrate()
730 ah->ah_gain.g_state = AR5K_RFGAIN_ACTIVE; in ath5k_hw_gainf_calibrate()
735 return ah->ah_gain.g_state; in ath5k_hw_gainf_calibrate()
964 g_step = &go->go_step[ah->ah_gain.g_step_idx]; in ath5k_hw_rfregs_init()
992 ah->ah_gain.g_state = AR5K_RFGAIN_ACTIVE; in ath5k_hw_rfregs_init()
1057 ah->ah_gain.g_state = AR5K_RFGAIN_ACTIVE; in ath5k_hw_rfregs_init()