• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/wireless/iwlwifi/

Lines Matching refs:tbl

348 static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index)
350 if (tbl->expected_tpt)
351 return tbl->expected_tpt[rs_index];
362 static int rs_collect_tx_data(struct iwl_scale_tbl_info *tbl,
373 window = &(tbl->win[scale_index]);
376 tpt = get_expected_tpt(tbl, scale_index);
440 struct iwl_scale_tbl_info *tbl,
445 if (is_legacy(tbl->lq_type)) {
450 } else if (is_Ht(tbl->lq_type)) {
457 if (is_siso(tbl->lq_type))
459 else if (is_mimo2(tbl->lq_type))
464 IWL_ERR(priv, "Invalid tbl->lq_type %d\n", tbl->lq_type);
467 rate_n_flags |= ((tbl->ant_type << RATE_MCS_ANT_POS) &
470 if (is_Ht(tbl->lq_type)) {
471 if (tbl->is_ht40) {
472 if (tbl->is_dup)
477 if (tbl->is_SGI)
482 if (is_siso(tbl->lq_type) && tbl->is_SGI) {
497 struct iwl_scale_tbl_info *tbl,
510 tbl->is_SGI = 0; /* default legacy setup */
511 tbl->is_ht40 = 0;
512 tbl->is_dup = 0;
513 tbl->ant_type = (ant_msk >> RATE_MCS_ANT_POS);
514 tbl->lq_type = LQ_NONE;
515 tbl->max_search = IWL_MAX_SEARCH;
521 tbl->lq_type = LQ_A;
523 tbl->lq_type = LQ_G;
528 tbl->is_SGI = 1;
532 tbl->is_ht40 = 1;
535 tbl->is_dup = 1;
542 tbl->lq_type = LQ_SISO; /*else NONE*/
546 tbl->lq_type = LQ_MIMO2;
550 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH;
551 tbl->lq_type = LQ_MIMO3;
561 struct iwl_scale_tbl_info *tbl)
565 if (!tbl->ant_type || tbl->ant_type > ANT_ABC)
568 if (!rs_is_valid_ant(valid_ant, tbl->ant_type))
571 new_ant_type = ant_toggle_lookup[tbl->ant_type];
573 while ((new_ant_type != tbl->ant_type) &&
577 if (new_ant_type == tbl->ant_type)
580 tbl->ant_type = new_ant_type;
677 struct iwl_scale_tbl_info *tbl,
690 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) {
694 tbl->lq_type = LQ_A;
696 tbl->lq_type = LQ_G;
698 if (num_of_ant(tbl->ant_type) > 1)
699 tbl->ant_type =
702 tbl->is_ht40 = 0;
703 tbl->is_SGI = 0;
704 tbl->max_search = IWL_MAX_SEARCH;
707 rate_mask = rs_get_supported_rates(lq_sta, NULL, tbl->lq_type);
710 if (is_legacy(tbl->lq_type)) {
726 tbl->lq_type);
733 return rate_n_flags_from_tbl(lq_sta->drv, tbl, low, is_green);
950 struct iwl_scale_tbl_info *tbl)
956 if (WARN_ON_ONCE(!is_legacy(tbl->lq_type) && !is_Ht(tbl->lq_type))) {
957 tbl->expected_tpt = expected_tpt_legacy;
962 if (is_legacy(tbl->lq_type)) {
963 tbl->expected_tpt = expected_tpt_legacy;
970 if (is_siso(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup))
972 else if (is_siso(tbl->lq_type))
974 else if (is_mimo2(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup))
976 else if (is_mimo2(tbl->lq_type))
978 else if (is_mimo3(tbl->lq_type) && (!tbl->is_ht40 || lq_sta->is_dup))
980 else /* if (is_mimo3(tbl->lq_type)) <-- must be true */
983 if (!tbl->is_SGI && !lq_sta->is_agg) /* Normal */
984 tbl->expected_tpt = ht_tbl_pointer[0];
985 else if (tbl->is_SGI && !lq_sta->is_agg) /* SGI */
986 tbl->expected_tpt = ht_tbl_pointer[1];
987 else if (!tbl->is_SGI && lq_sta->is_agg) /* AGG */
988 tbl->expected_tpt = ht_tbl_pointer[2];
990 tbl->expected_tpt = ht_tbl_pointer[3];
1007 struct iwl_scale_tbl_info *tbl, /* "search" */
1017 s32 *tpt_tbl = tbl->expected_tpt;
1027 tbl->lq_type);
1103 struct iwl_scale_tbl_info *tbl, int index)
1122 tbl->lq_type = LQ_MIMO2;
1123 tbl->is_dup = lq_sta->is_dup;
1124 tbl->action = 0;
1125 tbl->max_search = IWL_MAX_SEARCH;
1129 tbl->is_ht40 = 1;
1131 tbl->is_ht40 = 0;
1133 rs_set_expected_tpt_table(lq_sta, tbl);
1135 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index);
1143 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green);
1146 tbl->current_rate, is_green);
1157 struct iwl_scale_tbl_info *tbl, int index)
1176 tbl->lq_type = LQ_MIMO3;
1177 tbl->is_dup = lq_sta->is_dup;
1178 tbl->action = 0;
1179 tbl->max_search = IWL_MAX_11N_MIMO3_SEARCH;
1183 tbl->is_ht40 = 1;
1185 tbl->is_ht40 = 0;
1187 rs_set_expected_tpt_table(lq_sta, tbl);
1189 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index);
1198 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green);
1201 tbl->current_rate, is_green);
1212 struct iwl_scale_tbl_info *tbl, int index)
1223 tbl->is_dup = lq_sta->is_dup;
1224 tbl->lq_type = LQ_SISO;
1225 tbl->action = 0;
1226 tbl->max_search = IWL_MAX_SEARCH;
1230 tbl->is_ht40 = 1;
1232 tbl->is_ht40 = 0;
1235 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/
1237 rs_set_expected_tpt_table(lq_sta, tbl);
1238 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index);
1246 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, rate, is_green);
1248 tbl->current_rate, is_green);
1261 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
1264 struct iwl_rate_scale_data *window = &(tbl->win[index]);
1267 u8 start_action = tbl->action;
1275 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1;
1277 tbl->action > IWL_LEGACY_SWITCH_SISO)
1278 tbl->action = IWL_LEGACY_SWITCH_SISO;
1281 switch (tbl->action) {
1286 if ((tbl->action == IWL_LEGACY_SWITCH_ANTENNA1 &&
1288 (tbl->action == IWL_LEGACY_SWITCH_ANTENNA2 &&
1297 memcpy(search_tbl, tbl, sz);
1310 memcpy(search_tbl, tbl, sz);
1326 memcpy(search_tbl, tbl, sz);
1329 if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AB)
1331 else if (tbl->action == IWL_LEGACY_SWITCH_MIMO2_AC)
1351 memcpy(search_tbl, tbl, sz);
1367 tbl->action++;
1368 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC)
1369 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1;
1371 if (tbl->action == start_action)
1380 tbl->action++;
1381 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC)
1382 tbl->action = IWL_LEGACY_SWITCH_ANTENNA1;
1384 search_tbl->action = tbl->action;
1398 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
1401 struct iwl_rate_scale_data *window = &(tbl->win[index]);
1405 u8 start_action = tbl->action;
1412 tbl->action > IWL_SISO_SWITCH_ANTENNA2) {
1414 tbl->action = IWL_SISO_SWITCH_ANTENNA1;
1418 switch (tbl->action) {
1423 if ((tbl->action == IWL_SISO_SWITCH_ANTENNA1 &&
1425 (tbl->action == IWL_SISO_SWITCH_ANTENNA2 &&
1432 memcpy(search_tbl, tbl, sz);
1443 memcpy(search_tbl, tbl, sz);
1446 if (tbl->action == IWL_SISO_SWITCH_MIMO2_AB)
1448 else if (tbl->action == IWL_SISO_SWITCH_MIMO2_AC)
1462 if (!tbl->is_ht40 && !(ht_cap->cap &
1465 if (tbl->is_ht40 && !(ht_cap->cap &
1471 memcpy(search_tbl, tbl, sz);
1473 if (!tbl->is_SGI)
1479 search_tbl->is_SGI = !tbl->is_SGI;
1481 if (tbl->is_SGI) {
1493 memcpy(search_tbl, tbl, sz);
1506 tbl->action++;
1507 if (tbl->action > IWL_LEGACY_SWITCH_MIMO3_ABC)
1508 tbl->action = IWL_SISO_SWITCH_ANTENNA1;
1510 if (tbl->action == start_action)
1518 tbl->action++;
1519 if (tbl->action > IWL_SISO_SWITCH_MIMO3_ABC)
1520 tbl->action = IWL_SISO_SWITCH_ANTENNA1;
1522 search_tbl->action = tbl->action;
1536 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
1539 struct iwl_rate_scale_data *window = &(tbl->win[index]);
1543 u8 start_action = tbl->action;
1550 (tbl->action < IWL_MIMO2_SWITCH_SISO_A ||
1551 tbl->action > IWL_MIMO2_SWITCH_SISO_C)) {
1553 tbl->action = IWL_MIMO2_SWITCH_SISO_A;
1557 switch (tbl->action) {
1568 memcpy(search_tbl, tbl, sz);
1581 memcpy(search_tbl, tbl, sz);
1583 if (tbl->action == IWL_MIMO2_SWITCH_SISO_A)
1585 else if (tbl->action == IWL_MIMO2_SWITCH_SISO_B)
1601 if (!tbl->is_ht40 && !(ht_cap->cap &
1604 if (tbl->is_ht40 && !(ht_cap->cap &
1611 memcpy(search_tbl, tbl, sz);
1612 search_tbl->is_SGI = !tbl->is_SGI;
1620 if (tbl->is_SGI) {
1633 memcpy(search_tbl, tbl, sz);
1647 tbl->action++;
1648 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC)
1649 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1;
1651 if (tbl->action == start_action)
1658 tbl->action++;
1659 if (tbl->action > IWL_MIMO2_SWITCH_MIMO3_ABC)
1660 tbl->action = IWL_MIMO2_SWITCH_ANTENNA1;
1662 search_tbl->action = tbl->action;
1677 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
1680 struct iwl_rate_scale_data *window = &(tbl->win[index]);
1684 u8 start_action = tbl->action;
1691 (tbl->action < IWL_MIMO3_SWITCH_SISO_A ||
1692 tbl->action > IWL_MIMO3_SWITCH_SISO_C)) {
1694 tbl->action = IWL_MIMO3_SWITCH_SISO_A;
1698 switch (tbl->action) {
1709 memcpy(search_tbl, tbl, sz);
1720 memcpy(search_tbl, tbl, sz);
1722 if (tbl->action == IWL_MIMO3_SWITCH_SISO_A)
1724 else if (tbl->action == IWL_MIMO3_SWITCH_SISO_B)
1744 memcpy(search_tbl, tbl, sz);
1746 if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AB)
1748 else if (tbl->action == IWL_MIMO3_SWITCH_MIMO2_AC)
1764 if (!tbl->is_ht40 && !(ht_cap->cap &
1767 if (tbl->is_ht40 && !(ht_cap->cap &
1774 memcpy(search_tbl, tbl, sz);
1775 search_tbl->is_SGI = !tbl->is_SGI;
1783 if (tbl->is_SGI) {
1794 tbl->action++;
1795 if (tbl->action > IWL_MIMO3_SWITCH_GI)
1796 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1;
1798 if (tbl->action == start_action)
1805 tbl->action++;
1806 if (tbl->action > IWL_MIMO3_SWITCH_GI)
1807 tbl->action = IWL_MIMO3_SWITCH_ANTENNA1;
1809 search_tbl->action = tbl->action;
1824 struct iwl_scale_tbl_info *tbl;
1833 tbl = &(lq_sta->lq_info[active_tbl]);
1883 &(tbl->win[i]));
1892 rs_rate_scale_clear_window(&(tbl->win[i]));
1903 struct iwl_scale_tbl_info *tbl,
1909 rate = rate_n_flags_from_tbl(priv, tbl, index, is_green);
1940 struct iwl_scale_tbl_info *tbl, *tbl1;
1984 tbl = &(lq_sta->lq_info[active_tbl]);
1985 if (is_legacy(tbl->lq_type))
1995 tbl->lq_type);
1998 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type);
2003 if (is_legacy(tbl->lq_type)) {
2022 tbl->lq_type = LQ_NONE;
2024 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
2026 index = iwl_hwrate_to_plcp_idx(tbl->current_rate);
2028 tbl, index, is_green);
2034 if (!tbl->expected_tpt) {
2035 IWL_ERR(priv, "tbl->expected_tpt is NULL\n");
2044 window = &(tbl->win[index]);
2048 window = &(tbl->win[index]);
2076 tbl->expected_tpt[index] + 64) / 128)) {
2079 tbl->expected_tpt[index] + 64) / 128);
2096 if (!is_legacy(tbl->lq_type))
2113 tbl->lq_type = LQ_NONE;
2117 tbl = &(lq_sta->lq_info[active_tbl]);
2120 index = iwl_hwrate_to_plcp_idx(tbl->current_rate);
2137 tbl->lq_type);
2151 low_tpt = tbl->win[low].average_tpt;
2153 high_tpt = tbl->win[high].average_tpt;
2210 (current_tpt > (100 * tbl->expected_tpt[low]))))
2212 if (!iwl_ht_enabled(priv) && !is_legacy(tbl->lq_type))
2215 (is_mimo2(tbl->lq_type) || is_mimo3(tbl->lq_type)))
2242 index, scale_action, low, high, tbl->lq_type);
2248 tbl, index, is_green);
2267 if (is_legacy(tbl->lq_type))
2269 else if (is_siso(tbl->lq_type))
2271 else if (is_mimo2(tbl->lq_type))
2279 tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]);
2281 rs_rate_scale_clear_window(&(tbl->win[i]));
2284 index = iwl_hwrate_to_plcp_idx(tbl->current_rate);
2287 tbl->current_rate, index);
2288 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate);
2331 tbl->current_rate = rate_n_flags_from_tbl(priv, tbl, index, is_green);
2355 struct iwl_scale_tbl_info *tbl;
2375 tbl = &(lq_sta->lq_info[active_tbl]);
2381 tbl->ant_type = first_antenna(valid_tx_ant);
2382 rate |= tbl->ant_type << RATE_MCS_ANT_POS;
2387 rs_get_tbl_info_from_mcs(rate, priv->band, tbl, &rate_idx);
2388 if (!rs_is_valid_ant(valid_tx_ant, tbl->ant_type))
2389 rs_toggle_antenna(valid_tx_ant, &rate, tbl);
2391 rate = rate_n_flags_from_tbl(priv, tbl, rate_idx, use_green);
2392 tbl->current_rate = rate;
2393 rs_set_expected_tpt_table(lq_sta, tbl);
2801 struct iwl_scale_tbl_info *tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
2819 (is_legacy(tbl->lq_type)) ? "legacy" : "HT");
2820 if (is_Ht(tbl->lq_type)) {
2822 (is_siso(tbl->lq_type)) ? "SISO" :
2823 ((is_mimo2(tbl->lq_type)) ? "MIMO2" : "MIMO3"));
2825 (tbl->is_ht40) ? "40MHz" : "20MHz");
2826 desc += sprintf(buff+desc, " %s %s %s\n", (tbl->is_SGI) ? "SGI" : "",
2855 if (is_legacy(tbl->lq_type)) {
2928 struct iwl_scale_tbl_info *tbl = &lq_sta->lq_info[lq_sta->active_tbl];
2932 if (is_Ht(tbl->lq_type))
2935 tbl->expected_tpt[lq_sta->last_txrate_idx]);