Lines Matching refs:dm_info

113 	struct rtw_dm_info *dm_info = &rtwdev->dm_info;  in rtw_phy_cck_pd_init()  local
118 dm_info->cck_pd_lv[i][j] = CCK_PD_LV0; in rtw_phy_cck_pd_init()
121 dm_info->cck_fa_avg = CCK_FA_AVG_RESET; in rtw_phy_cck_pd_init()
142 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_adaptivity_set_mode() local
146 dm_info->edcca_mode = RTW_EDCCA_NORMAL; in rtw_phy_adaptivity_set_mode()
153 dm_info->edcca_mode = RTW_EDCCA_ADAPTIVITY; in rtw_phy_adaptivity_set_mode()
154 dm_info->l2h_th_ini = chip->l2h_th_ini_ad; in rtw_phy_adaptivity_set_mode()
157 dm_info->edcca_mode = RTW_EDCCA_ADAPTIVITY; in rtw_phy_adaptivity_set_mode()
158 dm_info->l2h_th_ini = chip->l2h_th_ini_cs; in rtw_phy_adaptivity_set_mode()
161 dm_info->edcca_mode = RTW_EDCCA_NORMAL; in rtw_phy_adaptivity_set_mode()
203 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_init() local
206 dm_info->fa_history[3] = 0; in rtw_phy_init()
207 dm_info->fa_history[2] = 0; in rtw_phy_init()
208 dm_info->fa_history[1] = 0; in rtw_phy_init()
209 dm_info->fa_history[0] = 0; in rtw_phy_init()
210 dm_info->igi_bitmap = 0; in rtw_phy_init()
211 dm_info->igi_history[3] = 0; in rtw_phy_init()
212 dm_info->igi_history[2] = 0; in rtw_phy_init()
213 dm_info->igi_history[1] = 0; in rtw_phy_init()
217 dm_info->igi_history[0] = rtw_read32_mask(rtwdev, addr, mask); in rtw_phy_init()
220 dm_info->iqk.done = false; in rtw_phy_init()
298 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_stat_rssi() local
305 dm_info->pre_min_rssi = dm_info->min_rssi; in rtw_phy_stat_rssi()
306 dm_info->min_rssi = data.min_rssi; in rtw_phy_stat_rssi()
311 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_stat_rate_cnt() local
313 dm_info->last_pkt_count = dm_info->cur_pkt_count; in rtw_phy_stat_rate_cnt()
314 memset(&dm_info->cur_pkt_count, 0, sizeof(dm_info->cur_pkt_count)); in rtw_phy_stat_rate_cnt()
338 rtw_phy_dig_check_damping(struct rtw_dm_info *dm_info) in rtw_phy_dig_check_damping() argument
350 min_rssi = dm_info->min_rssi; in rtw_phy_dig_check_damping()
351 if (dm_info->damping) { in rtw_phy_dig_check_damping()
352 damping_rssi = dm_info->damping_rssi; in rtw_phy_dig_check_damping()
355 if (diff > 3 || dm_info->damping_cnt++ > 20) { in rtw_phy_dig_check_damping()
356 dm_info->damping = false; in rtw_phy_dig_check_damping()
363 igi_history = dm_info->igi_history; in rtw_phy_dig_check_damping()
364 fa_history = dm_info->fa_history; in rtw_phy_dig_check_damping()
365 igi_bitmap = dm_info->igi_bitmap & 0xf; in rtw_phy_dig_check_damping()
392 dm_info->damping = true; in rtw_phy_dig_check_damping()
393 dm_info->damping_cnt = 0; in rtw_phy_dig_check_damping()
394 dm_info->damping_rssi = min_rssi; in rtw_phy_dig_check_damping()
401 struct rtw_dm_info *dm_info, in rtw_phy_dig_get_boundary() argument
411 min_rssi = max_t(u8, dm_info->min_rssi, dig_min); in rtw_phy_dig_get_boundary()
426 static void rtw_phy_dig_get_threshold(struct rtw_dm_info *dm_info, in rtw_phy_dig_get_threshold() argument
431 min_rssi = dm_info->min_rssi; in rtw_phy_dig_get_threshold()
432 pre_min_rssi = dm_info->pre_min_rssi; in rtw_phy_dig_get_threshold()
453 static void rtw_phy_dig_recorder(struct rtw_dm_info *dm_info, u8 igi, u16 fa) in rtw_phy_dig_recorder() argument
460 igi_bitmap = dm_info->igi_bitmap << 1 & 0xfe; in rtw_phy_dig_recorder()
461 igi_history = dm_info->igi_history; in rtw_phy_dig_recorder()
462 fa_history = dm_info->fa_history; in rtw_phy_dig_recorder()
477 dm_info->igi_bitmap = igi_bitmap; in rtw_phy_dig_recorder()
482 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_dig() local
493 if (rtw_phy_dig_check_damping(dm_info)) in rtw_phy_dig()
498 fa_cnt = dm_info->total_fa_cnt; in rtw_phy_dig()
499 pre_igi = dm_info->igi_history[0]; in rtw_phy_dig()
501 rtw_phy_dig_get_threshold(dm_info, fa_th, step, linked); in rtw_phy_dig()
521 rtw_phy_dig_get_boundary(rtwdev, dm_info, &upper_bound, &lower_bound, in rtw_phy_dig()
528 rtw_phy_dig_recorder(dm_info, cur_igi, fa_cnt); in rtw_phy_dig()
587 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_rrsr_mask_min_iter() local
591 if (mask < dm_info->rrsr_mask_min) in rtw_phy_rrsr_mask_min_iter()
592 dm_info->rrsr_mask_min = mask; in rtw_phy_rrsr_mask_min_iter()
597 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_rrsr_update() local
599 dm_info->rrsr_mask_min = RRSR_RATE_ORDER_MAX; in rtw_phy_rrsr_update()
601 rtw_write32(rtwdev, REG_RRSR, dm_info->rrsr_val_init & dm_info->rrsr_mask_min); in rtw_phy_rrsr_update()
625 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_parsing_cfo_iter() local
626 struct rtw_cfo_track *cfo = &dm_info->cfo_track; in rtw_phy_parsing_cfo_iter()
673 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_cck_pd_lv_unlink() local
674 u32 cck_fa_avg = dm_info->cck_fa_avg; in rtw_phy_cck_pd_lv_unlink()
694 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_cck_pd_lv_link() local
695 u8 igi = dm_info->igi_history[0]; in rtw_phy_cck_pd_lv_link()
696 u8 rssi = dm_info->min_rssi; in rtw_phy_cck_pd_lv_link()
697 u32 cck_fa_avg = dm_info->cck_fa_avg; in rtw_phy_cck_pd_lv_link()
724 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_cck_pd() local
725 u32 cck_fa = dm_info->cck_fa_cnt; in rtw_phy_cck_pd()
731 if (dm_info->cck_fa_avg == CCK_FA_AVG_RESET) in rtw_phy_cck_pd()
732 dm_info->cck_fa_avg = cck_fa; in rtw_phy_cck_pd()
734 dm_info->cck_fa_avg = (dm_info->cck_fa_avg * 3 + cck_fa) >> 2; in rtw_phy_cck_pd()
737 dm_info->igi_history[0], dm_info->min_rssi, in rtw_phy_cck_pd()
738 dm_info->fa_history[0]); in rtw_phy_cck_pd()
740 dm_info->cck_fa_avg, dm_info->cck_pd_default); in rtw_phy_cck_pd()
1746 struct rtw_dpk_info *dpk_info = &rtwdev->dm_info.dpk_info; in rtw_load_rfk_table()
2096 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_get_tx_power_params() local
2125 *remnant = (rate <= DESC_RATE11M ? dm_info->txagc_remnant_cck : in rtw_get_tx_power_params()
2126 dm_info->txagc_remnant_ofdm); in rtw_get_tx_power_params()
2344 if (rtwdev->dm_info.tx_rate <= DESC_RATE11M) { in rtw_phy_config_swing_table()
2381 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_pwrtrack_avg() local
2383 ewma_thermal_add(&dm_info->avg_thermal[path], thermal); in rtw_phy_pwrtrack_avg()
2384 dm_info->thermal_avg[path] = in rtw_phy_pwrtrack_avg()
2385 ewma_thermal_read(&dm_info->avg_thermal[path]); in rtw_phy_pwrtrack_avg()
2392 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_pwrtrack_thermal_changed() local
2393 u8 avg = ewma_thermal_read(&dm_info->avg_thermal[path]); in rtw_phy_pwrtrack_thermal_changed()
2404 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_pwrtrack_get_delta() local
2407 therm_avg = dm_info->thermal_avg[path]; in rtw_phy_pwrtrack_get_delta()
2419 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_pwrtrack_get_pwridx() local
2441 if (dm_info->thermal_avg[therm_path] > in rtw_phy_pwrtrack_get_pwridx()
2451 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_pwrtrack_need_lck() local
2454 delta_lck = abs(dm_info->thermal_avg[0] - dm_info->thermal_meter_lck); in rtw_phy_pwrtrack_need_lck()
2456 dm_info->thermal_meter_lck = dm_info->thermal_avg[0]; in rtw_phy_pwrtrack_need_lck()
2465 struct rtw_dm_info *dm_info = &rtwdev->dm_info; in rtw_phy_pwrtrack_need_iqk() local
2468 delta_iqk = abs(dm_info->thermal_avg[0] - dm_info->thermal_meter_k); in rtw_phy_pwrtrack_need_iqk()
2470 dm_info->thermal_meter_k = dm_info->thermal_avg[0]; in rtw_phy_pwrtrack_need_iqk()