* [PATCH] iwlagn: use cts-to-self protection on 5000 adapters series
@ 2011-05-25 12:33 Stanislaw Gruszka
2011-05-25 14:13 ` wwguy
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2011-05-25 12:33 UTC (permalink / raw)
To: Wey-Yi Guy; +Cc: Johannes Berg, Intel Linux Wireless, linux-wireless
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 unpached 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 unpached
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
Cc: stable@kernel.org # 2.6.35+
Signed-off-by: Stanislaw Gruszka <sgruszka@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 a70b8cf..f96eb5b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -425,7 +425,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 b12c72d..23fa93d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -163,17 +163,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 a95ad84..0a1941d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -325,6 +325,14 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
return 0;
}
+ /*
+ * 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlagn: use cts-to-self protection on 5000 adapters series
2011-05-25 12:33 [PATCH] iwlagn: use cts-to-self protection on 5000 adapters series Stanislaw Gruszka
@ 2011-05-25 14:13 ` wwguy
2011-05-26 11:17 ` Stanislaw Gruszka
0 siblings, 1 reply; 4+ messages in thread
From: wwguy @ 2011-05-25 14:13 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Johannes Berg, Intel Linux Wireless,
linux-wireless@vger.kernel.org
On Wed, 2011-05-25 at 05:33 -0700, Stanislaw Gruszka wrote:
> 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 unpached driver level, like
unpatched?
> 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 unpached
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
>
> Cc: stable@kernel.org # 2.6.35+
> Signed-off-by: Stanislaw Gruszka <sgruszka@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 a70b8cf..f96eb5b 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-5000.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
> @@ -425,7 +425,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 b12c72d..23fa93d 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
> @@ -163,17 +163,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 a95ad84..0a1941d 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
> @@ -325,6 +325,14 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
> return 0;
> }
>
> + /*
> + * force CTS-to-self frames protection if RTS-CTS is not preferred
> + * one aggregation protection method
on?
> + */
> + 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;
if I remember correctly, the RTS/CTS was added to fix 6000 performance
issue 2 years ago. Did you see the similar performance downgrade issue
on other devices beside 5000?
Thanks
Wey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlagn: use cts-to-self protection on 5000 adapters series
2011-05-25 14:13 ` wwguy
@ 2011-05-26 11:17 ` Stanislaw Gruszka
2011-05-26 14:21 ` wwguy
0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2011-05-26 11:17 UTC (permalink / raw)
To: wwguy; +Cc: Johannes Berg, Intel Linux Wireless,
linux-wireless@vger.kernel.org
On Wed, May 25, 2011 at 07:13:26AM -0700, wwguy wrote:
> On Wed, 2011-05-25 at 05:33 -0700, Stanislaw Gruszka wrote:
> > after some time, performance downgrade to unpached driver level, like
> unpatched?
> > However patch still make better here, since similar test on unpached
> unpatched?
I'll fix that.
> > + /*
> > + * force CTS-to-self frames protection if RTS-CTS is not preferred
> > + * one aggregation protection method
> on?
The sentence is not the best English, but replacing "one" to "on" will
not help, I think.
> if I remember correctly, the RTS/CTS was added to fix 6000 performance
> issue 2 years ago. Did you see the similar performance downgrade issue
> on other devices beside 5000?
No, I think only 5000 ware afected (also with random connection hangs).
Patching and using cts-to-self on 6000, give slightly better performance
here with 6300 adapter:
vanilla 6300 5Ghz: 8.13 8.03 8.13 8.03 8.19 avr 8.1020 std 0.070143
patched 6300 5Ghz: 8.60 8.59 8.60 8.41 8.57 avr 8.5540 std 0.081425
vanilla 6300 2GHz: 4.06 4.39 4.60 4.70 4.80 avr 4.5100 std 0.293770
patched 6300 2GHz: 4.94 4.90 4.94 5.05 4.88 avr 4.9420 std 0.065727
I plan to do more testing, but not yet (except 5000 adapters I have
quite good performance).
Stanislaw
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iwlagn: use cts-to-self protection on 5000 adapters series
2011-05-26 11:17 ` Stanislaw Gruszka
@ 2011-05-26 14:21 ` wwguy
0 siblings, 0 replies; 4+ messages in thread
From: wwguy @ 2011-05-26 14:21 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Johannes Berg, Intel Linux Wireless,
linux-wireless@vger.kernel.org
On Thu, 2011-05-26 at 04:17 -0700, Stanislaw Gruszka wrote:
> On Wed, May 25, 2011 at 07:13:26AM -0700, wwguy wrote:
> > On Wed, 2011-05-25 at 05:33 -0700, Stanislaw Gruszka wrote:
> > > after some time, performance downgrade to unpached driver level, like
> > unpatched?
>
> > > However patch still make better here, since similar test on unpached
> > unpatched?
>
> I'll fix that.
>
> > > + /*
> > > + * force CTS-to-self frames protection if RTS-CTS is not preferred
> > > + * one aggregation protection method
> > on?
>
> The sentence is not the best English, but replacing "one" to "on" will
> not help, I think.
>
> > if I remember correctly, the RTS/CTS was added to fix 6000 performance
> > issue 2 years ago. Did you see the similar performance downgrade issue
> > on other devices beside 5000?
>
> No, I think only 5000 ware afected (also with random connection hangs).
> Patching and using cts-to-self on 6000, give slightly better performance
> here with 6300 adapter:
>
> vanilla 6300 5Ghz: 8.13 8.03 8.13 8.03 8.19 avr 8.1020 std 0.070143
> patched 6300 5Ghz: 8.60 8.59 8.60 8.41 8.57 avr 8.5540 std 0.081425
>
> vanilla 6300 2GHz: 4.06 4.39 4.60 4.70 4.80 avr 4.5100 std 0.293770
> patched 6300 2GHz: 4.94 4.90 4.94 5.05 4.88 avr 4.9420 std 0.065727
>
> I plan to do more testing, but not yet (except 5000 adapters I have
> quite good performance).
>
Thanks for testing. the patch looks good.
Wey
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-26 14:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 12:33 [PATCH] iwlagn: use cts-to-self protection on 5000 adapters series Stanislaw Gruszka
2011-05-25 14:13 ` wwguy
2011-05-26 11:17 ` Stanislaw Gruszka
2011-05-26 14:21 ` wwguy
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).