rpms/kernel/F-13 iwlwifi-recalculate-average-tpt-if-not-current.patch, NONE, 1.1 kernel.spec, 1.2017, 1.2018

John W. Linville linville at fedoraproject.org
Tue May 4 17:39:02 UTC 2010


Author: linville

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv7629

Modified Files:
	kernel.spec 
Added Files:
	iwlwifi-recalculate-average-tpt-if-not-current.patch 
Log Message:
iwlwifi: recalculate average tpt if not current (#588021)

iwlwifi-recalculate-average-tpt-if-not-current.patch:
 iwl-agn-rs.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- NEW FILE iwlwifi-recalculate-average-tpt-if-not-current.patch ---
>From reinette.chatre at intel.com Mon May  3 13:55:21 2010
Return-path: <reinette.chatre at intel.com>
Envelope-to: linville at tuxdriver.com
Delivery-date: Mon, 03 May 2010 13:55:21 -0400
Received: from mga11.intel.com ([192.55.52.93])
	by smtp.tuxdriver.com with esmtp (Exim 4.63)
	(envelope-from <reinette.chatre at intel.com>)
	id 1O8zrS-0000zD-K7
	for linville at tuxdriver.com; Mon, 03 May 2010 13:55:21 -0400
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
  by fmsmga102.fm.intel.com with ESMTP; 03 May 2010 10:53:30 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="4.52,320,1270450800"; 
   d="scan'208";a="795015044"
Received: from rchatre-desk.amr.corp.intel.com.jf.intel.com (HELO [134.134.15.94]) ([134.134.15.94])
  by fmsmga001.fm.intel.com with ESMTP; 03 May 2010 10:54:57 -0700
Subject: [PATCH] iwlwifi: recalculate average tpt if not current
From: reinette chatre <reinette.chatre at intel.com>
To: "John W. Linville" <linville at tuxdriver.com>
Cc: "linux-wireless at vger.kernel.org" <linux-wireless at vger.kernel.org>,  johannes at sipsolutions.net, Adel Gadllah <adel.gadllah at gmail.com>
In-Reply-To: <1272908934.7879.5748.camel at rchatre-DESK>
References: <1272907549-25847-1-git-send-email-linville at tuxdriver.com>
	 <1272908934.7879.5748.camel at rchatre-DESK>
Content-Type: text/plain; charset="UTF-8"
Date: Mon, 03 May 2010 10:55:07 -0700
Message-ID: <1272909307.7879.5759.camel at rchatre-DESK>
Mime-Version: 1.0
X-Mailer: Evolution 2.28.1 
Content-Transfer-Encoding: 7bit
X-Spam-Score: -4.2 (----)
X-Spam-Status: No
Status: RO
Content-Length: 1672
Lines: 49

From: Reinette Chatre <reinette.chatre at intel.com>

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 at 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 at intel.com>
---

 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 b93e491..75a145c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -2070,10 +2070,12 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
 	}
 	/* Else we have enough samples; calculate estimate of
 	 * actual average throughput */
-
-	/* Sanity-check TPT calculations */
-	BUG_ON(window->average_tpt != ((window->success_ratio *
-			tbl->expected_tpt[index] + 64) / 128));
+	if (window->average_tpt != ((window->success_ratio *
+			tbl->expected_tpt[index] + 64) / 128)) {
+		IWL_ERR(priv, "expected_tpt should have been calculated by now\n");
+		window->average_tpt = ((window->success_ratio *
+					tbl->expected_tpt[index] + 64) / 128);
+	}
 
 	/* If we are searching for better modulation mode, check success. */
 	if (lq_sta->search_better_tbl &&
-- 
1.6.3.3







Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2017
retrieving revision 1.2018
diff -u -p -r1.2017 -r1.2018
--- kernel.spec	4 May 2010 14:20:02 -0000	1.2017
+++ kernel.spec	4 May 2010 17:39:01 -0000	1.2018
@@ -843,6 +843,9 @@ Patch12820: ibmvscsi-fix-DMA-API-misuse.
 
 Patch12830: disable-i8042-check-on-apple-mac.patch
 
+# iwlwifi: recalculate average tpt if not current
+Patch12840: iwlwifi-recalculate-average-tpt-if-not-current.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1536,6 +1539,9 @@ ApplyPatch ibmvscsi-fix-DMA-API-misuse.p
 
 ApplyPatch disable-i8042-check-on-apple-mac.patch
 
+# iwlwifi: recalculate average tpt if not current
+ApplyPatch iwlwifi-recalculate-average-tpt-if-not-current.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2185,6 +2191,9 @@ fi
 # and build.
 
 %changelog
+* Tue May 4 2010 John W. Linville <linville at redhat.com> 2.6.33.3-82
+- iwlwifi: recalculate average tpt if not current (#588021)
+
 * Tue May 4 2010 Kyle McMartin <kyle at redhat.com> 2.6.33.3-81
 - disable-i8042-check-on-apple-mac.patch: avoid long delay or hang booting
   on Intel Apple Macs.



More information about the scm-commits mailing list