Lines Matching refs:tbl
414 static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index) in get_expected_tpt() argument
416 if (tbl->expected_tpt) in get_expected_tpt()
417 return tbl->expected_tpt[rs_index]; in get_expected_tpt()
428 static int rs_collect_tx_data(struct iwl_scale_tbl_info *tbl, in rs_collect_tx_data() argument
439 window = &(tbl->win[scale_index]); in rs_collect_tx_data()
442 tpt = get_expected_tpt(tbl, scale_index); in rs_collect_tx_data()
507 struct iwl_scale_tbl_info *tbl, in rate_n_flags_from_tbl() argument
512 if (is_legacy(tbl->lq_type)) { in rate_n_flags_from_tbl()
517 } else if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
524 if (is_siso(tbl->lq_type)) in rate_n_flags_from_tbl()
526 else if (is_mimo2(tbl->lq_type)) in rate_n_flags_from_tbl()
531 IWL_ERR(priv, "Invalid tbl->lq_type %d\n", tbl->lq_type); in rate_n_flags_from_tbl()
534 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) & in rate_n_flags_from_tbl()
537 if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
538 if (tbl->is_ht40) { in rate_n_flags_from_tbl()
539 if (tbl->is_dup) in rate_n_flags_from_tbl()
544 if (tbl->is_SGI) in rate_n_flags_from_tbl()
549 if (is_siso(tbl->lq_type) && tbl->is_SGI) { in rate_n_flags_from_tbl()
564 struct iwl_scale_tbl_info *tbl, in rs_get_tbl_info_from_mcs() argument
571 memset(tbl, 0, sizeof(struct iwl_scale_tbl_info)); in rs_get_tbl_info_from_mcs()
578 tbl->is_SGI = 0; /* default legacy setup */ in rs_get_tbl_info_from_mcs()
579 tbl->is_ht40 = 0; in rs_get_tbl_info_from_mcs()
580 tbl->is_dup = 0; in rs_get_tbl_info_from_mcs()
581 tbl->ant_type = (ant_msk >> RATE_MCS_ANT_POS); in rs_get_tbl_info_from_mcs()
582 tbl->lq_type = LQ_NONE; in rs_get_tbl_info_from_mcs()
583 tbl->max_search = IWL_MAX_SEARCH; in rs_get_tbl_info_from_mcs()
589 tbl->lq_type = LQ_A; in rs_get_tbl_info_from_mcs()
591 tbl->lq_type = LQ_G; in rs_get_tbl_info_from_mcs()
596 tbl->is_SGI = 1; in rs_get_tbl_info_from_mcs()
600 tbl->is_ht40 = 1; in rs_get_tbl_info_from_mcs()
603 tbl->is_dup = 1; in rs_get_tbl_info_from_mcs()
610 tbl->lq_type = LQ_SISO; /*else NONE*/ in rs_get_tbl_info_from_mcs()
614 tbl->lq_type = LQ_MIMO2; in rs_get_tbl_info_from_mcs()
618 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_get_tbl_info_from_mcs()
619 tbl->lq_type = LQ_MIMO3; in rs_get_tbl_info_from_mcs()
629 struct iwl_scale_tbl_info *tbl) in rs_toggle_antenna() argument
633 if (!tbl->ant_type || tbl->ant_type > ANT_ABC) in rs_toggle_antenna()
636 if (!rs_is_valid_ant(valid_ant, tbl->ant_type)) in rs_toggle_antenna()
639 new_ant_type = ant_toggle_lookup[tbl->ant_type]; in rs_toggle_antenna()
641 while ((new_ant_type != tbl->ant_type) && in rs_toggle_antenna()
645 if (new_ant_type == tbl->ant_type) in rs_toggle_antenna()
648 tbl->ant_type = new_ant_type; in rs_toggle_antenna()
753 struct iwl_scale_tbl_info *tbl, in rs_get_lower_rate() argument
766 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { in rs_get_lower_rate()
770 tbl->lq_type = LQ_A; in rs_get_lower_rate()
772 tbl->lq_type = LQ_G; in rs_get_lower_rate()
774 if (num_of_ant(tbl->ant_type) > 1) in rs_get_lower_rate()
775 tbl->ant_type = in rs_get_lower_rate()
778 tbl->is_ht40 = 0; in rs_get_lower_rate()
779 tbl->is_SGI = 0; in rs_get_lower_rate()
780 tbl->max_search = IWL_MAX_SEARCH; in rs_get_lower_rate()
783 rate_mask = rs_get_supported_rates(lq_sta, NULL, tbl->lq_type); in rs_get_lower_rate()
786 if (is_legacy(tbl->lq_type)) { in rs_get_lower_rate()
802 tbl->lq_type); in rs_get_lower_rate()
809 return rate_n_flags_from_tbl(lq_sta->drv, tbl, low, is_green); in rs_get_lower_rate()
825 struct iwl_scale_tbl_info *tbl; in rs_bt_update_lq() local
834 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_bt_update_lq()
835 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_bt_update_lq()
1065 struct iwl_scale_tbl_info *tbl) in rs_set_expected_tpt_table() argument
1071 if (WARN_ON_ONCE(!is_legacy(tbl->lq_type) && !is_Ht(tbl->lq_type))) { in rs_set_expected_tpt_table()
1072 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1077 if (is_legacy(tbl->lq_type)) { in rs_set_expected_tpt_table()
1078 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1085 if (is_siso(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1087 else if (is_siso(tbl->lq_type)) in rs_set_expected_tpt_table()
1089 else if (is_mimo2(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1091 else if (is_mimo2(tbl->lq_type)) in rs_set_expected_tpt_table()
1093 else if (is_mimo3(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1098 if (!tbl->is_SGI && !lq_sta->is_agg) /* Normal */ in rs_set_expected_tpt_table()
1099 tbl->expected_tpt = ht_tbl_pointer[0]; in rs_set_expected_tpt_table()
1100 else if (tbl->is_SGI && !lq_sta->is_agg) /* SGI */ in rs_set_expected_tpt_table()
1101 tbl->expected_tpt = ht_tbl_pointer[1]; in rs_set_expected_tpt_table()
1102 else if (!tbl->is_SGI && lq_sta->is_agg) /* AGG */ in rs_set_expected_tpt_table()
1103 tbl->expected_tpt = ht_tbl_pointer[2]; in rs_set_expected_tpt_table()
1105 tbl->expected_tpt = ht_tbl_pointer[3]; in rs_set_expected_tpt_table()
1122 struct iwl_scale_tbl_info *tbl, /* "search" */ in rs_get_best_rate() argument
1131 const u16 *tpt_tbl = tbl->expected_tpt; in rs_get_best_rate()
1141 tbl->lq_type); in rs_get_best_rate()
1217 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo2() argument
1237 tbl->lq_type = LQ_MIMO2; in rs_switch_to_mimo2()
1238 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo2()
1239 tbl->action = 0; in rs_switch_to_mimo2()
1240 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_mimo2()
1244 tbl->is_ht40 = 1; in rs_switch_to_mimo2()
1246 tbl->is_ht40 = 0; in rs_switch_to_mimo2()
1248 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo2()
1250 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo2()
1258 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo2()
1261 tbl->current_rate, is_green); in rs_switch_to_mimo2()
1272 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo3() argument
1292 tbl->lq_type = LQ_MIMO3; in rs_switch_to_mimo3()
1293 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo3()
1294 tbl->action = 0; in rs_switch_to_mimo3()
1295 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_switch_to_mimo3()
1299 tbl->is_ht40 = 1; in rs_switch_to_mimo3()
1301 tbl->is_ht40 = 0; in rs_switch_to_mimo3()
1303 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo3()
1305 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo3()
1314 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo3()
1317 tbl->current_rate, is_green); in rs_switch_to_mimo3()
1328 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_siso() argument
1341 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_siso()
1342 tbl->lq_type = LQ_SISO; in rs_switch_to_siso()
1343 tbl->action = 0; in rs_switch_to_siso()
1344 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_siso()
1348 tbl->is_ht40 = 1; in rs_switch_to_siso()
1350 tbl->is_ht40 = 0; in rs_switch_to_siso()
1353 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/ in rs_switch_to_siso()
1355 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_siso()
1356 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_siso()
1364 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_siso()
1366 tbl->current_rate, is_green); in rs_switch_to_siso()
1379 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_legacy_other() local
1382 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_legacy_other()
1397 if (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1398 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1405 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1406 tbl->action != IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1407 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1416 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1418 tbl->action > IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1419 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1424 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1425 else if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1426 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1431 start_action = tbl->action; in rs_move_legacy_other()
1434 switch (tbl->action) { in rs_move_legacy_other()
1439 if ((tbl->action == IWL_LEGACY_SWITCH_ANTENNA1 && in rs_move_legacy_other()
1441 (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1453 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1466 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1482 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1485 if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AB) in rs_move_legacy_other()
1487 else if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AC) in rs_move_legacy_other()
1507 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1523 tbl->action++; in rs_move_legacy_other()
1524 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1525 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1527 if (tbl->action == start_action) in rs_move_legacy_other()
1536 tbl->action++; in rs_move_legacy_other()
1537 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1538 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1540 search_tbl->action = tbl->action; in rs_move_legacy_other()
1552 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_siso_to_other() local
1555 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_siso_to_other()
1571 if (tbl->action == IWL_SISO_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1572 tbl->action = IWL_SISO_SWITCH_MIMO2_AB; in rs_move_siso_to_other()
1579 if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) in rs_move_siso_to_other()
1580 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1588 tbl->action > IWL_SISO_SWITCH_ANTENNA2) { in rs_move_siso_to_other()
1590 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1597 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1598 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1601 start_action = tbl->action; in rs_move_siso_to_other()
1604 switch (tbl->action) { in rs_move_siso_to_other()
1608 if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && in rs_move_siso_to_other()
1610 (tbl->action == IWL_SISO_SWITCH_ANTENNA2 && in rs_move_siso_to_other()
1620 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1631 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1634 if (tbl->action == IWL_SISO_SWITCH_MIMO2_AB) in rs_move_siso_to_other()
1636 else if (tbl->action == IWL_SISO_SWITCH_MIMO2_AC) in rs_move_siso_to_other()
1650 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1653 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1659 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1661 if (!tbl->is_SGI) in rs_move_siso_to_other()
1667 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_siso_to_other()
1669 if (tbl->is_SGI) { in rs_move_siso_to_other()
1681 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1694 tbl->action++; in rs_move_siso_to_other()
1695 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1696 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1698 if (tbl->action == start_action) in rs_move_siso_to_other()
1706 tbl->action++; in rs_move_siso_to_other()
1707 if (tbl->action > IWL_SISO_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1708 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1710 search_tbl->action = tbl->action; in rs_move_siso_to_other()
1722 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo2_to_other() local
1725 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo2_to_other()
1742 if (tbl->action != IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1743 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1747 if (tbl->action == IWL_MIMO2_SWITCH_SISO_B || in rs_move_mimo2_to_other()
1748 tbl->action == IWL_MIMO2_SWITCH_SISO_C) in rs_move_mimo2_to_other()
1749 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1757 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1758 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) { in rs_move_mimo2_to_other()
1760 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1765 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1766 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) in rs_move_mimo2_to_other()
1767 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1769 start_action = tbl->action; in rs_move_mimo2_to_other()
1772 switch (tbl->action) { in rs_move_mimo2_to_other()
1783 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1796 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1798 if (tbl->action == IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1800 else if (tbl->action == IWL_MIMO2_SWITCH_SISO_B) in rs_move_mimo2_to_other()
1816 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1819 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1826 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1827 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo2_to_other()
1835 if (tbl->is_SGI) { in rs_move_mimo2_to_other()
1848 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1862 tbl->action++; in rs_move_mimo2_to_other()
1863 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1864 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1866 if (tbl->action == start_action) in rs_move_mimo2_to_other()
1873 tbl->action++; in rs_move_mimo2_to_other()
1874 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1875 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1877 search_tbl->action = tbl->action; in rs_move_mimo2_to_other()
1890 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo3_to_other() local
1893 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo3_to_other()
1910 if (tbl->action != IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1911 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1915 if (tbl->action == IWL_MIMO3_SWITCH_SISO_B || in rs_move_mimo3_to_other()
1916 tbl->action == IWL_MIMO3_SWITCH_SISO_C) in rs_move_mimo3_to_other()
1917 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1925 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1926 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) { in rs_move_mimo3_to_other()
1928 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1933 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1934 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) in rs_move_mimo3_to_other()
1935 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1937 start_action = tbl->action; in rs_move_mimo3_to_other()
1940 switch (tbl->action) { in rs_move_mimo3_to_other()
1951 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1962 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1964 if (tbl->action == IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1966 else if (tbl->action == IWL_MIMO3_SWITCH_SISO_B) in rs_move_mimo3_to_other()
1986 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1988 if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AB) in rs_move_mimo3_to_other()
1990 else if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AC) in rs_move_mimo3_to_other()
2006 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2009 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2016 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2017 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo3_to_other()
2025 if (tbl->is_SGI) { in rs_move_mimo3_to_other()
2036 tbl->action++; in rs_move_mimo3_to_other()
2037 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2038 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2040 if (tbl->action == start_action) in rs_move_mimo3_to_other()
2047 tbl->action++; in rs_move_mimo3_to_other()
2048 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2049 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2051 search_tbl->action = tbl->action; in rs_move_mimo3_to_other()
2063 struct iwl_scale_tbl_info *tbl; in rs_stay_in_table() local
2072 tbl = &(lq_sta->lq_info[active_tbl]); in rs_stay_in_table()
2123 &(tbl->win[i])); in rs_stay_in_table()
2132 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_stay_in_table()
2143 struct iwl_scale_tbl_info *tbl, in rs_update_rate_tbl() argument
2149 rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_update_rate_tbl()
2178 struct iwl_scale_tbl_info *tbl, *tbl1; in rs_rate_scale_perform() local
2221 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2222 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2232 tbl->lq_type); in rs_rate_scale_perform()
2235 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); in rs_rate_scale_perform()
2240 if (is_legacy(tbl->lq_type)) { in rs_rate_scale_perform()
2259 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2261 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_rate_scale_perform()
2263 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2264 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, in rs_rate_scale_perform()
2271 if (!tbl->expected_tpt) { in rs_rate_scale_perform()
2281 window = &(tbl->win[index]); in rs_rate_scale_perform()
2285 window = &(tbl->win[index]); in rs_rate_scale_perform()
2313 tbl->expected_tpt[index] + 64) / 128)) { in rs_rate_scale_perform()
2316 tbl->expected_tpt[index] + 64) / 128); in rs_rate_scale_perform()
2333 if (!is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2350 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2354 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2357 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2374 tbl->lq_type); in rs_rate_scale_perform()
2388 low_tpt = tbl->win[low].average_tpt; in rs_rate_scale_perform()
2390 high_tpt = tbl->win[high].average_tpt; in rs_rate_scale_perform()
2447 (current_tpt > (100 * tbl->expected_tpt[low])))) in rs_rate_scale_perform()
2449 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2452 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) in rs_rate_scale_perform()
2456 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2470 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2501 index, scale_action, low, high, tbl->lq_type); in rs_rate_scale_perform()
2506 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green); in rs_rate_scale_perform()
2525 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2527 else if (is_siso(tbl->lq_type)) in rs_rate_scale_perform()
2529 else if (is_mimo2(tbl->lq_type)) in rs_rate_scale_perform()
2537 tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); in rs_rate_scale_perform()
2539 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_rate_scale_perform()
2542 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2545 tbl->current_rate, index); in rs_rate_scale_perform()
2546 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_rate_scale_perform()
2589 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_rate_scale_perform()
2611 struct iwl_scale_tbl_info *tbl; in rs_initialize_lq() local
2636 tbl = &(lq_sta->lq_info[active_tbl]); in rs_initialize_lq()
2642 tbl->ant_type = first_antenna(valid_tx_ant); in rs_initialize_lq()
2643 rate |= tbl->ant_type << RATE_MCS_ANT_POS; in rs_initialize_lq()
2648 rs_get_tbl_info_from_mcs(rate, priv->band, tbl, &rate_idx); in rs_initialize_lq()
2649 if (!rs_is_valid_ant(valid_tx_ant, tbl->ant_type)) in rs_initialize_lq()
2650 rs_toggle_antenna(valid_tx_ant, &rate, tbl); in rs_initialize_lq()
2652 rate = rate_n_flags_from_tbl(priv, tbl, rate_idx, use_green); in rs_initialize_lq()
2653 tbl->current_rate = rate; in rs_initialize_lq()
2654 rs_set_expected_tpt_table(lq_sta, tbl); in rs_initialize_lq()
3094 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_sta_dbgfs_scale_table_read() local
3112 (is_legacy(tbl->lq_type)) ? "legacy" : "HT"); in rs_sta_dbgfs_scale_table_read()
3113 if (is_Ht(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3115 (is_siso(tbl->lq_type)) ? "SISO" : in rs_sta_dbgfs_scale_table_read()
3116 ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3")); in rs_sta_dbgfs_scale_table_read()
3118 (tbl->is_ht40) ? "40MHz" : "20MHz"); in rs_sta_dbgfs_scale_table_read()
3120 (tbl->is_SGI) ? "SGI" : "", in rs_sta_dbgfs_scale_table_read()
3152 } else if (is_legacy(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3222 struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; in rs_sta_dbgfs_rate_scale_data_read() local
3226 if (is_Ht(tbl->lq_type)) in rs_sta_dbgfs_rate_scale_data_read()
3229 tbl->expected_tpt[lq_sta->last_txrate_idx]); in rs_sta_dbgfs_rate_scale_data_read()