aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2013-11-20 18:12:11 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-12-09 15:29:47 -0500
commit9d015a03345d54d8de0339b2137deb96524766e0 (patch)
tree86e0cf274433dc9c342bc645f19a3445d7063e3a
parentd17334c4405951e326d6c393a357d3cb937a090e (diff)
iwlwifi: mvm: rs: update expected TPT tables if aggregation changed
Expected TPT table was updated only when switching to a new modulation. This is wrong as toggling aggregation changes the expected TPT signficantly. This leads to scenarios where turning aggregation on after being in MIMO sends us back to SISO despite a perfect success ratio. This occurred because the TPT of the SISO mode was being estimated based on aggregation while the MIMO one wasn't. Also remove an error print which isn't an error anymore since we might be updating the expected TPT table due to aggregation changes. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/rs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c
index ecf24cb6ebf6..882ecd30cf56 100644
--- a/drivers/net/wireless/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/rs.c
@@ -1717,6 +1717,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
1717 u16 high_low; 1717 u16 high_low;
1718 s32 sr; 1718 s32 sr;
1719 u8 tid = IWL_MAX_TID_COUNT; 1719 u8 tid = IWL_MAX_TID_COUNT;
1720 u8 prev_agg = lq_sta->is_agg;
1720 struct iwl_mvm_sta *sta_priv = (void *)sta->drv_priv; 1721 struct iwl_mvm_sta *sta_priv = (void *)sta->drv_priv;
1721 struct iwl_mvm_tid_data *tid_data; 1722 struct iwl_mvm_tid_data *tid_data;
1722 1723
@@ -1752,6 +1753,13 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
1752 1753
1753 tbl = &(lq_sta->lq_info[active_tbl]); 1754 tbl = &(lq_sta->lq_info[active_tbl]);
1754 1755
1756 if (prev_agg != lq_sta->is_agg) {
1757 IWL_DEBUG_RATE(mvm,
1758 "Aggregation changed: prev %d current %d. Update expected TPT table\n",
1759 prev_agg, lq_sta->is_agg);
1760 rs_set_expected_tpt_table(lq_sta, tbl);
1761 }
1762
1755 /* current tx rate */ 1763 /* current tx rate */
1756 index = lq_sta->last_txrate_idx; 1764 index = lq_sta->last_txrate_idx;
1757 1765
@@ -1837,8 +1845,6 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
1837 * actual average throughput */ 1845 * actual average throughput */
1838 if (window->average_tpt != ((window->success_ratio * 1846 if (window->average_tpt != ((window->success_ratio *
1839 tbl->expected_tpt[index] + 64) / 128)) { 1847 tbl->expected_tpt[index] + 64) / 128)) {
1840 IWL_ERR(mvm,
1841 "expected_tpt should have been calculated by now\n");
1842 window->average_tpt = ((window->success_ratio * 1848 window->average_tpt = ((window->success_ratio *
1843 tbl->expected_tpt[index] + 64) / 128); 1849 tbl->expected_tpt[index] + 64) / 128);
1844 } 1850 }