aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
diff options
context:
space:
mode:
authorGuy Cohen <guy.cohen@intel.com>2008-09-08 22:54:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-11 15:53:39 -0400
commit90d7795e152f9b7095adef77b71a4448f092e3b6 (patch)
treec7c92298411edd5c42b01eb564a5a0711709285d /drivers/net/wireless/iwlwifi/iwl-agn-rs.c
parent12e5e22d38577a5a16dd47e7144722817a55e52e (diff)
iwlwifi: fix searching for best rate in new search column
This patch fixes a bug in Rate Scaling. When moving from SISO to MIMO we need to choose the lowest higher rate, instead of choosing the highest in MIMO. No doing this can lead to a high packet loss in the highest rate in MIMO, leading not to move MIMO although lower in MIMO could give a better TPT. Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Zhu Yi <yi.zhu@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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 4fc3a0f1d8f1..de00be1bffad 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -436,7 +436,7 @@ static int rs_collect_tx_data(struct iwl_rate_scale_data *windows,
436 /* Shift bitmap by one frame (throw away oldest history), 436 /* Shift bitmap by one frame (throw away oldest history),
437 * OR in "1", and increment "success" if this 437 * OR in "1", and increment "success" if this
438 * frame was successful. */ 438 * frame was successful. */
439 window->data <<= 1;; 439 window->data <<= 1;
440 if (successes > 0) { 440 if (successes > 0) {
441 window->success_counter++; 441 window->success_counter++;
442 window->data |= 0x1; 442 window->data |= 0x1;
@@ -1128,6 +1128,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv,
1128 1128
1129 /* Higher rate not available, use the original */ 1129 /* Higher rate not available, use the original */
1130 } else { 1130 } else {
1131 new_rate = rate;
1131 break; 1132 break;
1132 } 1133 }
1133 } 1134 }