aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
diff options
context:
space:
mode:
authorGuy Cohen <guy.cohen@intel.com>2008-04-23 20:14:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:18 -0400
commiteecd6e5705fdea75c354559339a2b1f22ec400a0 (patch)
tree11e13ec2ac0efcc20388475f38a1e951ba2c81a6 /drivers/net/wireless/iwlwifi/iwl-4965-rs.c
parent39e885049d9d5e6a65bb2543f82e136c02c253b5 (diff)
iwlwifi: rate scale module cleanups
This patch does following changes 1. rs_get_expected_tpt_table: changed get to set 2. changed IWL_DEBUG_HT to IWL_DEBUG_RATE as appropriate 3. changed rs_get_supported_rates to be returning value function Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c101
1 files changed, 49 insertions, 52 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 7c55aa9a2ba9..4063534b64c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -604,25 +604,23 @@ static inline u8 rs_use_green(struct iwl_priv *priv,
604 * basic available rates. 604 * basic available rates.
605 * 605 *
606 */ 606 */
607static void rs_get_supported_rates(struct iwl4965_lq_sta *lq_sta, 607static u16 rs_get_supported_rates(struct iwl4965_lq_sta *lq_sta,
608 struct ieee80211_hdr *hdr, 608 struct ieee80211_hdr *hdr,
609 enum iwl_table_type rate_type, 609 enum iwl_table_type rate_type)
610 u16 *data_rate)
611{ 610{
612 if (is_legacy(rate_type)) 611 if (hdr && is_multicast_ether_addr(hdr->addr1) &&
613 *data_rate = lq_sta->active_legacy_rate; 612 lq_sta->active_rate_basic)
614 else { 613 return lq_sta->active_rate_basic;
614
615 if (is_legacy(rate_type)) {
616 return lq_sta->active_legacy_rate;
617 } else {
615 if (is_siso(rate_type)) 618 if (is_siso(rate_type))
616 *data_rate = lq_sta->active_siso_rate; 619 return lq_sta->active_siso_rate;
617 else if (is_mimo2(rate_type)) 620 else if (is_mimo2(rate_type))
618 *data_rate = lq_sta->active_mimo2_rate; 621 return lq_sta->active_mimo2_rate;
619 else 622 else
620 *data_rate = lq_sta->active_mimo3_rate; 623 return lq_sta->active_mimo3_rate;
621 }
622
623 if (hdr && is_multicast_ether_addr(hdr->addr1) &&
624 lq_sta->active_rate_basic) {
625 *data_rate = lq_sta->active_rate_basic;
626 } 624 }
627} 625}
628 626
@@ -709,7 +707,7 @@ static u32 rs_get_lower_rate(struct iwl4965_lq_sta *lq_sta,
709 tbl->is_SGI = 0; 707 tbl->is_SGI = 0;
710 } 708 }
711 709
712 rs_get_supported_rates(lq_sta, NULL, tbl->lq_type, &rate_mask); 710 rate_mask = rs_get_supported_rates(lq_sta, NULL, tbl->lq_type);
713 711
714 /* Mask with station rate restriction */ 712 /* Mask with station rate restriction */
715 if (is_legacy(tbl->lq_type)) { 713 if (is_legacy(tbl->lq_type)) {
@@ -975,7 +973,7 @@ static u8 rs_is_other_ant_connected(u8 valid_antenna, u8 ant_type)
975static void rs_set_stay_in_table(u8 is_legacy, 973static void rs_set_stay_in_table(u8 is_legacy,
976 struct iwl4965_lq_sta *lq_sta) 974 struct iwl4965_lq_sta *lq_sta)
977{ 975{
978 IWL_DEBUG_HT("we are staying in the same table\n"); 976 IWL_DEBUG_RATE("we are staying in the same table\n");
979 lq_sta->stay_in_tbl = 1; /* only place this gets set */ 977 lq_sta->stay_in_tbl = 1; /* only place this gets set */
980 if (is_legacy) { 978 if (is_legacy) {
981 lq_sta->table_count_limit = IWL_LEGACY_TABLE_COUNT; 979 lq_sta->table_count_limit = IWL_LEGACY_TABLE_COUNT;
@@ -994,7 +992,7 @@ static void rs_set_stay_in_table(u8 is_legacy,
994/* 992/*
995 * Find correct throughput table for given mode of modulation 993 * Find correct throughput table for given mode of modulation
996 */ 994 */
997static void rs_get_expected_tpt_table(struct iwl4965_lq_sta *lq_sta, 995static void rs_set_expected_tpt_table(struct iwl4965_lq_sta *lq_sta,
998 struct iwl4965_scale_tbl_info *tbl) 996 struct iwl4965_scale_tbl_info *tbl)
999{ 997{
1000 if (is_legacy(tbl->lq_type)) { 998 if (is_legacy(tbl->lq_type)) {
@@ -1161,7 +1159,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
1161 if (!rs_is_both_ant_supp(priv->hw_params.valid_tx_ant)) 1159 if (!rs_is_both_ant_supp(priv->hw_params.valid_tx_ant))
1162 return -1; 1160 return -1;
1163 1161
1164 IWL_DEBUG_HT("LQ: try to switch to MIMO2\n"); 1162 IWL_DEBUG_RATE("LQ: try to switch to MIMO2\n");
1165 1163
1166 tbl->lq_type = LQ_MIMO2; 1164 tbl->lq_type = LQ_MIMO2;
1167 tbl->is_dup = lq_sta->is_dup; 1165 tbl->is_dup = lq_sta->is_dup;
@@ -1186,20 +1184,20 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
1186 tbl->is_SGI = 0; 1184 tbl->is_SGI = 0;
1187 */ 1185 */
1188 1186
1189 rs_get_expected_tpt_table(lq_sta, tbl); 1187 rs_set_expected_tpt_table(lq_sta, tbl);
1190 1188
1191 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index, index); 1189 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index, index);
1192 1190
1193 IWL_DEBUG_HT("LQ: MIMO2 best rate %d mask %X\n", rate, rate_mask); 1191 IWL_DEBUG_RATE("LQ: MIMO2 best rate %d mask %X\n", rate, rate_mask);
1194 1192
1195 if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { 1193 if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) {
1196 IWL_DEBUG_HT("Can't switch with index %d rate mask %x\n", 1194 IWL_DEBUG_RATE("Can't switch with index %d rate mask %x\n",
1197 rate, rate_mask); 1195 rate, rate_mask);
1198 return -1; 1196 return -1;
1199 } 1197 }
1200 tbl->current_rate = rate_n_flags_from_tbl(tbl, rate, is_green); 1198 tbl->current_rate = rate_n_flags_from_tbl(tbl, rate, is_green);
1201 1199
1202 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", 1200 IWL_DEBUG_RATE("LQ: Switch to new mcs %X index is green %X\n",
1203 tbl->current_rate, is_green); 1201 tbl->current_rate, is_green);
1204 return 0; 1202 return 0;
1205} 1203}
@@ -1232,7 +1230,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1232 !sta->ht_info.ht_supported) 1230 !sta->ht_info.ht_supported)
1233 return -1; 1231 return -1;
1234 1232
1235 IWL_DEBUG_HT("LQ: try to switch to SISO\n"); 1233 IWL_DEBUG_RATE("LQ: try to switch to SISO\n");
1236 1234
1237 tbl->is_dup = lq_sta->is_dup; 1235 tbl->is_dup = lq_sta->is_dup;
1238 tbl->lq_type = LQ_SISO; 1236 tbl->lq_type = LQ_SISO;
@@ -1260,17 +1258,17 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
1260 if (is_green) 1258 if (is_green)
1261 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/ 1259 tbl->is_SGI = 0; /*11n spec: no SGI in SISO+Greenfield*/
1262 1260
1263 rs_get_expected_tpt_table(lq_sta, tbl); 1261 rs_set_expected_tpt_table(lq_sta, tbl);
1264 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index, index); 1262 rate = rs_get_best_rate(priv, lq_sta, tbl, rate_mask, index, index);
1265 1263
1266 IWL_DEBUG_HT("LQ: get best rate %d mask %X\n", rate, rate_mask); 1264 IWL_DEBUG_RATE("LQ: get best rate %d mask %X\n", rate, rate_mask);
1267 if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) { 1265 if ((rate == IWL_RATE_INVALID) || !((1 << rate) & rate_mask)) {
1268 IWL_DEBUG_HT("can not switch with index %d rate mask %x\n", 1266 IWL_DEBUG_RATE("can not switch with index %d rate mask %x\n",
1269 rate, rate_mask); 1267 rate, rate_mask);
1270 return -1; 1268 return -1;
1271 } 1269 }
1272 tbl->current_rate = rate_n_flags_from_tbl(tbl, rate, is_green); 1270 tbl->current_rate = rate_n_flags_from_tbl(tbl, rate, is_green);
1273 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", 1271 IWL_DEBUG_RATE("LQ: Switch to new mcs %X index is green %X\n",
1274 tbl->current_rate, is_green); 1272 tbl->current_rate, is_green);
1275 return 0; 1273 return 0;
1276#else 1274#else
@@ -1302,7 +1300,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1302 for (; ;) { 1300 for (; ;) {
1303 switch (tbl->action) { 1301 switch (tbl->action) {
1304 case IWL_LEGACY_SWITCH_ANTENNA: 1302 case IWL_LEGACY_SWITCH_ANTENNA:
1305 IWL_DEBUG_HT("LQ Legacy toggle Antenna\n"); 1303 IWL_DEBUG_RATE("LQ Legacy toggle Antenna\n");
1306 1304
1307 search_tbl->lq_type = LQ_NONE; 1305 search_tbl->lq_type = LQ_NONE;
1308 lq_sta->action_counter++; 1306 lq_sta->action_counter++;
@@ -1322,12 +1320,12 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1322 1320
1323 rs_toggle_antenna(&search_tbl->current_rate, 1321 rs_toggle_antenna(&search_tbl->current_rate,
1324 search_tbl); 1322 search_tbl);
1325 rs_get_expected_tpt_table(lq_sta, search_tbl); 1323 rs_set_expected_tpt_table(lq_sta, search_tbl);
1326 lq_sta->search_better_tbl = 1; 1324 lq_sta->search_better_tbl = 1;
1327 goto out; 1325 goto out;
1328 1326
1329 case IWL_LEGACY_SWITCH_SISO: 1327 case IWL_LEGACY_SWITCH_SISO:
1330 IWL_DEBUG_HT("LQ: Legacy switch to SISO\n"); 1328 IWL_DEBUG_RATE("LQ: Legacy switch to SISO\n");
1331 1329
1332 /* Set up search table to try SISO */ 1330 /* Set up search table to try SISO */
1333 memcpy(search_tbl, tbl, sz); 1331 memcpy(search_tbl, tbl, sz);
@@ -1342,7 +1340,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv,
1342 1340
1343 break; 1341 break;
1344 case IWL_LEGACY_SWITCH_MIMO2: 1342 case IWL_LEGACY_SWITCH_MIMO2:
1345 IWL_DEBUG_HT("LQ: Legacy switch to MIMO2\n"); 1343 IWL_DEBUG_RATE("LQ: Legacy switch to MIMO2\n");
1346 1344
1347 /* Set up search table to try MIMO */ 1345 /* Set up search table to try MIMO */
1348 memcpy(search_tbl, tbl, sz); 1346 memcpy(search_tbl, tbl, sz);
@@ -1401,7 +1399,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1401 lq_sta->action_counter++; 1399 lq_sta->action_counter++;
1402 switch (tbl->action) { 1400 switch (tbl->action) {
1403 case IWL_SISO_SWITCH_ANTENNA: 1401 case IWL_SISO_SWITCH_ANTENNA:
1404 IWL_DEBUG_HT("LQ: SISO toggle Antenna\n"); 1402 IWL_DEBUG_RATE("LQ: SISO toggle Antenna\n");
1405 /*FIXME:RS: is this really needed for SISO?*/ 1403 /*FIXME:RS: is this really needed for SISO?*/
1406 if (window->success_ratio >= IWL_RS_GOOD_RATIO) 1404 if (window->success_ratio >= IWL_RS_GOOD_RATIO)
1407 break; 1405 break;
@@ -1417,7 +1415,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1417 goto out; 1415 goto out;
1418 1416
1419 case IWL_SISO_SWITCH_MIMO2: 1417 case IWL_SISO_SWITCH_MIMO2:
1420 IWL_DEBUG_HT("LQ: SISO switch to MIMO\n"); 1418 IWL_DEBUG_RATE("LQ: SISO switch to MIMO\n");
1421 memcpy(search_tbl, tbl, sz); 1419 memcpy(search_tbl, tbl, sz);
1422 search_tbl->is_SGI = 0; 1420 search_tbl->is_SGI = 0;
1423 search_tbl->ant_type = ANT_AB; /*FIXME:RS*/ 1421 search_tbl->ant_type = ANT_AB; /*FIXME:RS*/
@@ -1429,7 +1427,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1429 } 1427 }
1430 break; 1428 break;
1431 case IWL_SISO_SWITCH_GI: 1429 case IWL_SISO_SWITCH_GI:
1432 IWL_DEBUG_HT("LQ: SISO toggle SGI/NGI\n"); 1430 IWL_DEBUG_RATE("LQ: SISO toggle SGI/NGI\n");
1433 1431
1434 memcpy(search_tbl, tbl, sz); 1432 memcpy(search_tbl, tbl, sz);
1435 if (is_green) { 1433 if (is_green) {
@@ -1439,7 +1437,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv,
1439 IWL_ERROR("SGI was set in GF+SISO\n"); 1437 IWL_ERROR("SGI was set in GF+SISO\n");
1440 } 1438 }
1441 search_tbl->is_SGI = !tbl->is_SGI; 1439 search_tbl->is_SGI = !tbl->is_SGI;
1442 rs_get_expected_tpt_table(lq_sta, search_tbl); 1440 rs_set_expected_tpt_table(lq_sta, search_tbl);
1443 if (tbl->is_SGI) { 1441 if (tbl->is_SGI) {
1444 s32 tpt = lq_sta->last_tpt / 100; 1442 s32 tpt = lq_sta->last_tpt / 100;
1445 if (tpt >= search_tbl->expected_tpt[index]) 1443 if (tpt >= search_tbl->expected_tpt[index])
@@ -1490,7 +1488,7 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv,
1490 switch (tbl->action) { 1488 switch (tbl->action) {
1491 case IWL_MIMO_SWITCH_ANTENNA_A: 1489 case IWL_MIMO_SWITCH_ANTENNA_A:
1492 case IWL_MIMO_SWITCH_ANTENNA_B: 1490 case IWL_MIMO_SWITCH_ANTENNA_B:
1493 IWL_DEBUG_HT("LQ: MIMO2 switch to SISO\n"); 1491 IWL_DEBUG_RATE("LQ: MIMO2 switch to SISO\n");
1494 1492
1495 /* Set up new search table for SISO */ 1493 /* Set up new search table for SISO */
1496 memcpy(search_tbl, tbl, sz); 1494 memcpy(search_tbl, tbl, sz);
@@ -1510,12 +1508,12 @@ static int rs_move_mimo_to_other(struct iwl_priv *priv,
1510 break; 1508 break;
1511 1509
1512 case IWL_MIMO_SWITCH_GI: 1510 case IWL_MIMO_SWITCH_GI:
1513 IWL_DEBUG_HT("LQ: MIMO toggle SGI/NGI\n"); 1511 IWL_DEBUG_RATE("LQ: MIMO toggle SGI/NGI\n");
1514 1512
1515 /* Set up new search table for MIMO */ 1513 /* Set up new search table for MIMO */
1516 memcpy(search_tbl, tbl, sz); 1514 memcpy(search_tbl, tbl, sz);
1517 search_tbl->is_SGI = !tbl->is_SGI; 1515 search_tbl->is_SGI = !tbl->is_SGI;
1518 rs_get_expected_tpt_table(lq_sta, search_tbl); 1516 rs_set_expected_tpt_table(lq_sta, search_tbl);
1519 /* 1517 /*
1520 * If active table already uses the fastest possible 1518 * If active table already uses the fastest possible
1521 * modulation (dual stream with short guard interval), 1519 * modulation (dual stream with short guard interval),
@@ -1593,7 +1591,7 @@ static void rs_stay_in_table(struct iwl4965_lq_sta *lq_sta)
1593 (lq_sta->total_success > lq_sta->max_success_limit) || 1591 (lq_sta->total_success > lq_sta->max_success_limit) ||
1594 ((!lq_sta->search_better_tbl) && (lq_sta->flush_timer) 1592 ((!lq_sta->search_better_tbl) && (lq_sta->flush_timer)
1595 && (flush_interval_passed))) { 1593 && (flush_interval_passed))) {
1596 IWL_DEBUG_HT("LQ: stay is expired %d %d %d\n:", 1594 IWL_DEBUG_RATE("LQ: stay is expired %d %d %d\n:",
1597 lq_sta->total_failed, 1595 lq_sta->total_failed,
1598 lq_sta->total_success, 1596 lq_sta->total_success,
1599 flush_interval_passed); 1597 flush_interval_passed);
@@ -1616,7 +1614,7 @@ static void rs_stay_in_table(struct iwl4965_lq_sta *lq_sta)
1616 lq_sta->table_count_limit) { 1614 lq_sta->table_count_limit) {
1617 lq_sta->table_count = 0; 1615 lq_sta->table_count = 0;
1618 1616
1619 IWL_DEBUG_HT("LQ: stay in table clear win\n"); 1617 IWL_DEBUG_RATE("LQ: stay in table clear win\n");
1620 for (i = 0; i < IWL_RATE_COUNT; i++) 1618 for (i = 0; i < IWL_RATE_COUNT; i++)
1621 rs_rate_scale_clear_window( 1619 rs_rate_scale_clear_window(
1622 &(tbl->win[i])); 1620 &(tbl->win[i]));
@@ -1715,8 +1713,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1715 tbl->lq_type); 1713 tbl->lq_type);
1716 1714
1717 /* rates available for this association, and for modulation mode */ 1715 /* rates available for this association, and for modulation mode */
1718 rs_get_supported_rates(lq_sta, hdr, tbl->lq_type, 1716 rate_mask = rs_get_supported_rates(lq_sta, hdr, tbl->lq_type);
1719 &rate_mask);
1720 1717
1721 IWL_DEBUG_RATE("mask 0x%04X \n", rate_mask); 1718 IWL_DEBUG_RATE("mask 0x%04X \n", rate_mask);
1722 1719
@@ -1756,7 +1753,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1756 1753
1757 /* Get expected throughput table and history window for current rate */ 1754 /* Get expected throughput table and history window for current rate */
1758 if (!tbl->expected_tpt) 1755 if (!tbl->expected_tpt)
1759 rs_get_expected_tpt_table(lq_sta, tbl); 1756 rs_set_expected_tpt_table(lq_sta, tbl);
1760 1757
1761 window = &(tbl->win[index]); 1758 window = &(tbl->win[index]);
1762 1759
@@ -1806,7 +1803,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1806 if ((window->success_ratio > success_limit) || 1803 if ((window->success_ratio > success_limit) ||
1807 (window->average_tpt > lq_sta->last_tpt)) { 1804 (window->average_tpt > lq_sta->last_tpt)) {
1808 if (!is_legacy(tbl->lq_type)) { 1805 if (!is_legacy(tbl->lq_type)) {
1809 IWL_DEBUG_HT("LQ: we are switching to HT" 1806 IWL_DEBUG_RATE("LQ: we are switching to HT"
1810 " rate suc %d current tpt %d" 1807 " rate suc %d current tpt %d"
1811 " old tpt %d\n", 1808 " old tpt %d\n",
1812 window->success_ratio, 1809 window->success_ratio,
@@ -1834,7 +1831,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1834 1831
1835 /* Need to set up a new rate table in uCode */ 1832 /* Need to set up a new rate table in uCode */
1836 update_lq = 1; 1833 update_lq = 1;
1837 IWL_DEBUG_HT("XXY GO BACK TO OLD TABLE\n"); 1834 IWL_DEBUG_RATE("XXY GO BACK TO OLD TABLE\n");
1838 } 1835 }
1839 1836
1840 /* Either way, we've made a decision; modulation mode 1837 /* Either way, we've made a decision; modulation mode
@@ -1942,7 +1939,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1942 break; 1939 break;
1943 } 1940 }
1944 1941
1945 IWL_DEBUG_HT("choose rate scale index %d action %d low %d " 1942 IWL_DEBUG_RATE("choose rate scale index %d action %d low %d "
1946 "high %d type %d\n", 1943 "high %d type %d\n",
1947 index, scale_action, low, high, tbl->lq_type); 1944 index, scale_action, low, high, tbl->lq_type);
1948 1945
@@ -1987,7 +1984,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1987 index = iwl4965_hwrate_to_plcp_idx( 1984 index = iwl4965_hwrate_to_plcp_idx(
1988 tbl->current_rate); 1985 tbl->current_rate);
1989 1986
1990 IWL_DEBUG_HT("Switch current mcs: %X index: %d\n", 1987 IWL_DEBUG_RATE("Switch current mcs: %X index: %d\n",
1991 tbl->current_rate, index); 1988 tbl->current_rate, index);
1992 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate, 1989 rs_fill_link_cmd(priv, lq_sta, tbl->current_rate,
1993 &lq_sta->lq); 1990 &lq_sta->lq);
@@ -2006,7 +2003,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2006#endif 2003#endif
2007 (lq_sta->action_counter >= 1)) { 2004 (lq_sta->action_counter >= 1)) {
2008 lq_sta->action_counter = 0; 2005 lq_sta->action_counter = 0;
2009 IWL_DEBUG_HT("LQ: STAY in legacy table\n"); 2006 IWL_DEBUG_RATE("LQ: STAY in legacy table\n");
2010 rs_set_stay_in_table(1, lq_sta); 2007 rs_set_stay_in_table(1, lq_sta);
2011 } 2008 }
2012 2009
@@ -2019,7 +2016,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2019 if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) && 2016 if ((lq_sta->last_tpt > IWL_AGG_TPT_THREHOLD) &&
2020 (lq_sta->tx_agg_tid_en & (1 << tid)) && 2017 (lq_sta->tx_agg_tid_en & (1 << tid)) &&
2021 (tid != MAX_TID_COUNT)) { 2018 (tid != MAX_TID_COUNT)) {
2022 IWL_DEBUG_HT("try to aggregate tid %d\n", tid); 2019 IWL_DEBUG_RATE("try to aggregate tid %d\n", tid);
2023 rs_tl_turn_on_agg(priv, tid, lq_sta, sta); 2020 rs_tl_turn_on_agg(priv, tid, lq_sta, sta);
2024 } 2021 }
2025#endif /*CONFIG_IWL4965_HT */ 2022#endif /*CONFIG_IWL4965_HT */
@@ -2103,7 +2100,7 @@ static void rs_initialize_lq(struct iwl_priv *priv,
2103 2100
2104 rate = rate_n_flags_from_tbl(tbl, rate_idx, use_green); 2101 rate = rate_n_flags_from_tbl(tbl, rate_idx, use_green);
2105 tbl->current_rate = rate; 2102 tbl->current_rate = rate;
2106 rs_get_expected_tpt_table(lq_sta, tbl); 2103 rs_set_expected_tpt_table(lq_sta, tbl);
2107 rs_fill_link_cmd(NULL, lq_sta, rate, &lq_sta->lq); 2104 rs_fill_link_cmd(NULL, lq_sta, rate, &lq_sta->lq);
2108 iwl_send_lq_cmd(priv, &lq_sta->lq, CMD_ASYNC); 2105 iwl_send_lq_cmd(priv, &lq_sta->lq, CMD_ASYNC);
2109 out: 2106 out:
@@ -2227,7 +2224,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2227 DECLARE_MAC_BUF(mac); 2224 DECLARE_MAC_BUF(mac);
2228 2225
2229 /* for IBSS the call are from tasklet */ 2226 /* for IBSS the call are from tasklet */
2230 IWL_DEBUG_HT("LQ: ADD station %s\n", 2227 IWL_DEBUG_RATE("LQ: ADD station %s\n",
2231 print_mac(mac, sta->addr)); 2228 print_mac(mac, sta->addr));
2232 2229
2233 if (sta_id == IWL_INVALID_STATION) { 2230 if (sta_id == IWL_INVALID_STATION) {
@@ -2287,7 +2284,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2287 lq_sta->active_mimo3_rate &= ~((u16)0x2); 2284 lq_sta->active_mimo3_rate &= ~((u16)0x2);
2288 lq_sta->active_mimo3_rate <<= IWL_FIRST_OFDM_RATE; 2285 lq_sta->active_mimo3_rate <<= IWL_FIRST_OFDM_RATE;
2289 2286
2290 IWL_DEBUG_HT("SISO RATE %X MIMO2 RATE %X MIMO3 RATE %X\n", 2287 IWL_DEBUG_RATE("SISO RATE %X MIMO2 RATE %X MIMO3 RATE %X\n",
2291 lq_sta->active_siso_rate, 2288 lq_sta->active_siso_rate,
2292 lq_sta->active_mimo2_rate, 2289 lq_sta->active_mimo2_rate,
2293 lq_sta->active_mimo3_rate); 2290 lq_sta->active_mimo3_rate);