[kernel/f15] [sgruszka@] iwlwifi: fix general 11n instability (rhbz#648732)

Kyle McMartin kyle at fedoraproject.org
Mon Jun 20 14:17:42 UTC 2011


commit 622985637b49e11af7ae086eaa2138828772c0e1
Author: Kyle McMartin <kyle at redhat.com>
Date:   Mon Jun 20 10:16:07 2011 -0400

    [sgruszka@] iwlwifi: fix general 11n instability (rhbz#648732)

 ...o-self-protection-on-5000-adapters-series.patch |  103 ++++++++++++++++++++
 kernel.spec                                        |    9 ++-
 2 files changed, 111 insertions(+), 1 deletions(-)
---
diff --git a/iwlagn-use-cts-to-self-protection-on-5000-adapters-series.patch b/iwlagn-use-cts-to-self-protection-on-5000-adapters-series.patch
new file mode 100644
index 0000000..6743f90
--- /dev/null
+++ b/iwlagn-use-cts-to-self-protection-on-5000-adapters-series.patch
@@ -0,0 +1,103 @@
+From sgruszka at redhat.com Mon Jun 20 10:09:55 2011
+From: Stanislaw Gruszka <sgruszka at redhat.com>
+To: kernel at lists.fedoraproject.org
+Subject: [PATCH 2.6.38] iwlagn: use cts-to-self protection on 5000 adapters series
+Date: Mon, 20 Jun 2011 16:11:22 +0200
+Message-Id: <1308579082-19006-2-git-send-email-sgruszka at redhat.com>
+
+This patch fixes 802.11n stability and performance regression we have
+since 2.6.35. It boost performance on my 5GHz N-only network from about
+5MB/s to 8MB/s. Similar percentage boost can be observed on 2.4 GHz.
+
+These are test results of 5x downloading of approximately 700MB iso
+image:
+
+vanilla: 5.27 5.22 4.94 4.47 5.31 ; avr 5.0420 std 0.35110
+patched: 8.07 7.95 8.06 7.99 7.96 ; avr 8.0060 std 0.055946
+
+This was achieved with NetworkManager configured to do not perform
+periodical scans, by configuring constant BSSID. With periodical scans,
+after some time, performance downgrade to unpatched driver level, like
+in example below:
+
+patched: 7.40 7.61 4.28 4.37 4.80 avr 5.6920 std 1.6683
+
+However patch still make better here, since similar test on unpatched
+driver make link disconnects with below messages after some time:
+
+wlan1: authenticate with 00:23:69:35:d1:3f (try 1)
+wlan1: authenticate with 00:23:69:35:d1:3f (try 2)
+wlan1: authenticate with 00:23:69:35:d1:3f (try 3)
+wlan1: authentication with 00:23:69:35:d1:3f timed out
+
+On 2.6.35 kernel patch helps against connection hangs with messages:
+
+iwlagn 0000:20:00.0: queue 10 stuck 3 time. Fw reload.
+iwlagn 0000:20:00.0: On demand firmware reload
+iwlagn 0000:20:00.0: Stopping AGG while state not ON or starting
+
+Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
+---
+ drivers/net/wireless/iwlwifi/iwl-5000.c     |    1 -
+ drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c |   12 ++----------
+ drivers/net/wireless/iwlwifi/iwl-agn-rxon.c |    8 ++++++++
+ 3 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
+index 537fb8c..909cc30 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
++++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
+@@ -517,7 +517,6 @@ static struct iwl_base_params iwl5000_base_params = {
+ };
+ static struct iwl_ht_params iwl5000_ht_params = {
+ 	.ht_greenfield_support = true,
+-	.use_rts_for_aggregation = true, /* use rts/cts protection */
+ };
+ 
+ #define IWL_DEVICE_5000						\
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+index 366340f..89762a7 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+@@ -217,17 +217,9 @@ static void iwlagn_tx_cmd_protection(struct iwl_priv *priv,
+ 				     __le16 fc, __le32 *tx_flags)
+ {
+ 	if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS ||
+-	    info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
++	    info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT ||
++	    info->flags & IEEE80211_TX_CTL_AMPDU)
+ 		*tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK;
+-		return;
+-	}
+-
+-	if (priv->cfg->ht_params &&
+-	    priv->cfg->ht_params->use_rts_for_aggregation &&
+-	    info->flags & IEEE80211_TX_CTL_AMPDU) {
+-		*tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK;
+-		return;
+-	}
+ }
+ 
+ /* Calc max signal level (dBm) among 3 possible receivers */
+diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+index ee802fe..b19fb85 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
++++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+@@ -145,6 +145,14 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
+ 	/* always get timestamp with Rx frame */
+ 	ctx->staging.flags |= RXON_FLG_TSF2HOST_MSK;
+ 
++	/*
++	 * force CTS-to-self frames protection if RTS-CTS is not preferred
++	 * one aggregation protection method
++	 */
++	if (!(priv->cfg->ht_params &&
++	      priv->cfg->ht_params->use_rts_for_aggregation))
++		ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
++
+ 	if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) ||
+ 	    !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK))
+ 		ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
+-- 
+1.7.1
+
diff --git a/kernel.spec b/kernel.spec
index 0b8e716..02301f0 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -51,7 +51,7 @@ Summary: The Linux kernel
 # For non-released -rc kernels, this will be prepended with "0.", so
 # for example a 3 here will become 0.3
 #
-%global baserelease 32
+%global baserelease 33
 %global fedora_build %{baserelease}
 
 # base_sublevel is the kernel version we're starting with and patching
@@ -750,6 +750,7 @@ Patch12415: hid-multitouch-add-support-for-elo-touchsystems.patch
 Patch12416: bluetooth-device-ids-for-ath3k-on-pegatron-lucid-tablets.patch
 
 Patch12418: ath5k-disable-fast-channel-switching-by-default.patch
+Patch12419: iwlagn-use-cts-to-self-protection-on-5000-adapters-series.patch
 
 Patch12420: crypto-aesni_intel-merge-with-fpu_ko.patch
 
@@ -1397,6 +1398,9 @@ ApplyPatch bluetooth-device-ids-for-ath3k-on-pegatron-lucid-tablets.patch
 # rhbz#709122
 ApplyPatch ath5k-disable-fast-channel-switching-by-default.patch
 
+# rhbz#648732
+ApplyPatch iwlagn-use-cts-to-self-protection-on-5000-adapters-series.patch
+
 # rhbz#589390
 ApplyPatch crypto-aesni_intel-merge-with-fpu_ko.patch
 
@@ -2008,6 +2012,9 @@ fi
 # and build.
 
 %changelog
+* Mon Jun 20 2011 Kyle McMartin <kmcmartin at redhat.com> 2.6.38.8-33
+- [sgruszka@] iwlwifi: fix general 11n instability (rhbz#648732)
+
 * Wed Jun 15 2011 Kyle McMartin <kmcmartin at redhat.com>
 - crypto: aesni-intel - Merge with fpu.ko (rhbz#589390)
 


More information about the scm-commits mailing list