Lines Matching refs:pfat_table
1223 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_update_rx_idle_ant() local
1226 if (pfat_table->rx_idle_ant != ant) { in rtl88e_dm_update_rx_idle_ant()
1231 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1234 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1238 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1241 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1262 pfat_table->rx_idle_ant = ant; in rtl88e_dm_update_rx_idle_ant()
1272 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_update_tx_ant() local
1280 pfat_table->antsel_a[mac_id] = target_ant & BIT(0); in rtl88e_dm_update_tx_ant()
1281 pfat_table->antsel_b[mac_id] = (target_ant & BIT(1)) >> 1; in rtl88e_dm_update_tx_ant()
1282 pfat_table->antsel_c[mac_id] = (target_ant & BIT(2)) >> 2; in rtl88e_dm_update_tx_ant()
1286 pfat_table->antsel_c[mac_id], in rtl88e_dm_update_tx_ant()
1287 pfat_table->antsel_b[mac_id], in rtl88e_dm_update_tx_ant()
1288 pfat_table->antsel_a[mac_id]); in rtl88e_dm_update_tx_ant()
1340 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_fast_training_init() local
1345 pfat_table->bssid[i] = 0; in rtl88e_dm_fast_training_init()
1346 pfat_table->ant_sum[i] = 0; in rtl88e_dm_fast_training_init()
1347 pfat_table->ant_cnt[i] = 0; in rtl88e_dm_fast_training_init()
1348 pfat_table->ant_ave[i] = 0; in rtl88e_dm_fast_training_init()
1350 pfat_table->train_idx = 0; in rtl88e_dm_fast_training_init()
1351 pfat_table->fat_state = FAT_NORMAL_STATE; in rtl88e_dm_fast_training_init()
1407 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_set_tx_ant_by_tx_info() local
1412 set_tx_desc_antsel_a(pdesc32, pfat_table->antsel_a[mac_id]); in rtl88e_dm_set_tx_ant_by_tx_info()
1413 set_tx_desc_antsel_b(pdesc32, pfat_table->antsel_b[mac_id]); in rtl88e_dm_set_tx_ant_by_tx_info()
1414 set_tx_desc_antsel_c(pdesc32, pfat_table->antsel_c[mac_id]); in rtl88e_dm_set_tx_ant_by_tx_info()
1424 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_ant_sel_statistics() local
1428 pfat_table->main_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1429 pfat_table->main_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1431 pfat_table->aux_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1432 pfat_table->aux_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1436 pfat_table->main_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1437 pfat_table->main_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1439 pfat_table->aux_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1440 pfat_table->aux_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1451 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_hw_ant_div() local
1460 main_rssi = (pfat_table->main_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1461 (pfat_table->main_ant_sum[i] / pfat_table->main_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1462 aux_rssi = (pfat_table->aux_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1463 (pfat_table->aux_ant_sum[i] / pfat_table->aux_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1465 pfat_table->rx_idle_ant : ((main_rssi >= aux_rssi) ? in rtl88e_dm_hw_ant_div()
1469 pfat_table->main_ant_sum[i], in rtl88e_dm_hw_ant_div()
1470 pfat_table->main_ant_cnt[i]); in rtl88e_dm_hw_ant_div()
1473 pfat_table->aux_ant_sum[i], pfat_table->aux_ant_cnt[i]); in rtl88e_dm_hw_ant_div()
1482 if ((pfat_table->rx_idle_ant == MAIN_ANT) && (main_rssi == 0)) in rtl88e_dm_hw_ant_div()
1484 else if ((pfat_table->rx_idle_ant == AUX_ANT) && (aux_rssi == 0)) in rtl88e_dm_hw_ant_div()
1500 main_rssi = (pfat_table->main_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1501 (pfat_table->main_ant_sum[i] / in rtl88e_dm_hw_ant_div()
1502 pfat_table->main_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1503 aux_rssi = (pfat_table->aux_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1504 (pfat_table->aux_ant_sum[i] / in rtl88e_dm_hw_ant_div()
1505 pfat_table->aux_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1507 pfat_table->rx_idle_ant : ((main_rssi >= in rtl88e_dm_hw_ant_div()
1518 if ((pfat_table->rx_idle_ant == MAIN_ANT) && in rtl88e_dm_hw_ant_div()
1521 else if ((pfat_table->rx_idle_ant == AUX_ANT) && in rtl88e_dm_hw_ant_div()
1538 pfat_table->main_ant_sum[i] = 0; in rtl88e_dm_hw_ant_div()
1539 pfat_table->aux_ant_sum[i] = 0; in rtl88e_dm_hw_ant_div()
1540 pfat_table->main_ant_cnt[i] = 0; in rtl88e_dm_hw_ant_div()
1541 pfat_table->aux_ant_cnt[i] = 0; in rtl88e_dm_hw_ant_div()
1556 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_set_next_mac_address_target() local
1561 if ((pfat_table->train_idx + 1) == ASSOCIATE_ENTRY_NUM) in rtl88e_set_next_mac_address_target()
1562 pfat_table->train_idx = 0; in rtl88e_set_next_mac_address_target()
1564 pfat_table->train_idx++; in rtl88e_set_next_mac_address_target()
1566 if (pfat_table->train_idx == 0) { in rtl88e_set_next_mac_address_target()
1587 if (j != pfat_table->train_idx) in rtl88e_set_next_mac_address_target()
1607 if (j == pfat_table->train_idx) in rtl88e_set_next_mac_address_target()
1618 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_fast_ant_training() local
1623 if (pfat_table->fat_state == FAT_TRAINING_STATE) { in rtl88e_dm_fast_ant_training()
1625 if (pfat_table->ant_cnt[i] == 0) { in rtl88e_dm_fast_ant_training()
1626 pfat_table->ant_ave[i] = 0; in rtl88e_dm_fast_ant_training()
1628 pfat_table->ant_ave[i] = in rtl88e_dm_fast_ant_training()
1629 pfat_table->ant_sum[i] / in rtl88e_dm_fast_ant_training()
1630 pfat_table->ant_cnt[i]; in rtl88e_dm_fast_ant_training()
1634 if (pfat_table->ant_ave[i] > max_rssi) { in rtl88e_dm_fast_ant_training()
1635 max_rssi = pfat_table->ant_ave[i]; in rtl88e_dm_fast_ant_training()
1652 pfat_table->antsel_a[pfat_table->train_idx] = in rtl88e_dm_fast_ant_training()
1654 pfat_table->antsel_b[pfat_table->train_idx] = in rtl88e_dm_fast_ant_training()
1656 pfat_table->antsel_c[pfat_table->train_idx] = in rtl88e_dm_fast_ant_training()
1664 pfat_table->ant_sum[i] = 0; in rtl88e_dm_fast_ant_training()
1665 pfat_table->ant_cnt[i] = 0; in rtl88e_dm_fast_ant_training()
1668 pfat_table->fat_state = FAT_NORMAL_STATE; in rtl88e_dm_fast_ant_training()
1672 if (pfat_table->fat_state == FAT_NORMAL_STATE) { in rtl88e_dm_fast_ant_training()
1675 pfat_table->fat_state = FAT_TRAINING_STATE; in rtl88e_dm_fast_ant_training()
1699 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_antenna_diversity() local
1703 if (pfat_table->becomelinked) { in rtl88e_dm_antenna_diversity()
1712 pfat_table->becomelinked = in rtl88e_dm_antenna_diversity()
1718 if (!pfat_table->becomelinked) { in rtl88e_dm_antenna_diversity()
1727 pfat_table->becomelinked = in rtl88e_dm_antenna_diversity()