Lines Matching refs:tbl

431 static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index)  in get_expected_tpt()  argument
433 if (tbl->expected_tpt) in get_expected_tpt()
434 return tbl->expected_tpt[rs_index]; in get_expected_tpt()
445 static int rs_collect_tx_data(struct iwl_scale_tbl_info *tbl, in rs_collect_tx_data() argument
456 window = &(tbl->win[scale_index]); in rs_collect_tx_data()
459 tpt = get_expected_tpt(tbl, scale_index); in rs_collect_tx_data()
524 struct iwl_scale_tbl_info *tbl, in rate_n_flags_from_tbl() argument
529 if (is_legacy(tbl->lq_type)) { in rate_n_flags_from_tbl()
534 } else if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
541 if (is_siso(tbl->lq_type)) in rate_n_flags_from_tbl()
543 else if (is_mimo2(tbl->lq_type)) in rate_n_flags_from_tbl()
548 IWL_ERR(priv, "Invalid tbl->lq_type %d\n", tbl->lq_type); in rate_n_flags_from_tbl()
551 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) & in rate_n_flags_from_tbl()
554 if (is_Ht(tbl->lq_type)) { in rate_n_flags_from_tbl()
555 if (tbl->is_ht40) { in rate_n_flags_from_tbl()
556 if (tbl->is_dup) in rate_n_flags_from_tbl()
561 if (tbl->is_SGI) in rate_n_flags_from_tbl()
566 if (is_siso(tbl->lq_type) && tbl->is_SGI) { in rate_n_flags_from_tbl()
581 struct iwl_scale_tbl_info *tbl, in rs_get_tbl_info_from_mcs() argument
588 memset(tbl, 0, sizeof(struct iwl_scale_tbl_info)); in rs_get_tbl_info_from_mcs()
595 tbl->is_SGI = 0; /* default legacy setup */ in rs_get_tbl_info_from_mcs()
596 tbl->is_ht40 = 0; in rs_get_tbl_info_from_mcs()
597 tbl->is_dup = 0; in rs_get_tbl_info_from_mcs()
598 tbl->ant_type = (ant_msk >> RATE_MCS_ANT_POS); in rs_get_tbl_info_from_mcs()
599 tbl->lq_type = LQ_NONE; in rs_get_tbl_info_from_mcs()
600 tbl->max_search = IWL_MAX_SEARCH; in rs_get_tbl_info_from_mcs()
606 tbl->lq_type = LQ_A; in rs_get_tbl_info_from_mcs()
608 tbl->lq_type = LQ_G; in rs_get_tbl_info_from_mcs()
613 tbl->is_SGI = 1; in rs_get_tbl_info_from_mcs()
617 tbl->is_ht40 = 1; in rs_get_tbl_info_from_mcs()
620 tbl->is_dup = 1; in rs_get_tbl_info_from_mcs()
627 tbl->lq_type = LQ_SISO; /*else NONE*/ in rs_get_tbl_info_from_mcs()
631 tbl->lq_type = LQ_MIMO2; in rs_get_tbl_info_from_mcs()
635 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_get_tbl_info_from_mcs()
636 tbl->lq_type = LQ_MIMO3; in rs_get_tbl_info_from_mcs()
646 struct iwl_scale_tbl_info *tbl) in rs_toggle_antenna() argument
650 if (!tbl->ant_type || tbl->ant_type > ANT_ABC) in rs_toggle_antenna()
653 if (!rs_is_valid_ant(valid_ant, tbl->ant_type)) in rs_toggle_antenna()
656 new_ant_type = ant_toggle_lookup[tbl->ant_type]; in rs_toggle_antenna()
658 while ((new_ant_type != tbl->ant_type) && in rs_toggle_antenna()
662 if (new_ant_type == tbl->ant_type) in rs_toggle_antenna()
665 tbl->ant_type = new_ant_type; in rs_toggle_antenna()
770 struct iwl_scale_tbl_info *tbl, in rs_get_lower_rate() argument
783 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { in rs_get_lower_rate()
787 tbl->lq_type = LQ_A; in rs_get_lower_rate()
789 tbl->lq_type = LQ_G; in rs_get_lower_rate()
791 if (num_of_ant(tbl->ant_type) > 1) in rs_get_lower_rate()
792 tbl->ant_type = in rs_get_lower_rate()
795 tbl->is_ht40 = 0; in rs_get_lower_rate()
796 tbl->is_SGI = 0; in rs_get_lower_rate()
797 tbl->max_search = IWL_MAX_SEARCH; in rs_get_lower_rate()
800 rate_mask = rs_get_supported_rates(lq_sta, NULL, tbl->lq_type); in rs_get_lower_rate()
803 if (is_legacy(tbl->lq_type)) { in rs_get_lower_rate()
819 tbl->lq_type); in rs_get_lower_rate()
826 return rate_n_flags_from_tbl(lq_sta->drv, tbl, low, is_green); in rs_get_lower_rate()
842 struct iwl_scale_tbl_info *tbl; in rs_bt_update_lq() local
851 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_bt_update_lq()
852 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_bt_update_lq()
1082 struct iwl_scale_tbl_info *tbl) in rs_set_expected_tpt_table() argument
1088 if (WARN_ON_ONCE(!is_legacy(tbl->lq_type) && !is_Ht(tbl->lq_type))) { in rs_set_expected_tpt_table()
1089 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1094 if (is_legacy(tbl->lq_type)) { in rs_set_expected_tpt_table()
1095 tbl->expected_tpt = expected_tpt_legacy; in rs_set_expected_tpt_table()
1102 if (is_siso(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1104 else if (is_siso(tbl->lq_type)) in rs_set_expected_tpt_table()
1106 else if (is_mimo2(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1108 else if (is_mimo2(tbl->lq_type)) in rs_set_expected_tpt_table()
1110 else if (is_mimo3(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup)) in rs_set_expected_tpt_table()
1115 if (!tbl->is_SGI && !lq_sta->is_agg) /* Normal */ in rs_set_expected_tpt_table()
1116 tbl->expected_tpt = ht_tbl_pointer[0]; in rs_set_expected_tpt_table()
1117 else if (tbl->is_SGI && !lq_sta->is_agg) /* SGI */ in rs_set_expected_tpt_table()
1118 tbl->expected_tpt = ht_tbl_pointer[1]; in rs_set_expected_tpt_table()
1119 else if (!tbl->is_SGI && lq_sta->is_agg) /* AGG */ in rs_set_expected_tpt_table()
1120 tbl->expected_tpt = ht_tbl_pointer[2]; in rs_set_expected_tpt_table()
1122 tbl->expected_tpt = ht_tbl_pointer[3]; in rs_set_expected_tpt_table()
1139 struct iwl_scale_tbl_info *tbl, /* "search" */ in rs_get_best_rate() argument
1148 const u16 *tpt_tbl = tbl->expected_tpt; in rs_get_best_rate()
1158 tbl->lq_type); in rs_get_best_rate()
1234 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo2() argument
1254 tbl->lq_type = LQ_MIMO2; in rs_switch_to_mimo2()
1255 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo2()
1256 tbl->action = 0; in rs_switch_to_mimo2()
1257 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_mimo2()
1261 tbl->is_ht40 = 1; in rs_switch_to_mimo2()
1263 tbl->is_ht40 = 0; in rs_switch_to_mimo2()
1265 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo2()
1267 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo2()
1275 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo2()
1278 tbl->current_rate, is_green); in rs_switch_to_mimo2()
1289 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_mimo3() argument
1309 tbl->lq_type = LQ_MIMO3; in rs_switch_to_mimo3()
1310 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_mimo3()
1311 tbl->action = 0; in rs_switch_to_mimo3()
1312 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH; in rs_switch_to_mimo3()
1316 tbl->is_ht40 = 1; in rs_switch_to_mimo3()
1318 tbl->is_ht40 = 0; in rs_switch_to_mimo3()
1320 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_mimo3()
1322 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_mimo3()
1331 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_mimo3()
1334 tbl->current_rate, is_green); in rs_switch_to_mimo3()
1345 struct iwl_scale_tbl_info *tbl, int index) in rs_switch_to_siso() argument
1358 tbl->is_dup = lq_sta->is_dup; in rs_switch_to_siso()
1359 tbl->lq_type = LQ_SISO; in rs_switch_to_siso()
1360 tbl->action = 0; in rs_switch_to_siso()
1361 tbl->max_search = IWL_MAX_SEARCH; in rs_switch_to_siso()
1365 tbl->is_ht40 = 1; in rs_switch_to_siso()
1367 tbl->is_ht40 = 0; in rs_switch_to_siso()
1370 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/ in rs_switch_to_siso()
1372 rs_set_expected_tpt_table(lq_sta, tbl); in rs_switch_to_siso()
1373 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index); in rs_switch_to_siso()
1381 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green); in rs_switch_to_siso()
1383 tbl->current_rate, is_green); in rs_switch_to_siso()
1396 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_legacy_other() local
1399 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_legacy_other()
1414 if (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1415 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1422 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1423 tbl->action != IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1424 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1433 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1435 tbl->action > IWL_LEGACY_SWITCH_SISO) in rs_move_legacy_other()
1436 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1441 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1442 else if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_legacy_other()
1443 tbl->action = IWL_LEGACY_SWITCH_SISO; in rs_move_legacy_other()
1448 start_action = tbl->action; in rs_move_legacy_other()
1451 switch (tbl->action) { in rs_move_legacy_other()
1456 if ((tbl->action == IWL_LEGACY_SWITCH_ANTENNA1 && in rs_move_legacy_other()
1458 (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2 && in rs_move_legacy_other()
1470 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1483 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1499 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1502 if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AB) in rs_move_legacy_other()
1504 else if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AC) in rs_move_legacy_other()
1524 memcpy(search_tbl, tbl, sz); in rs_move_legacy_other()
1540 tbl->action++; in rs_move_legacy_other()
1541 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1542 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1544 if (tbl->action == start_action) in rs_move_legacy_other()
1553 tbl->action++; in rs_move_legacy_other()
1554 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_legacy_other()
1555 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1; in rs_move_legacy_other()
1557 search_tbl->action = tbl->action; in rs_move_legacy_other()
1569 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_siso_to_other() local
1572 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_siso_to_other()
1588 if (tbl->action == IWL_SISO_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1589 tbl->action = IWL_SISO_SWITCH_MIMO2_AB; in rs_move_siso_to_other()
1596 if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) in rs_move_siso_to_other()
1597 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1605 tbl->action > IWL_SISO_SWITCH_ANTENNA2) { in rs_move_siso_to_other()
1607 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1614 if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) in rs_move_siso_to_other()
1615 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1618 start_action = tbl->action; in rs_move_siso_to_other()
1621 switch (tbl->action) { in rs_move_siso_to_other()
1625 if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 && in rs_move_siso_to_other()
1627 (tbl->action == IWL_SISO_SWITCH_ANTENNA2 && in rs_move_siso_to_other()
1637 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1648 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1651 if (tbl->action == IWL_SISO_SWITCH_MIMO2_AB) in rs_move_siso_to_other()
1653 else if (tbl->action == IWL_SISO_SWITCH_MIMO2_AC) in rs_move_siso_to_other()
1667 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1670 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_siso_to_other()
1676 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1678 if (!tbl->is_SGI) in rs_move_siso_to_other()
1684 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_siso_to_other()
1686 if (tbl->is_SGI) { in rs_move_siso_to_other()
1698 memcpy(search_tbl, tbl, sz); in rs_move_siso_to_other()
1711 tbl->action++; in rs_move_siso_to_other()
1712 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1713 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1715 if (tbl->action == start_action) in rs_move_siso_to_other()
1723 tbl->action++; in rs_move_siso_to_other()
1724 if (tbl->action > IWL_SISO_SWITCH_MIMO3_ABC) in rs_move_siso_to_other()
1725 tbl->action = IWL_SISO_SWITCH_ANTENNA1; in rs_move_siso_to_other()
1727 search_tbl->action = tbl->action; in rs_move_siso_to_other()
1739 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo2_to_other() local
1742 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo2_to_other()
1759 if (tbl->action != IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1760 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1764 if (tbl->action == IWL_MIMO2_SWITCH_SISO_B || in rs_move_mimo2_to_other()
1765 tbl->action == IWL_MIMO2_SWITCH_SISO_C) in rs_move_mimo2_to_other()
1766 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1774 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1775 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) { in rs_move_mimo2_to_other()
1777 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1782 (tbl->action < IWL_MIMO2_SWITCH_SISO_A || in rs_move_mimo2_to_other()
1783 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) in rs_move_mimo2_to_other()
1784 tbl->action = IWL_MIMO2_SWITCH_SISO_A; in rs_move_mimo2_to_other()
1786 start_action = tbl->action; in rs_move_mimo2_to_other()
1789 switch (tbl->action) { in rs_move_mimo2_to_other()
1800 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1813 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1815 if (tbl->action == IWL_MIMO2_SWITCH_SISO_A) in rs_move_mimo2_to_other()
1817 else if (tbl->action == IWL_MIMO2_SWITCH_SISO_B) in rs_move_mimo2_to_other()
1833 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1836 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo2_to_other()
1843 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1844 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo2_to_other()
1852 if (tbl->is_SGI) { in rs_move_mimo2_to_other()
1865 memcpy(search_tbl, tbl, sz); in rs_move_mimo2_to_other()
1879 tbl->action++; in rs_move_mimo2_to_other()
1880 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1881 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1883 if (tbl->action == start_action) in rs_move_mimo2_to_other()
1890 tbl->action++; in rs_move_mimo2_to_other()
1891 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC) in rs_move_mimo2_to_other()
1892 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1; in rs_move_mimo2_to_other()
1894 search_tbl->action = tbl->action; in rs_move_mimo2_to_other()
1907 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_move_mimo3_to_other() local
1910 struct iwl_rate_scale_data *window = &(tbl->win[index]); in rs_move_mimo3_to_other()
1927 if (tbl->action != IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1928 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1932 if (tbl->action == IWL_MIMO3_SWITCH_SISO_B || in rs_move_mimo3_to_other()
1933 tbl->action == IWL_MIMO3_SWITCH_SISO_C) in rs_move_mimo3_to_other()
1934 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1942 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1943 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) { in rs_move_mimo3_to_other()
1945 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1950 (tbl->action < IWL_MIMO3_SWITCH_SISO_A || in rs_move_mimo3_to_other()
1951 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) in rs_move_mimo3_to_other()
1952 tbl->action = IWL_MIMO3_SWITCH_SISO_A; in rs_move_mimo3_to_other()
1954 start_action = tbl->action; in rs_move_mimo3_to_other()
1957 switch (tbl->action) { in rs_move_mimo3_to_other()
1968 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1979 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
1981 if (tbl->action == IWL_MIMO3_SWITCH_SISO_A) in rs_move_mimo3_to_other()
1983 else if (tbl->action == IWL_MIMO3_SWITCH_SISO_B) in rs_move_mimo3_to_other()
2003 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2005 if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AB) in rs_move_mimo3_to_other()
2007 else if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AC) in rs_move_mimo3_to_other()
2023 if (!tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2026 if (tbl->is_ht40 && !(ht_cap->cap & in rs_move_mimo3_to_other()
2033 memcpy(search_tbl, tbl, sz); in rs_move_mimo3_to_other()
2034 search_tbl->is_SGI = !tbl->is_SGI; in rs_move_mimo3_to_other()
2042 if (tbl->is_SGI) { in rs_move_mimo3_to_other()
2053 tbl->action++; in rs_move_mimo3_to_other()
2054 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2055 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2057 if (tbl->action == start_action) in rs_move_mimo3_to_other()
2064 tbl->action++; in rs_move_mimo3_to_other()
2065 if (tbl->action > IWL_MIMO3_SWITCH_GI) in rs_move_mimo3_to_other()
2066 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1; in rs_move_mimo3_to_other()
2068 search_tbl->action = tbl->action; in rs_move_mimo3_to_other()
2080 struct iwl_scale_tbl_info *tbl; in rs_stay_in_table() local
2089 tbl = &(lq_sta->lq_info[active_tbl]); in rs_stay_in_table()
2140 &(tbl->win[i])); in rs_stay_in_table()
2149 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_stay_in_table()
2160 struct iwl_scale_tbl_info *tbl, in rs_update_rate_tbl() argument
2166 rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_update_rate_tbl()
2195 struct iwl_scale_tbl_info *tbl, *tbl1; in rs_rate_scale_perform() local
2238 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2239 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2249 tbl->lq_type); in rs_rate_scale_perform()
2252 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type); in rs_rate_scale_perform()
2257 if (is_legacy(tbl->lq_type)) { in rs_rate_scale_perform()
2276 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2278 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); in rs_rate_scale_perform()
2280 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2281 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, in rs_rate_scale_perform()
2288 if (!tbl->expected_tpt) { in rs_rate_scale_perform()
2298 window = &(tbl->win[index]); in rs_rate_scale_perform()
2302 window = &(tbl->win[index]); in rs_rate_scale_perform()
2330 tbl->expected_tpt[index] + 64) / 128)) { in rs_rate_scale_perform()
2333 tbl->expected_tpt[index] + 64) / 128); in rs_rate_scale_perform()
2350 if (!is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2367 tbl->lq_type = LQ_NONE; in rs_rate_scale_perform()
2371 tbl = &(lq_sta->lq_info[active_tbl]); in rs_rate_scale_perform()
2374 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2391 tbl->lq_type); in rs_rate_scale_perform()
2405 low_tpt = tbl->win[low].average_tpt; in rs_rate_scale_perform()
2407 high_tpt = tbl->win[high].average_tpt; in rs_rate_scale_perform()
2464 (current_tpt > (100 * tbl->expected_tpt[low])))) in rs_rate_scale_perform()
2466 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2469 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) in rs_rate_scale_perform()
2473 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2487 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type))) { in rs_rate_scale_perform()
2518 index, scale_action, low, high, tbl->lq_type); in rs_rate_scale_perform()
2523 rs_update_rate_tbl(priv, ctx, lq_sta, tbl, index, is_green); in rs_rate_scale_perform()
2542 if (is_legacy(tbl->lq_type)) in rs_rate_scale_perform()
2544 else if (is_siso(tbl->lq_type)) in rs_rate_scale_perform()
2546 else if (is_mimo2(tbl->lq_type)) in rs_rate_scale_perform()
2554 tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); in rs_rate_scale_perform()
2556 rs_rate_scale_clear_window(&(tbl->win[i])); in rs_rate_scale_perform()
2559 index = iwl_hwrate_to_plcp_idx(tbl->current_rate); in rs_rate_scale_perform()
2562 tbl->current_rate, index); in rs_rate_scale_perform()
2563 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate); in rs_rate_scale_perform()
2606 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, index, is_green); in rs_rate_scale_perform()
2628 struct iwl_scale_tbl_info *tbl; in rs_initialize_lq() local
2653 tbl = &(lq_sta->lq_info[active_tbl]); in rs_initialize_lq()
2659 tbl->ant_type = first_antenna(valid_tx_ant); in rs_initialize_lq()
2660 rate |= tbl->ant_type << RATE_MCS_ANT_POS; in rs_initialize_lq()
2665 rs_get_tbl_info_from_mcs(rate, priv->band, tbl, &rate_idx); in rs_initialize_lq()
2666 if (!rs_is_valid_ant(valid_tx_ant, tbl->ant_type)) in rs_initialize_lq()
2667 rs_toggle_antenna(valid_tx_ant, &rate, tbl); in rs_initialize_lq()
2669 rate = rate_n_flags_from_tbl(priv, tbl, rate_idx, use_green); in rs_initialize_lq()
2670 tbl->current_rate = rate; in rs_initialize_lq()
2671 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()
3149 if (is_legacy(tbl->lq_type)) { in rs_sta_dbgfs_scale_table_read()
3219 struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl]; in rs_sta_dbgfs_rate_scale_data_read() local
3223 if (is_Ht(tbl->lq_type)) in rs_sta_dbgfs_rate_scale_data_read()
3226 tbl->expected_tpt[lq_sta->last_txrate_idx]); in rs_sta_dbgfs_rate_scale_data_read()