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()
1598 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_siso_to_other() local
1601 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_siso_to_other()
1617 if (tbl->action == IWL_SISO_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1618 tbl->action = IWL_SISO_SWITCH_MIMO2_AB; in rs_move_siso_to_other()
1625 if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) in rs_move_siso_to_other()
1626 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1634 tbl->action > IWL_SISO_SWITCH_ANTENNA2) { in rs_move_siso_to_other()
1636 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1643 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1644 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1647 start_action = tbl->action; in rs_move_siso_to_other()
1650 switch (tbl->action) { in rs_move_siso_to_other()
1654 if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && in rs_move_siso_to_other()
1656 (tbl->action == IWL_SISO_SWITCH_ANTENNA2 && in rs_move_siso_to_other()
1666 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1677 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1680 if (tbl->action == IWL_SISO_SWITCH_MIMO2_AB) in rs_move_siso_to_other()
1682 else if (tbl->action == IWL_SISO_SWITCH_MIMO2_AC) in rs_move_siso_to_other()
1696 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1699 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1705 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1707 if (!tbl->is_SGI) in rs_move_siso_to_other()
1713 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_siso_to_other()
1715 if (tbl->is_SGI) { in rs_move_siso_to_other()
1727 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1740 tbl->action++; in rs_move_siso_to_other()
1741 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1742 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1744 if (tbl->action == start_action) in rs_move_siso_to_other()
1752 tbl->action++; in rs_move_siso_to_other()
1753 if (tbl->action > IWL_SISO_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1754 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1756 search_tbl->action = tbl->action; in rs_move_siso_to_other()
1768 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo2_to_other() local
1771 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo2_to_other()
1788 if (tbl->action != IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1789 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1793 if (tbl->action == IWL_MIMO2_SWITCH_SISO_B || in rs_move_mimo2_to_other()
1794 tbl->action == IWL_MIMO2_SWITCH_SISO_C) in rs_move_mimo2_to_other()
1795 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1803 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1804 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) { in rs_move_mimo2_to_other()
1806 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1811 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1812 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) in rs_move_mimo2_to_other()
1813 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1815 start_action = tbl->action; in rs_move_mimo2_to_other()
1818 switch (tbl->action) { in rs_move_mimo2_to_other()
1829 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1842 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1844 if (tbl->action == IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1846 else if (tbl->action == IWL_MIMO2_SWITCH_SISO_B) in rs_move_mimo2_to_other()
1862 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1865 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1872 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1873 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo2_to_other()
1881 if (tbl->is_SGI) { in rs_move_mimo2_to_other()
1894 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1908 tbl->action++; in rs_move_mimo2_to_other()
1909 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1910 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1912 if (tbl->action == start_action) in rs_move_mimo2_to_other()
1919 tbl->action++; in rs_move_mimo2_to_other()
1920 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1921 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1923 search_tbl->action = tbl->action; in rs_move_mimo2_to_other()
1936 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo3_to_other() local
1939 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo3_to_other()
1956 if (tbl->action != IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1957 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1961 if (tbl->action == IWL_MIMO3_SWITCH_SISO_B || in rs_move_mimo3_to_other()
1962 tbl->action == IWL_MIMO3_SWITCH_SISO_C) in rs_move_mimo3_to_other()
1963 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1971 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1972 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) { in rs_move_mimo3_to_other()
1974 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1979 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1980 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) in rs_move_mimo3_to_other()
1981 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1983 start_action = tbl->action; in rs_move_mimo3_to_other()
1986 switch (tbl->action) { in rs_move_mimo3_to_other()
1997 memcpy(search_tbl, tbl, sz); 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_SISO_A) in rs_move_mimo3_to_other()
2012 else if (tbl->action == IWL_MIMO3_SWITCH_SISO_B) in rs_move_mimo3_to_other()
2032 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2034 if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AB) in rs_move_mimo3_to_other()
2036 else if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AC) in rs_move_mimo3_to_other()
2052 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2055 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2062 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2063 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo3_to_other()
2071 if (tbl->is_SGI) { in rs_move_mimo3_to_other()
2082 tbl->action++; in rs_move_mimo3_to_other()
2083 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2084 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2086 if (tbl->action == start_action) in rs_move_mimo3_to_other()
2093 tbl->action++; in rs_move_mimo3_to_other()
2094 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2095 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2097 search_tbl->action = tbl->action; in rs_move_mimo3_to_other()
2109 struct iwl_scale_tbl_info *tbl; in rs_stay_in_table() local
2118 tbl = &(lq_sta->lq_info[active_tbl]); in rs_stay_in_table()
2169 &(tbl->win[i])); in rs_stay_in_table()
2178 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_stay_in_table()
2189 struct iwl_scale_tbl_info *tbl, in rs_update_rate_tbl() argument
2195 rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_update_rate_tbl()
2224 struct iwl_scale_tbl_info *tbl, *tbl1; in rs_rate_scale_perform() local
2267 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2268 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2278 tbl->lq_type); in rs_rate_scale_perform()
2281 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); in rs_rate_scale_perform()
2286 if (is_legacy(tbl->lq_type)) { in rs_rate_scale_perform()
2305 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2307 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_rate_scale_perform()
2309 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2310 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, in rs_rate_scale_perform()
2317 if (!tbl->expected_tpt) { in rs_rate_scale_perform()
2327 window = &(tbl->win[index]); in rs_rate_scale_perform()
2331 window = &(tbl->win[index]); in rs_rate_scale_perform()
2359 tbl->expected_tpt[index] + 64) / 128)) { in rs_rate_scale_perform()
2362 tbl->expected_tpt[index] + 64) / 128); in rs_rate_scale_perform()
2379 if (!is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2396 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2400 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2403 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2420 tbl->lq_type); in rs_rate_scale_perform()
2434 low_tpt = tbl->win[low].average_tpt; in rs_rate_scale_perform()
2436 high_tpt = tbl->win[high].average_tpt; in rs_rate_scale_perform()
2493 (current_tpt > (100 * tbl->expected_tpt[low])))) in rs_rate_scale_perform()
2495 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2498 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) in rs_rate_scale_perform()
2502 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2516 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2547 index, scale_action, low, high, tbl->lq_type); in rs_rate_scale_perform()
2552 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green); in rs_rate_scale_perform()
2571 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2573 else if (is_siso(tbl->lq_type)) in rs_rate_scale_perform()
2575 else if (is_mimo2(tbl->lq_type)) in rs_rate_scale_perform()
2583 tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); in rs_rate_scale_perform()
2585 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_rate_scale_perform()
2588 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2591 tbl->current_rate, index); in rs_rate_scale_perform()
2592 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_rate_scale_perform()
2635 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_rate_scale_perform()
2657 struct iwl_scale_tbl_info *tbl; in rs_initialize_lq() local
2682 tbl = &(lq_sta->lq_info[active_tbl]); in rs_initialize_lq()
2688 tbl->ant_type = first_antenna(valid_tx_ant); in rs_initialize_lq()
2689 rate |= tbl->ant_type << RATE_MCS_ANT_POS; in rs_initialize_lq()
2694 rs_get_tbl_info_from_mcs(rate, priv->band, tbl, &rate_idx); in rs_initialize_lq()
2695 if (!rs_is_valid_ant(valid_tx_ant, tbl->ant_type)) in rs_initialize_lq()
2696 rs_toggle_antenna(valid_tx_ant, &rate, tbl); in rs_initialize_lq()
2698 rate = rate_n_flags_from_tbl(priv, tbl, rate_idx, use_green); in rs_initialize_lq()
2699 tbl->current_rate = rate; in rs_initialize_lq()
2700 rs_set_expected_tpt_table(lq_sta, tbl); in rs_initialize_lq()
3127 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_sta_dbgfs_scale_table_read() local
3145 (is_legacy(tbl->lq_type)) ? "legacy" : "HT"); in rs_sta_dbgfs_scale_table_read()
3146 if (is_Ht(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3148 (is_siso(tbl->lq_type)) ? "SISO" : in rs_sta_dbgfs_scale_table_read()
3149 ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3")); in rs_sta_dbgfs_scale_table_read()
3151 (tbl->is_ht40) ? "40MHz" : "20MHz"); in rs_sta_dbgfs_scale_table_read()
3153 (tbl->is_SGI) ? "SGI" : "", in rs_sta_dbgfs_scale_table_read()
3182 if (is_legacy(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3252 struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; in rs_sta_dbgfs_rate_scale_data_read() local
3256 if (is_Ht(tbl->lq_type)) in rs_sta_dbgfs_rate_scale_data_read()
3259 tbl->expected_tpt[lq_sta->last_txrate_idx]); in rs_sta_dbgfs_rate_scale_data_read()