diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-03 13:55:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-05-04 13:24:22 -0400 |
commit | 3d79b2a9eeaa066b35c49fbb17e3156a3c482c3e (patch) | |
tree | 980589d21bb56f5ac31a2859e71c11ee37408298 | |
parent | 52c773861895faaf544bd398c87ba10dff29f313 (diff) |
iwlwifi: recalculate average tpt if not current
We currently have this check as a BUG_ON, which is being hit by people.
Previously it was an error with a recalculation if not current, return that
code.
The BUG_ON was introduced by:
commit 3110bef78cb4282c58245bc8fd6d95d9ccb19749
Author: Guy Cohen <guy.cohen@intel.com>
Date: Tue Sep 9 10:54:54 2008 +0800
iwlwifi: Added support for 3 antennas
... the portion adding the BUG_ON is reverted since we are encountering the error
and BUG_ON was created with assumption that error is not encountered.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index f01f242659c3..331c23a6c4e8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -2077,10 +2077,12 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2077 | } | 2077 | } |
2078 | /* Else we have enough samples; calculate estimate of | 2078 | /* Else we have enough samples; calculate estimate of |
2079 | * actual average throughput */ | 2079 | * actual average throughput */ |
2080 | 2080 | if (window->average_tpt != ((window->success_ratio * | |
2081 | /* Sanity-check TPT calculations */ | 2081 | tbl->expected_tpt[index] + 64) / 128)) { |
2082 | BUG_ON(window->average_tpt != ((window->success_ratio * | 2082 | IWL_ERR(priv, "expected_tpt should have been calculated by now\n"); |
2083 | tbl->expected_tpt[index] + 64) / 128)); | 2083 | window->average_tpt = ((window->success_ratio * |
2084 | tbl->expected_tpt[index] + 64) / 128); | ||
2085 | } | ||
2084 | 2086 | ||
2085 | /* If we are searching for better modulation mode, check success. */ | 2087 | /* If we are searching for better modulation mode, check success. */ |
2086 | if (lq_sta->search_better_tbl && | 2088 | if (lq_sta->search_better_tbl && |