aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-03-10 17:35:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:44 -0400
commit8fe723117a8ef543b6e68ba24e50e1c15250f6c5 (patch)
treefd8ee64e0056274d3abca51a73bf24761ac04445 /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parent86b4766b059e071c5e8d680be48cf730355dca5a (diff)
iwlwifi: HT performance improvement changes
During rate scaling, checking for 0 retry count before decrement the count by 1, this can avoid the retry count to become 255 (0xff), which will cause the rate to drop faster than what we expect during good condition (receive 0 retry packet). also change the algorithm to make the rate not drop faster than what we like. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index a6f4c74ff2b4..0929f310b2d4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -801,7 +801,10 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
801 !(info->flags & IEEE80211_TX_STAT_AMPDU)) 801 !(info->flags & IEEE80211_TX_STAT_AMPDU))
802 return; 802 return;
803 803
804 retries = info->status.rates[0].count - 1; 804 if (info->flags & IEEE80211_TX_STAT_AMPDU)
805 retries = 0;
806 else
807 retries = info->status.rates[0].count - 1;
805 808
806 if (retries > 15) 809 if (retries > 15)
807 retries = 15; 810 retries = 15;
@@ -1897,7 +1900,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1897 if (high != IWL_RATE_INVALID && sr >= IWL_RATE_INCREASE_TH) 1900 if (high != IWL_RATE_INVALID && sr >= IWL_RATE_INCREASE_TH)
1898 scale_action = 1; 1901 scale_action = 1;
1899 else if (low != IWL_RATE_INVALID) 1902 else if (low != IWL_RATE_INVALID)
1900 scale_action = -1; 1903 scale_action = 0;
1901 } 1904 }
1902 1905
1903 /* Both adjacent throughputs are measured, but neither one has better 1906 /* Both adjacent throughputs are measured, but neither one has better
@@ -1918,9 +1921,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1918 sr >= IWL_RATE_INCREASE_TH) { 1921 sr >= IWL_RATE_INCREASE_TH) {
1919 scale_action = 1; 1922 scale_action = 1;
1920 } else { 1923 } else {
1921 IWL_DEBUG_RATE(priv, 1924 scale_action = 0;
1922 "decrease rate because of high tpt\n");
1923 scale_action = -1;
1924 } 1925 }
1925 1926
1926 /* Lower adjacent rate's throughput is measured */ 1927 /* Lower adjacent rate's throughput is measured */