Lines Matching refs:tbl
436 static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index) in get_expected_tpt() argument
438 if (tbl->expected_tpt) in get_expected_tpt()
439 return tbl->expected_tpt[rs_index]; in get_expected_tpt()
450 static int rs_collect_tx_data(struct iwl_scale_tbl_info *tbl, in rs_collect_tx_data() argument
461 window = &(tbl->win[scale_index]); in rs_collect_tx_data()
464 tpt = get_expected_tpt(tbl, scale_index); in rs_collect_tx_data()
529 struct iwl_scale_tbl_info *tbl, in rate_n_flags_from_tbl() argument
534 if (is_legacy(tbl->lq_type)) { in rate_n_flags_from_tbl()
539 } else if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
546 if (is_siso(tbl->lq_type)) in rate_n_flags_from_tbl()
548 else if (is_mimo2(tbl->lq_type)) in rate_n_flags_from_tbl()
553 IWL_ERR(priv, "Invalid tbl->lq_type %d\n", tbl->lq_type); in rate_n_flags_from_tbl()
556 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) & in rate_n_flags_from_tbl()
559 if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
560 if (tbl->is_ht40) { in rate_n_flags_from_tbl()
561 if (tbl->is_dup) in rate_n_flags_from_tbl()
566 if (tbl->is_SGI) in rate_n_flags_from_tbl()
571 if (is_siso(tbl->lq_type) && tbl->is_SGI) { in rate_n_flags_from_tbl()
586 struct iwl_scale_tbl_info *tbl, in rs_get_tbl_info_from_mcs() argument
593 memset(tbl, 0, sizeof(struct iwl_scale_tbl_info)); in rs_get_tbl_info_from_mcs()
600 tbl->is_SGI = 0; /* default legacy setup */ in rs_get_tbl_info_from_mcs()
601 tbl->is_ht40 = 0; in rs_get_tbl_info_from_mcs()
602 tbl->is_dup = 0; in rs_get_tbl_info_from_mcs()
603 tbl->ant_type = (ant_msk >> RATE_MCS_ANT_POS); in rs_get_tbl_info_from_mcs()
604 tbl->lq_type = LQ_NONE; in rs_get_tbl_info_from_mcs()
605 tbl->max_search = IWL_MAX_SEARCH; in rs_get_tbl_info_from_mcs()
611 tbl->lq_type = LQ_A; in rs_get_tbl_info_from_mcs()
613 tbl->lq_type = LQ_G; in rs_get_tbl_info_from_mcs()
618 tbl->is_SGI = 1; in rs_get_tbl_info_from_mcs()
622 tbl->is_ht40 = 1; in rs_get_tbl_info_from_mcs()
625 tbl->is_dup = 1; in rs_get_tbl_info_from_mcs()
632 tbl->lq_type = LQ_SISO; /*else NONE*/ in rs_get_tbl_info_from_mcs()
636 tbl->lq_type = LQ_MIMO2; in rs_get_tbl_info_from_mcs()
640 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_get_tbl_info_from_mcs()
641 tbl->lq_type = LQ_MIMO3; in rs_get_tbl_info_from_mcs()
651 struct iwl_scale_tbl_info *tbl) in rs_toggle_antenna() argument
655 if (!tbl->ant_type || tbl->ant_type > ANT_ABC) in rs_toggle_antenna()
658 if (!rs_is_valid_ant(valid_ant, tbl->ant_type)) in rs_toggle_antenna()
661 new_ant_type = ant_toggle_lookup[tbl->ant_type]; in rs_toggle_antenna()
663 while ((new_ant_type != tbl->ant_type) && in rs_toggle_antenna()
667 if (new_ant_type == tbl->ant_type) in rs_toggle_antenna()
670 tbl->ant_type = new_ant_type; in rs_toggle_antenna()
775 struct iwl_scale_tbl_info *tbl, in rs_get_lower_rate() argument
788 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { in rs_get_lower_rate()
792 tbl->lq_type = LQ_A; in rs_get_lower_rate()
794 tbl->lq_type = LQ_G; in rs_get_lower_rate()
796 if (num_of_ant(tbl->ant_type) > 1) in rs_get_lower_rate()
797 tbl->ant_type = in rs_get_lower_rate()
800 tbl->is_ht40 = 0; in rs_get_lower_rate()
801 tbl->is_SGI = 0; in rs_get_lower_rate()
802 tbl->max_search = IWL_MAX_SEARCH; in rs_get_lower_rate()
805 rate_mask = rs_get_supported_rates(lq_sta, NULL, tbl->lq_type); in rs_get_lower_rate()
808 if (is_legacy(tbl->lq_type)) { in rs_get_lower_rate()
824 tbl->lq_type); in rs_get_lower_rate()
831 return rate_n_flags_from_tbl(lq_sta->drv, tbl, low, is_green); in rs_get_lower_rate()
847 struct iwl_scale_tbl_info *tbl; in rs_bt_update_lq() local
856 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_bt_update_lq()
857 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_bt_update_lq()
1087 struct iwl_scale_tbl_info *tbl) in rs_set_expected_tpt_table() argument
1093 if (WARN_ON_ONCE(!is_legacy(tbl->lq_type) && !is_Ht(tbl->lq_type))) { in rs_set_expected_tpt_table()
1094 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1099 if (is_legacy(tbl->lq_type)) { in rs_set_expected_tpt_table()
1100 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1107 if (is_siso(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1109 else if (is_siso(tbl->lq_type)) in rs_set_expected_tpt_table()
1111 else if (is_mimo2(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1113 else if (is_mimo2(tbl->lq_type)) in rs_set_expected_tpt_table()
1115 else if (is_mimo3(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1120 if (!tbl->is_SGI && !lq_sta->is_agg) /* Normal */ in rs_set_expected_tpt_table()
1121 tbl->expected_tpt = ht_tbl_pointer[0]; in rs_set_expected_tpt_table()
1122 else if (tbl->is_SGI && !lq_sta->is_agg) /* SGI */ in rs_set_expected_tpt_table()
1123 tbl->expected_tpt = ht_tbl_pointer[1]; in rs_set_expected_tpt_table()
1124 else if (!tbl->is_SGI && lq_sta->is_agg) /* AGG */ in rs_set_expected_tpt_table()
1125 tbl->expected_tpt = ht_tbl_pointer[2]; in rs_set_expected_tpt_table()
1127 tbl->expected_tpt = ht_tbl_pointer[3]; in rs_set_expected_tpt_table()
1144 struct iwl_scale_tbl_info *tbl, /* "search" */ in rs_get_best_rate() argument
1153 const u16 *tpt_tbl = tbl->expected_tpt; in rs_get_best_rate()
1163 tbl->lq_type); in rs_get_best_rate()
1239 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo2() argument
1259 tbl->lq_type = LQ_MIMO2; in rs_switch_to_mimo2()
1260 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo2()
1261 tbl->action = 0; in rs_switch_to_mimo2()
1262 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_mimo2()
1266 tbl->is_ht40 = 1; in rs_switch_to_mimo2()
1268 tbl->is_ht40 = 0; in rs_switch_to_mimo2()
1270 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo2()
1272 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo2()
1280 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo2()
1283 tbl->current_rate, is_green); in rs_switch_to_mimo2()
1294 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo3() argument
1314 tbl->lq_type = LQ_MIMO3; in rs_switch_to_mimo3()
1315 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo3()
1316 tbl->action = 0; in rs_switch_to_mimo3()
1317 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_switch_to_mimo3()
1321 tbl->is_ht40 = 1; in rs_switch_to_mimo3()
1323 tbl->is_ht40 = 0; in rs_switch_to_mimo3()
1325 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo3()
1327 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo3()
1336 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo3()
1339 tbl->current_rate, is_green); in rs_switch_to_mimo3()
1350 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_siso() argument
1363 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_siso()
1364 tbl->lq_type = LQ_SISO; in rs_switch_to_siso()
1365 tbl->action = 0; in rs_switch_to_siso()
1366 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_siso()
1370 tbl->is_ht40 = 1; in rs_switch_to_siso()
1372 tbl->is_ht40 = 0; in rs_switch_to_siso()
1375 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/ in rs_switch_to_siso()
1377 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_siso()
1378 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_siso()
1386 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_siso()
1388 tbl->current_rate, is_green); in rs_switch_to_siso()
1401 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_legacy_other() local
1404 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_legacy_other()
1419 if (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1420 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1427 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1428 tbl->action != IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1429 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1438 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1440 tbl->action > IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1441 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1446 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1447 else if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1448 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1453 start_action = tbl->action; in rs_move_legacy_other()
1456 switch (tbl->action) { in rs_move_legacy_other()
1461 if ((tbl->action == IWL_LEGACY_SWITCH_ANTENNA1 && in rs_move_legacy_other()
1463 (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1475 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1488 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1504 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1507 if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AB) in rs_move_legacy_other()
1509 else if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AC) in rs_move_legacy_other()
1529 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1545 tbl->action++; in rs_move_legacy_other()
1546 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1547 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1549 if (tbl->action == start_action) in rs_move_legacy_other()
1558 tbl->action++; in rs_move_legacy_other()
1559 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1560 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1562 search_tbl->action = tbl->action; in rs_move_legacy_other()
1574 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_siso_to_other() local
1577 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_siso_to_other()
1593 if (tbl->action == IWL_SISO_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1594 tbl->action = IWL_SISO_SWITCH_MIMO2_AB; in rs_move_siso_to_other()
1601 if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) in rs_move_siso_to_other()
1602 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()
1612 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1619 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1620 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1623 start_action = tbl->action; in rs_move_siso_to_other()
1626 switch (tbl->action) { in rs_move_siso_to_other()
1630 if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && in rs_move_siso_to_other()
1632 (tbl->action == IWL_SISO_SWITCH_ANTENNA2 && in rs_move_siso_to_other()
1642 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1653 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1656 if (tbl->action == IWL_SISO_SWITCH_MIMO2_AB) in rs_move_siso_to_other()
1658 else if (tbl->action == IWL_SISO_SWITCH_MIMO2_AC) in rs_move_siso_to_other()
1672 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1675 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1681 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1683 if (!tbl->is_SGI) in rs_move_siso_to_other()
1689 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_siso_to_other()
1691 if (tbl->is_SGI) { in rs_move_siso_to_other()
1703 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1716 tbl->action++; in rs_move_siso_to_other()
1717 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1718 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1720 if (tbl->action == start_action) in rs_move_siso_to_other()
1728 tbl->action++; in rs_move_siso_to_other()
1729 if (tbl->action > IWL_SISO_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1730 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1732 search_tbl->action = tbl->action; in rs_move_siso_to_other()
1744 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo2_to_other() local
1747 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo2_to_other()
1764 if (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()
1769 if (tbl->action == IWL_MIMO2_SWITCH_SISO_B || in rs_move_mimo2_to_other()
1770 tbl->action == IWL_MIMO2_SWITCH_SISO_C) in rs_move_mimo2_to_other()
1771 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1779 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1780 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) { in rs_move_mimo2_to_other()
1782 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1787 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1788 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) in rs_move_mimo2_to_other()
1789 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1791 start_action = tbl->action; in rs_move_mimo2_to_other()
1794 switch (tbl->action) { in rs_move_mimo2_to_other()
1805 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1818 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1820 if (tbl->action == IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1822 else if (tbl->action == IWL_MIMO2_SWITCH_SISO_B) in rs_move_mimo2_to_other()
1838 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1841 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1848 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1849 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo2_to_other()
1857 if (tbl->is_SGI) { in rs_move_mimo2_to_other()
1870 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1884 tbl->action++; in rs_move_mimo2_to_other()
1885 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1886 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1888 if (tbl->action == start_action) in rs_move_mimo2_to_other()
1895 tbl->action++; in rs_move_mimo2_to_other()
1896 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1897 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1899 search_tbl->action = tbl->action; in rs_move_mimo2_to_other()
1912 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo3_to_other() local
1915 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo3_to_other()
1932 if (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()
1937 if (tbl->action == IWL_MIMO3_SWITCH_SISO_B || in rs_move_mimo3_to_other()
1938 tbl->action == IWL_MIMO3_SWITCH_SISO_C) in rs_move_mimo3_to_other()
1939 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1947 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1948 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) { in rs_move_mimo3_to_other()
1950 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1955 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1956 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) in rs_move_mimo3_to_other()
1957 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1959 start_action = tbl->action; in rs_move_mimo3_to_other()
1962 switch (tbl->action) { in rs_move_mimo3_to_other()
1973 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1984 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1986 if (tbl->action == IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1988 else if (tbl->action == IWL_MIMO3_SWITCH_SISO_B) in rs_move_mimo3_to_other()
2008 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2010 if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AB) in rs_move_mimo3_to_other()
2012 else if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AC) in rs_move_mimo3_to_other()
2028 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2031 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2038 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2039 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo3_to_other()
2047 if (tbl->is_SGI) { in rs_move_mimo3_to_other()
2058 tbl->action++; in rs_move_mimo3_to_other()
2059 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2060 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2062 if (tbl->action == start_action) in rs_move_mimo3_to_other()
2069 tbl->action++; in rs_move_mimo3_to_other()
2070 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2071 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2073 search_tbl->action = tbl->action; in rs_move_mimo3_to_other()
2085 struct iwl_scale_tbl_info *tbl; in rs_stay_in_table() local
2094 tbl = &(lq_sta->lq_info[active_tbl]); in rs_stay_in_table()
2145 &(tbl->win[i])); in rs_stay_in_table()
2154 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_stay_in_table()
2165 struct iwl_scale_tbl_info *tbl, in rs_update_rate_tbl() argument
2171 rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_update_rate_tbl()
2200 struct iwl_scale_tbl_info *tbl, *tbl1; in rs_rate_scale_perform() local
2243 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2244 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2254 tbl->lq_type); in rs_rate_scale_perform()
2257 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); in rs_rate_scale_perform()
2262 if (is_legacy(tbl->lq_type)) { in rs_rate_scale_perform()
2281 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2283 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_rate_scale_perform()
2285 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2286 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, in rs_rate_scale_perform()
2293 if (!tbl->expected_tpt) { in rs_rate_scale_perform()
2303 window = &(tbl->win[index]); in rs_rate_scale_perform()
2307 window = &(tbl->win[index]); in rs_rate_scale_perform()
2335 tbl->expected_tpt[index] + 64) / 128)) { in rs_rate_scale_perform()
2338 tbl->expected_tpt[index] + 64) / 128); in rs_rate_scale_perform()
2355 if (!is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2372 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2376 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2379 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2396 tbl->lq_type); in rs_rate_scale_perform()
2410 low_tpt = tbl->win[low].average_tpt; in rs_rate_scale_perform()
2412 high_tpt = tbl->win[high].average_tpt; in rs_rate_scale_perform()
2469 (current_tpt > (100 * tbl->expected_tpt[low])))) in rs_rate_scale_perform()
2471 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2474 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) in rs_rate_scale_perform()
2478 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2492 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2523 index, scale_action, low, high, tbl->lq_type); in rs_rate_scale_perform()
2528 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green); in rs_rate_scale_perform()
2547 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2549 else if (is_siso(tbl->lq_type)) in rs_rate_scale_perform()
2551 else if (is_mimo2(tbl->lq_type)) in rs_rate_scale_perform()
2559 tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); in rs_rate_scale_perform()
2561 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_rate_scale_perform()
2564 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2567 tbl->current_rate, index); in rs_rate_scale_perform()
2568 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_rate_scale_perform()
2611 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_rate_scale_perform()
2633 struct iwl_scale_tbl_info *tbl; in rs_initialize_lq() local
2658 tbl = &(lq_sta->lq_info[active_tbl]); in rs_initialize_lq()
2664 tbl->ant_type = first_antenna(valid_tx_ant); in rs_initialize_lq()
2665 rate |= tbl->ant_type << RATE_MCS_ANT_POS; in rs_initialize_lq()
2670 rs_get_tbl_info_from_mcs(rate, priv->band, tbl, &rate_idx); in rs_initialize_lq()
2671 if (!rs_is_valid_ant(valid_tx_ant, tbl->ant_type)) in rs_initialize_lq()
2672 rs_toggle_antenna(valid_tx_ant, &rate, tbl); in rs_initialize_lq()
2674 rate = rate_n_flags_from_tbl(priv, tbl, rate_idx, use_green); in rs_initialize_lq()
2675 tbl->current_rate = rate; in rs_initialize_lq()
2676 rs_set_expected_tpt_table(lq_sta, tbl); in rs_initialize_lq()
3099 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_sta_dbgfs_scale_table_read() local
3117 (is_legacy(tbl->lq_type)) ? "legacy" : "HT"); in rs_sta_dbgfs_scale_table_read()
3118 if (is_Ht(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3120 (is_siso(tbl->lq_type)) ? "SISO" : in rs_sta_dbgfs_scale_table_read()
3121 ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3")); in rs_sta_dbgfs_scale_table_read()
3123 (tbl->is_ht40) ? "40MHz" : "20MHz"); in rs_sta_dbgfs_scale_table_read()
3125 (tbl->is_SGI) ? "SGI" : "", in rs_sta_dbgfs_scale_table_read()
3154 if (is_legacy(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3224 struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; in rs_sta_dbgfs_rate_scale_data_read() local
3228 if (is_Ht(tbl->lq_type)) in rs_sta_dbgfs_rate_scale_data_read()
3231 tbl->expected_tpt[lq_sta->last_txrate_idx]); in rs_sta_dbgfs_rate_scale_data_read()