Lines Matching refs:cfo_ave
670 int cfo_khz_a , cfo_khz_b , cfo_ave = 0, adjust_xtal = 0; in rtl92ee_dm_dynamic_atc_switch() local
706 cfo_ave = cfo_khz_a; in rtl92ee_dm_dynamic_atc_switch()
708 cfo_ave = (int)(cfo_khz_a + cfo_khz_b) >> 1; in rtl92ee_dm_dynamic_atc_switch()
710 cfo_ave_diff = (rtldm->cfo_ave_pre >= cfo_ave) ? in rtl92ee_dm_dynamic_atc_switch()
711 (rtldm->cfo_ave_pre - cfo_ave) : in rtl92ee_dm_dynamic_atc_switch()
712 (cfo_ave - rtldm->cfo_ave_pre); in rtl92ee_dm_dynamic_atc_switch()
720 rtldm->cfo_ave_pre = cfo_ave; in rtl92ee_dm_dynamic_atc_switch()
722 if (cfo_ave >= -rtldm->cfo_threshold && in rtl92ee_dm_dynamic_atc_switch()
723 cfo_ave <= rtldm->cfo_threshold && rtldm->is_freeze == 0) { in rtl92ee_dm_dynamic_atc_switch()
732 if (cfo_ave > rtldm->cfo_threshold && rtldm->crystal_cap < 0x3f) in rtl92ee_dm_dynamic_atc_switch()
733 adjust_xtal = ((cfo_ave - CFO_THRESHOLD_XTAL) >> 2) + 1; in rtl92ee_dm_dynamic_atc_switch()
734 else if ((cfo_ave < -rtlpriv->dm.cfo_threshold) && in rtl92ee_dm_dynamic_atc_switch()
736 adjust_xtal = ((cfo_ave + CFO_THRESHOLD_XTAL) >> 2) - 1; in rtl92ee_dm_dynamic_atc_switch()
752 if (cfo_ave < CFO_THRESHOLD_ATC && in rtl92ee_dm_dynamic_atc_switch()
753 cfo_ave > -CFO_THRESHOLD_ATC) { in rtl92ee_dm_dynamic_atc_switch()