linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Cc: johill@sipsolutions.net, reinette.chatre@intel.com,
	Adel Gadllah <adel.gadllah@gmail.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON
Date: Mon,  3 May 2010 13:25:49 -0400	[thread overview]
Message-ID: <1272907549-25847-1-git-send-email-linville@tuxdriver.com> (raw)

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


             reply	other threads:[~2010-05-03 17:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 17:25 John W. Linville [this message]
2010-05-03 17:48 ` [PATCH] iwlagn: Change the TPT calculations sanity-check to WARN_ON 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272907549-25847-1-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=adel.gadllah@gmail.com \
    --cc=johill@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).