linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON
@ 2010-05-03 17:25 John W. Linville
  2010-05-03 17:48 ` reinette chatre
  2010-05-03 20:29 ` [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON Kalle Valo
  0 siblings, 2 replies; 11+ messages in thread
From: John W. Linville @ 2010-05-03 17:25 UTC (permalink / raw)
  To: linux-wireless; +Cc: johill, reinette.chatre, Adel Gadllah, John W. Linville

From: Adel Gadllah <adel.gadllah@gmail.com>

Currently it is a BUG_ON() which will hang the machine once triggered.

(Changed from WARN_ON to WARN_ON_ONCE. -- JWL)

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 8f8d5e3..ca63ff9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2079,8 +2079,9 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
 	 * actual average throughput */
 
 	/* Sanity-check TPT calculations */
-	BUG_ON(window->average_tpt != ((window->success_ratio *
-			tbl->expected_tpt[index] + 64) / 128));
+	if (WARN_ON_ONCE(window->average_tpt != ((window->success_ratio *
+				tbl->expected_tpt[index] + 64) / 128)))
+		return;
 
 	/* If we are searching for better modulation mode, check success. */
 	if (lq_sta->search_better_tbl &&
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-05-06 18:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 17:25 [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON John W. Linville
2010-05-03 17:48 ` reinette chatre
2010-05-03 17:55   ` [PATCH] iwlwifi: recalculate average tpt if not current reinette chatre
2010-05-06 16:11     ` reinette chatre
2010-05-06 18:22       ` John W. Linville
2010-05-06 18:50         ` reinette chatre
2010-05-03 20:29 ` [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON Kalle Valo
2010-05-03 20:48   ` Gábor Stefanik
2010-05-03 21:01     ` Pavel Roskin
2010-05-03 21:10       ` Adel Gadllah
2010-05-03 21:20         ` Gábor Stefanik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).