diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.h | 2 |
2 files changed, 7 insertions, 6 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 */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h index 345806dd8870..ab59acc405d9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.h | |||
@@ -231,7 +231,7 @@ enum { | |||
231 | #define IWL_RS_GOOD_RATIO 12800 /* 100% */ | 231 | #define IWL_RS_GOOD_RATIO 12800 /* 100% */ |
232 | #define IWL_RATE_SCALE_SWITCH 10880 /* 85% */ | 232 | #define IWL_RATE_SCALE_SWITCH 10880 /* 85% */ |
233 | #define IWL_RATE_HIGH_TH 10880 /* 85% */ | 233 | #define IWL_RATE_HIGH_TH 10880 /* 85% */ |
234 | #define IWL_RATE_INCREASE_TH 8960 /* 70% */ | 234 | #define IWL_RATE_INCREASE_TH 6400 /* 50% */ |
235 | #define IWL_RATE_DECREASE_TH 1920 /* 15% */ | 235 | #define IWL_RATE_DECREASE_TH 1920 /* 15% */ |
236 | 236 | ||
237 | /* possible actions when in legacy mode */ | 237 | /* possible actions when in legacy mode */ |