Lines Matching refs:tbl
453 static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index) in get_expected_tpt() argument
455 if (tbl->expected_tpt) in get_expected_tpt()
456 return tbl->expected_tpt[rs_index]; in get_expected_tpt()
467 static int rs_collect_tx_data(struct iwl_scale_tbl_info *tbl, in rs_collect_tx_data() argument
478 window = &(tbl->win[scale_index]); in rs_collect_tx_data()
481 tpt = get_expected_tpt(tbl, scale_index); in rs_collect_tx_data()
546 struct iwl_scale_tbl_info *tbl, in rate_n_flags_from_tbl() argument
551 if (is_legacy(tbl->lq_type)) { in rate_n_flags_from_tbl()
556 } else if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
563 if (is_siso(tbl->lq_type)) in rate_n_flags_from_tbl()
565 else if (is_mimo2(tbl->lq_type)) in rate_n_flags_from_tbl()
570 IWL_ERR(priv, "Invalid tbl->lq_type %d\n", tbl->lq_type); in rate_n_flags_from_tbl()
573 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) & in rate_n_flags_from_tbl()
576 if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
577 if (tbl->is_ht40) { in rate_n_flags_from_tbl()
578 if (tbl->is_dup) in rate_n_flags_from_tbl()
583 if (tbl->is_SGI) in rate_n_flags_from_tbl()
588 if (is_siso(tbl->lq_type) && tbl->is_SGI) { in rate_n_flags_from_tbl()
603 struct iwl_scale_tbl_info *tbl, in rs_get_tbl_info_from_mcs() argument
610 memset(tbl, 0, sizeof(struct iwl_scale_tbl_info)); in rs_get_tbl_info_from_mcs()
617 tbl->is_SGI = 0; /* default legacy setup */ in rs_get_tbl_info_from_mcs()
618 tbl->is_ht40 = 0; in rs_get_tbl_info_from_mcs()
619 tbl->is_dup = 0; in rs_get_tbl_info_from_mcs()
620 tbl->ant_type = (ant_msk >> RATE_MCS_ANT_POS); in rs_get_tbl_info_from_mcs()
621 tbl->lq_type = LQ_NONE; in rs_get_tbl_info_from_mcs()
622 tbl->max_search = IWL_MAX_SEARCH; in rs_get_tbl_info_from_mcs()
628 tbl->lq_type = LQ_A; in rs_get_tbl_info_from_mcs()
630 tbl->lq_type = LQ_G; in rs_get_tbl_info_from_mcs()
635 tbl->is_SGI = 1; in rs_get_tbl_info_from_mcs()
639 tbl->is_ht40 = 1; in rs_get_tbl_info_from_mcs()
642 tbl->is_dup = 1; in rs_get_tbl_info_from_mcs()
649 tbl->lq_type = LQ_SISO; /*else NONE*/ in rs_get_tbl_info_from_mcs()
653 tbl->lq_type = LQ_MIMO2; in rs_get_tbl_info_from_mcs()
657 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_get_tbl_info_from_mcs()
658 tbl->lq_type = LQ_MIMO3; in rs_get_tbl_info_from_mcs()
668 struct iwl_scale_tbl_info *tbl) in rs_toggle_antenna() argument
672 if (!tbl->ant_type || tbl->ant_type > ANT_ABC) in rs_toggle_antenna()
675 if (!rs_is_valid_ant(valid_ant, tbl->ant_type)) in rs_toggle_antenna()
678 new_ant_type = ant_toggle_lookup[tbl->ant_type]; in rs_toggle_antenna()
680 while ((new_ant_type != tbl->ant_type) && in rs_toggle_antenna()
684 if (new_ant_type == tbl->ant_type) in rs_toggle_antenna()
687 tbl->ant_type = new_ant_type; in rs_toggle_antenna()
789 struct iwl_scale_tbl_info *tbl, in rs_get_lower_rate() argument
802 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { in rs_get_lower_rate()
806 tbl->lq_type = LQ_A; in rs_get_lower_rate()
808 tbl->lq_type = LQ_G; in rs_get_lower_rate()
810 if (num_of_ant(tbl->ant_type) > 1) in rs_get_lower_rate()
811 tbl->ant_type = in rs_get_lower_rate()
814 tbl->is_ht40 = 0; in rs_get_lower_rate()
815 tbl->is_SGI = 0; in rs_get_lower_rate()
816 tbl->max_search = IWL_MAX_SEARCH; in rs_get_lower_rate()
819 rate_mask = rs_get_supported_rates(lq_sta, NULL, tbl->lq_type); in rs_get_lower_rate()
822 if (is_legacy(tbl->lq_type)) { in rs_get_lower_rate()
838 tbl->lq_type); in rs_get_lower_rate()
845 return rate_n_flags_from_tbl(lq_sta->drv, tbl, low, is_green); in rs_get_lower_rate()
861 struct iwl_scale_tbl_info *tbl; in rs_bt_update_lq() local
880 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_bt_update_lq()
881 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_bt_update_lq()
1111 struct iwl_scale_tbl_info *tbl) in rs_set_expected_tpt_table() argument
1117 if (WARN_ON_ONCE(!is_legacy(tbl->lq_type) && !is_Ht(tbl->lq_type))) { in rs_set_expected_tpt_table()
1118 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1123 if (is_legacy(tbl->lq_type)) { in rs_set_expected_tpt_table()
1124 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1131 if (is_siso(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1133 else if (is_siso(tbl->lq_type)) in rs_set_expected_tpt_table()
1135 else if (is_mimo2(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1137 else if (is_mimo2(tbl->lq_type)) in rs_set_expected_tpt_table()
1139 else if (is_mimo3(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1144 if (!tbl->is_SGI && !lq_sta->is_agg) /* Normal */ in rs_set_expected_tpt_table()
1145 tbl->expected_tpt = ht_tbl_pointer[0]; in rs_set_expected_tpt_table()
1146 else if (tbl->is_SGI && !lq_sta->is_agg) /* SGI */ in rs_set_expected_tpt_table()
1147 tbl->expected_tpt = ht_tbl_pointer[1]; in rs_set_expected_tpt_table()
1148 else if (!tbl->is_SGI && lq_sta->is_agg) /* AGG */ in rs_set_expected_tpt_table()
1149 tbl->expected_tpt = ht_tbl_pointer[2]; in rs_set_expected_tpt_table()
1151 tbl->expected_tpt = ht_tbl_pointer[3]; in rs_set_expected_tpt_table()
1168 struct iwl_scale_tbl_info *tbl, /* "search" */ in rs_get_best_rate() argument
1177 const u16 *tpt_tbl = tbl->expected_tpt; in rs_get_best_rate()
1187 tbl->lq_type); in rs_get_best_rate()
1263 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo2() argument
1283 tbl->lq_type = LQ_MIMO2; in rs_switch_to_mimo2()
1284 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo2()
1285 tbl->action = 0; in rs_switch_to_mimo2()
1286 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_mimo2()
1290 tbl->is_ht40 = 1; in rs_switch_to_mimo2()
1292 tbl->is_ht40 = 0; in rs_switch_to_mimo2()
1294 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo2()
1296 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo2()
1304 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo2()
1307 tbl->current_rate, is_green); in rs_switch_to_mimo2()
1318 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo3() argument
1338 tbl->lq_type = LQ_MIMO3; in rs_switch_to_mimo3()
1339 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo3()
1340 tbl->action = 0; in rs_switch_to_mimo3()
1341 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_switch_to_mimo3()
1345 tbl->is_ht40 = 1; in rs_switch_to_mimo3()
1347 tbl->is_ht40 = 0; in rs_switch_to_mimo3()
1349 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo3()
1351 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo3()
1360 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo3()
1363 tbl->current_rate, is_green); in rs_switch_to_mimo3()
1374 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_siso() argument
1387 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_siso()
1388 tbl->lq_type = LQ_SISO; in rs_switch_to_siso()
1389 tbl->action = 0; in rs_switch_to_siso()
1390 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_siso()
1394 tbl->is_ht40 = 1; in rs_switch_to_siso()
1396 tbl->is_ht40 = 0; in rs_switch_to_siso()
1399 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/ in rs_switch_to_siso()
1401 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_siso()
1402 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_siso()
1410 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_siso()
1412 tbl->current_rate, is_green); in rs_switch_to_siso()
1425 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_legacy_other() local
1428 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_legacy_other()
1443 if (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1444 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1451 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1452 tbl->action != IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1453 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1462 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1464 tbl->action > IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1465 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1470 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1471 else if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1472 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1477 start_action = tbl->action; in rs_move_legacy_other()
1480 switch (tbl->action) { in rs_move_legacy_other()
1485 if ((tbl->action == IWL_LEGACY_SWITCH_ANTENNA1 && in rs_move_legacy_other()
1487 (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1499 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1512 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1528 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1531 if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AB) in rs_move_legacy_other()
1533 else if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AC) in rs_move_legacy_other()
1553 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1569 tbl->action++; in rs_move_legacy_other()
1570 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1571 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1573 if (tbl->action == start_action) in rs_move_legacy_other()
1582 tbl->action++; in rs_move_legacy_other()
1583 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1584 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1586 search_tbl->action = tbl->action; in rs_move_legacy_other()
1600 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_siso_to_other() local
1603 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_siso_to_other()
1619 if (tbl->action == IWL_SISO_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1620 tbl->action = IWL_SISO_SWITCH_MIMO2_AB; in rs_move_siso_to_other()
1627 if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) in rs_move_siso_to_other()
1628 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1636 tbl->action > IWL_SISO_SWITCH_ANTENNA2) { in rs_move_siso_to_other()
1638 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1645 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1646 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1649 start_action = tbl->action; in rs_move_siso_to_other()
1652 switch (tbl->action) { in rs_move_siso_to_other()
1656 if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && in rs_move_siso_to_other()
1658 (tbl->action == IWL_SISO_SWITCH_ANTENNA2 && in rs_move_siso_to_other()
1668 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1679 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1682 if (tbl->action == IWL_SISO_SWITCH_MIMO2_AB) in rs_move_siso_to_other()
1684 else if (tbl->action == IWL_SISO_SWITCH_MIMO2_AC) in rs_move_siso_to_other()
1698 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1701 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1707 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1709 if (!tbl->is_SGI) in rs_move_siso_to_other()
1715 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_siso_to_other()
1717 if (tbl->is_SGI) { in rs_move_siso_to_other()
1729 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1742 tbl->action++; in rs_move_siso_to_other()
1743 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1744 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1746 if (tbl->action == start_action) in rs_move_siso_to_other()
1754 tbl->action++; in rs_move_siso_to_other()
1755 if (tbl->action > IWL_SISO_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1756 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1758 search_tbl->action = tbl->action; in rs_move_siso_to_other()
1772 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo2_to_other() local
1775 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo2_to_other()
1792 if (tbl->action != IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1793 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1797 if (tbl->action == IWL_MIMO2_SWITCH_SISO_B || in rs_move_mimo2_to_other()
1798 tbl->action == IWL_MIMO2_SWITCH_SISO_C) in rs_move_mimo2_to_other()
1799 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1807 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1808 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) { in rs_move_mimo2_to_other()
1810 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1815 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1816 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) in rs_move_mimo2_to_other()
1817 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1819 start_action = tbl->action; in rs_move_mimo2_to_other()
1822 switch (tbl->action) { in rs_move_mimo2_to_other()
1833 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1846 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1848 if (tbl->action == IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1850 else if (tbl->action == IWL_MIMO2_SWITCH_SISO_B) in rs_move_mimo2_to_other()
1866 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1869 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1876 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1877 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo2_to_other()
1885 if (tbl->is_SGI) { in rs_move_mimo2_to_other()
1898 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1912 tbl->action++; in rs_move_mimo2_to_other()
1913 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1914 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1916 if (tbl->action == start_action) in rs_move_mimo2_to_other()
1923 tbl->action++; in rs_move_mimo2_to_other()
1924 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1925 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1927 search_tbl->action = tbl->action; in rs_move_mimo2_to_other()
1942 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo3_to_other() local
1945 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo3_to_other()
1962 if (tbl->action != IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1963 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1967 if (tbl->action == IWL_MIMO3_SWITCH_SISO_B || in rs_move_mimo3_to_other()
1968 tbl->action == IWL_MIMO3_SWITCH_SISO_C) in rs_move_mimo3_to_other()
1969 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1977 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1978 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) { in rs_move_mimo3_to_other()
1980 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1985 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1986 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) in rs_move_mimo3_to_other()
1987 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1989 start_action = tbl->action; in rs_move_mimo3_to_other()
1992 switch (tbl->action) { in rs_move_mimo3_to_other()
2003 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2014 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2016 if (tbl->action == IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
2018 else if (tbl->action == IWL_MIMO3_SWITCH_SISO_B) in rs_move_mimo3_to_other()
2038 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2040 if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AB) in rs_move_mimo3_to_other()
2042 else if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AC) in rs_move_mimo3_to_other()
2058 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2061 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2068 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2069 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo3_to_other()
2077 if (tbl->is_SGI) { in rs_move_mimo3_to_other()
2088 tbl->action++; in rs_move_mimo3_to_other()
2089 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2090 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2092 if (tbl->action == start_action) in rs_move_mimo3_to_other()
2099 tbl->action++; in rs_move_mimo3_to_other()
2100 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2101 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2103 search_tbl->action = tbl->action; in rs_move_mimo3_to_other()
2118 struct iwl_scale_tbl_info *tbl; in rs_stay_in_table() local
2127 tbl = &(lq_sta->lq_info[active_tbl]); in rs_stay_in_table()
2178 &(tbl->win[i])); in rs_stay_in_table()
2187 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_stay_in_table()
2198 struct iwl_scale_tbl_info *tbl, in rs_update_rate_tbl() argument
2204 rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_update_rate_tbl()
2233 struct iwl_scale_tbl_info *tbl, *tbl1; in rs_rate_scale_perform() local
2276 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2277 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2287 tbl->lq_type); in rs_rate_scale_perform()
2290 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); in rs_rate_scale_perform()
2295 if (is_legacy(tbl->lq_type)) { in rs_rate_scale_perform()
2314 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2316 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_rate_scale_perform()
2318 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2319 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, in rs_rate_scale_perform()
2326 if (!tbl->expected_tpt) { in rs_rate_scale_perform()
2336 window = &(tbl->win[index]); in rs_rate_scale_perform()
2340 window = &(tbl->win[index]); in rs_rate_scale_perform()
2368 tbl->expected_tpt[index] + 64) / 128)) { in rs_rate_scale_perform()
2371 tbl->expected_tpt[index] + 64) / 128); in rs_rate_scale_perform()
2388 if (!is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2405 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2409 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2412 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2429 tbl->lq_type); in rs_rate_scale_perform()
2443 low_tpt = tbl->win[low].average_tpt; in rs_rate_scale_perform()
2445 high_tpt = tbl->win[high].average_tpt; in rs_rate_scale_perform()
2502 (current_tpt > (100 * tbl->expected_tpt[low])))) in rs_rate_scale_perform()
2504 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2507 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) in rs_rate_scale_perform()
2511 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2525 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2556 index, scale_action, low, high, tbl->lq_type); in rs_rate_scale_perform()
2561 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green); in rs_rate_scale_perform()
2580 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2582 else if (is_siso(tbl->lq_type)) in rs_rate_scale_perform()
2584 else if (is_mimo2(tbl->lq_type)) in rs_rate_scale_perform()
2592 tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); in rs_rate_scale_perform()
2594 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_rate_scale_perform()
2597 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2600 tbl->current_rate, index); in rs_rate_scale_perform()
2601 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_rate_scale_perform()
2644 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_rate_scale_perform()
2666 struct iwl_scale_tbl_info *tbl; in rs_initialize_lq() local
2691 tbl = &(lq_sta->lq_info[active_tbl]); in rs_initialize_lq()
2697 tbl->ant_type = first_antenna(valid_tx_ant); in rs_initialize_lq()
2698 rate |= tbl->ant_type << RATE_MCS_ANT_POS; in rs_initialize_lq()
2703 rs_get_tbl_info_from_mcs(rate, priv->band, tbl, &rate_idx); in rs_initialize_lq()
2704 if (!rs_is_valid_ant(valid_tx_ant, tbl->ant_type)) in rs_initialize_lq()
2705 rs_toggle_antenna(valid_tx_ant, &rate, tbl); in rs_initialize_lq()
2707 rate = rate_n_flags_from_tbl(priv, tbl, rate_idx, use_green); in rs_initialize_lq()
2708 tbl->current_rate = rate; in rs_initialize_lq()
2709 rs_set_expected_tpt_table(lq_sta, tbl); in rs_initialize_lq()
3136 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_sta_dbgfs_scale_table_read() local
3154 (is_legacy(tbl->lq_type)) ? "legacy" : "HT"); in rs_sta_dbgfs_scale_table_read()
3155 if (is_Ht(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3157 (is_siso(tbl->lq_type)) ? "SISO" : in rs_sta_dbgfs_scale_table_read()
3158 ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3")); in rs_sta_dbgfs_scale_table_read()
3160 (tbl->is_ht40) ? "40MHz" : "20MHz"); in rs_sta_dbgfs_scale_table_read()
3162 (tbl->is_SGI) ? "SGI" : "", in rs_sta_dbgfs_scale_table_read()
3191 if (is_legacy(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3261 struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; in rs_sta_dbgfs_rate_scale_data_read() local
3265 if (is_Ht(tbl->lq_type)) in rs_sta_dbgfs_rate_scale_data_read()
3268 tbl->expected_tpt[lq_sta->last_txrate_idx]); in rs_sta_dbgfs_rate_scale_data_read()