Lines Matching refs:pfat_table

1251 	struct fast_ant_training *pfat_table = &rtldm->fat_table;  in rtl88e_dm_update_rx_idle_ant()  local
1254 if (pfat_table->rx_idle_ant != ant) { in rtl88e_dm_update_rx_idle_ant()
1259 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1262 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1266 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1269 (pfat_table->rx_idle_ant == CG_TRX_HW_ANTDIV) ? in rtl88e_dm_update_rx_idle_ant()
1290 pfat_table->rx_idle_ant = ant; in rtl88e_dm_update_rx_idle_ant()
1300 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_update_tx_ant() local
1308 pfat_table->antsel_a[mac_id] = target_ant & BIT(0); in rtl88e_dm_update_tx_ant()
1309 pfat_table->antsel_b[mac_id] = (target_ant & BIT(1)) >> 1; in rtl88e_dm_update_tx_ant()
1310 pfat_table->antsel_c[mac_id] = (target_ant & BIT(2)) >> 2; in rtl88e_dm_update_tx_ant()
1314 pfat_table->antsel_c[mac_id], in rtl88e_dm_update_tx_ant()
1315 pfat_table->antsel_b[mac_id], in rtl88e_dm_update_tx_ant()
1316 pfat_table->antsel_a[mac_id]); in rtl88e_dm_update_tx_ant()
1368 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_fast_training_init() local
1373 pfat_table->bssid[i] = 0; in rtl88e_dm_fast_training_init()
1374 pfat_table->ant_sum[i] = 0; in rtl88e_dm_fast_training_init()
1375 pfat_table->ant_cnt[i] = 0; in rtl88e_dm_fast_training_init()
1376 pfat_table->ant_ave[i] = 0; in rtl88e_dm_fast_training_init()
1378 pfat_table->train_idx = 0; in rtl88e_dm_fast_training_init()
1379 pfat_table->fat_state = FAT_NORMAL_STATE; in rtl88e_dm_fast_training_init()
1435 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_set_tx_ant_by_tx_info() local
1439 SET_TX_DESC_ANTSEL_A(pdesc, pfat_table->antsel_a[mac_id]); in rtl88e_dm_set_tx_ant_by_tx_info()
1440 SET_TX_DESC_ANTSEL_B(pdesc, pfat_table->antsel_b[mac_id]); in rtl88e_dm_set_tx_ant_by_tx_info()
1441 SET_TX_DESC_ANTSEL_C(pdesc, pfat_table->antsel_c[mac_id]); in rtl88e_dm_set_tx_ant_by_tx_info()
1451 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_ant_sel_statistics() local
1455 pfat_table->main_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1456 pfat_table->main_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1458 pfat_table->aux_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1459 pfat_table->aux_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1463 pfat_table->main_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1464 pfat_table->main_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1466 pfat_table->aux_ant_sum[mac_id] += rx_pwdb_all; in rtl88e_dm_ant_sel_statistics()
1467 pfat_table->aux_ant_cnt[mac_id]++; in rtl88e_dm_ant_sel_statistics()
1478 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_hw_ant_div() local
1487 main_rssi = (pfat_table->main_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1488 (pfat_table->main_ant_sum[i] / pfat_table->main_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1489 aux_rssi = (pfat_table->aux_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1490 (pfat_table->aux_ant_sum[i] / pfat_table->aux_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1492 pfat_table->rx_idle_ant : ((main_rssi >= aux_rssi) ? in rtl88e_dm_hw_ant_div()
1496 pfat_table->main_ant_sum[i], in rtl88e_dm_hw_ant_div()
1497 pfat_table->main_ant_cnt[i]); in rtl88e_dm_hw_ant_div()
1500 pfat_table->aux_ant_sum[i], pfat_table->aux_ant_cnt[i]); in rtl88e_dm_hw_ant_div()
1509 if ((pfat_table->rx_idle_ant == MAIN_ANT) && (main_rssi == 0)) in rtl88e_dm_hw_ant_div()
1511 else if ((pfat_table->rx_idle_ant == AUX_ANT) && (aux_rssi == 0)) in rtl88e_dm_hw_ant_div()
1527 main_rssi = (pfat_table->main_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1528 (pfat_table->main_ant_sum[i] / in rtl88e_dm_hw_ant_div()
1529 pfat_table->main_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1530 aux_rssi = (pfat_table->aux_ant_cnt[i] != 0) ? in rtl88e_dm_hw_ant_div()
1531 (pfat_table->aux_ant_sum[i] / in rtl88e_dm_hw_ant_div()
1532 pfat_table->aux_ant_cnt[i]) : 0; in rtl88e_dm_hw_ant_div()
1534 pfat_table->rx_idle_ant : ((main_rssi >= in rtl88e_dm_hw_ant_div()
1545 if ((pfat_table->rx_idle_ant == MAIN_ANT) && in rtl88e_dm_hw_ant_div()
1548 else if ((pfat_table->rx_idle_ant == AUX_ANT) && in rtl88e_dm_hw_ant_div()
1565 pfat_table->main_ant_sum[i] = 0; in rtl88e_dm_hw_ant_div()
1566 pfat_table->aux_ant_sum[i] = 0; in rtl88e_dm_hw_ant_div()
1567 pfat_table->main_ant_cnt[i] = 0; in rtl88e_dm_hw_ant_div()
1568 pfat_table->aux_ant_cnt[i] = 0; in rtl88e_dm_hw_ant_div()
1583 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_set_next_mac_address_target() local
1588 if ((pfat_table->train_idx + 1) == ASSOCIATE_ENTRY_NUM) in rtl88e_set_next_mac_address_target()
1589 pfat_table->train_idx = 0; in rtl88e_set_next_mac_address_target()
1591 pfat_table->train_idx++; in rtl88e_set_next_mac_address_target()
1593 if (pfat_table->train_idx == 0) { in rtl88e_set_next_mac_address_target()
1614 if (j != pfat_table->train_idx) in rtl88e_set_next_mac_address_target()
1634 if (j == pfat_table->train_idx) in rtl88e_set_next_mac_address_target()
1645 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_fast_ant_training() local
1650 if (pfat_table->fat_state == FAT_TRAINING_STATE) { in rtl88e_dm_fast_ant_training()
1652 if (pfat_table->ant_cnt[i] == 0) { in rtl88e_dm_fast_ant_training()
1653 pfat_table->ant_ave[i] = 0; in rtl88e_dm_fast_ant_training()
1655 pfat_table->ant_ave[i] = in rtl88e_dm_fast_ant_training()
1656 pfat_table->ant_sum[i] / in rtl88e_dm_fast_ant_training()
1657 pfat_table->ant_cnt[i]; in rtl88e_dm_fast_ant_training()
1661 if (pfat_table->ant_ave[i] > max_rssi) { in rtl88e_dm_fast_ant_training()
1662 max_rssi = pfat_table->ant_ave[i]; in rtl88e_dm_fast_ant_training()
1679 pfat_table->antsel_a[pfat_table->train_idx] = in rtl88e_dm_fast_ant_training()
1681 pfat_table->antsel_b[pfat_table->train_idx] = in rtl88e_dm_fast_ant_training()
1683 pfat_table->antsel_c[pfat_table->train_idx] = in rtl88e_dm_fast_ant_training()
1691 pfat_table->ant_sum[i] = 0; in rtl88e_dm_fast_ant_training()
1692 pfat_table->ant_cnt[i] = 0; in rtl88e_dm_fast_ant_training()
1695 pfat_table->fat_state = FAT_NORMAL_STATE; in rtl88e_dm_fast_ant_training()
1699 if (pfat_table->fat_state == FAT_NORMAL_STATE) { in rtl88e_dm_fast_ant_training()
1702 pfat_table->fat_state = FAT_TRAINING_STATE; in rtl88e_dm_fast_ant_training()
1726 struct fast_ant_training *pfat_table = &rtldm->fat_table; in rtl88e_dm_antenna_diversity() local
1730 if (pfat_table->becomelinked) { in rtl88e_dm_antenna_diversity()
1739 pfat_table->becomelinked = in rtl88e_dm_antenna_diversity()
1745 if (!pfat_table->becomelinked) { in rtl88e_dm_antenna_diversity()
1754 pfat_table->becomelinked = in rtl88e_dm_antenna_diversity()