Lines Matching refs:cfo_ave
1138 int cfo_khz_a, cfo_khz_b, cfo_ave = 0, adjust_xtal = 0; in rtl8723be_dm_dynamic_atc_switch() local
1172 cfo_ave = cfo_khz_a; in rtl8723be_dm_dynamic_atc_switch()
1174 cfo_ave = (int)(cfo_khz_a + cfo_khz_b) >> 1; in rtl8723be_dm_dynamic_atc_switch()
1176 cfo_ave_diff = (rtldm->cfo_ave_pre >= cfo_ave) ? in rtl8723be_dm_dynamic_atc_switch()
1177 (rtldm->cfo_ave_pre - cfo_ave) : in rtl8723be_dm_dynamic_atc_switch()
1178 (cfo_ave - rtldm->cfo_ave_pre); in rtl8723be_dm_dynamic_atc_switch()
1186 rtldm->cfo_ave_pre = cfo_ave; in rtl8723be_dm_dynamic_atc_switch()
1188 if (cfo_ave >= -rtldm->cfo_threshold && in rtl8723be_dm_dynamic_atc_switch()
1189 cfo_ave <= rtldm->cfo_threshold && rtldm->is_freeze == 0) { in rtl8723be_dm_dynamic_atc_switch()
1198 if (cfo_ave > rtldm->cfo_threshold && rtldm->crystal_cap < 0x3f) in rtl8723be_dm_dynamic_atc_switch()
1199 adjust_xtal = ((cfo_ave - CFO_THRESHOLD_XTAL) >> 1) + 1; in rtl8723be_dm_dynamic_atc_switch()
1200 else if ((cfo_ave < -rtlpriv->dm.cfo_threshold) && in rtl8723be_dm_dynamic_atc_switch()
1202 adjust_xtal = ((cfo_ave + CFO_THRESHOLD_XTAL) >> 1) - 1; in rtl8723be_dm_dynamic_atc_switch()
1218 if (cfo_ave < CFO_THRESHOLD_ATC && in rtl8723be_dm_dynamic_atc_switch()
1219 cfo_ave > -CFO_THRESHOLD_ATC) { in rtl8723be_dm_dynamic_atc_switch()