1 |
From sgruszka@redhat.com Mon May 9 16:34:59 2011 |
2 |
From: Stanislaw Gruszka <sgruszka@redhat.com> |
3 |
Date: Mon, 9 May 2011 21:27:30 +0200 |
4 |
Subject: iwlwifi: add {ack, plpc}_check module parameters |
5 |
To: kernel@lists.fedoraproject.org, stable@kernel.org |
6 |
Cc: Kyle McMartin <kmcmartin@redhat.com>, Stanislaw Gruszka <sgruszka@redhat.com> |
7 |
Message-ID: <1304969250-27725-1-git-send-email-sgruszka@redhat.com> |
8 |
|
9 |
From: Stanislaw Gruszka <sgruszka@redhat.com> |
10 |
|
11 |
commit b7977ffaab5187ad75edaf04ac854615cea93828 upstream. |
12 |
|
13 |
Add module ack_check, and plcp_check parameters. Ack_check is disabled |
14 |
by default since is proved that check ack health can cause troubles. |
15 |
Plcp_check is enabled by default. |
16 |
|
17 |
This prevent connection hangs with "low ack count detected" messages. |
18 |
|
19 |
Resolves: |
20 |
https://bugzilla.redhat.com/show_bug.cgi?id=666646 |
21 |
|
22 |
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> |
23 |
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
24 |
--- |
25 |
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 1 + |
26 |
drivers/net/wireless/iwlwifi/iwl-agn.c | 6 ++++++ |
27 |
drivers/net/wireless/iwlwifi/iwl-core.h | 2 ++ |
28 |
drivers/net/wireless/iwlwifi/iwl-rx.c | 8 ++++++-- |
29 |
4 files changed, 15 insertions(+), 2 deletions(-) |
30 |
|
31 |
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c |
32 |
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c |
33 |
@@ -604,6 +604,7 @@ const u8 *iwlagn_eeprom_query_addr(const |
34 |
struct iwl_mod_params iwlagn_mod_params = { |
35 |
.amsdu_size_8K = 1, |
36 |
.restart_fw = 1, |
37 |
+ .plcp_check = true, |
38 |
/* the rest are 0 by default */ |
39 |
}; |
40 |
|
41 |
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c |
42 |
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c |
43 |
@@ -4586,3 +4586,9 @@ MODULE_PARM_DESC(antenna_coupling, |
44 |
module_param_named(bt_ch_inhibition, iwlagn_bt_ch_announce, bool, S_IRUGO); |
45 |
MODULE_PARM_DESC(bt_ch_inhibition, |
46 |
"Disable BT channel inhibition (default: enable)"); |
47 |
+ |
48 |
+module_param_named(plcp_check, iwlagn_mod_params.plcp_check, bool, S_IRUGO); |
49 |
+MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 1 [enabled])"); |
50 |
+ |
51 |
+module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO); |
52 |
+MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])"); |
53 |
--- a/drivers/net/wireless/iwlwifi/iwl-core.h |
54 |
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h |
55 |
@@ -263,6 +263,8 @@ struct iwl_mod_params { |
56 |
int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ |
57 |
int antenna; /* def: 0 = both antennas (use diversity) */ |
58 |
int restart_fw; /* def: 1 = restart firmware */ |
59 |
+ bool plcp_check; /* def: true = enable plcp health check */ |
60 |
+ bool ack_check; /* def: false = disable ack health check */ |
61 |
}; |
62 |
|
63 |
/* |
64 |
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c |
65 |
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c |
66 |
@@ -234,10 +234,13 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_no |
67 |
void iwl_recover_from_statistics(struct iwl_priv *priv, |
68 |
struct iwl_rx_packet *pkt) |
69 |
{ |
70 |
+ const struct iwl_mod_params *mod_params = priv->cfg->mod_params; |
71 |
+ |
72 |
if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
73 |
return; |
74 |
if (iwl_is_any_associated(priv)) { |
75 |
- if (priv->cfg->ops->lib->check_ack_health) { |
76 |
+ if (mod_params->ack_check && |
77 |
+ priv->cfg->ops->lib->check_ack_health) { |
78 |
if (!priv->cfg->ops->lib->check_ack_health( |
79 |
priv, pkt)) { |
80 |
/* |
81 |
@@ -250,7 +253,8 @@ void iwl_recover_from_statistics(struct |
82 |
return; |
83 |
} |
84 |
} |
85 |
- if (priv->cfg->ops->lib->check_plcp_health) { |
86 |
+ if (mod_params->plcp_check && |
87 |
+ priv->cfg->ops->lib->check_plcp_health) { |
88 |
if (!priv->cfg->ops->lib->check_plcp_health( |
89 |
priv, pkt)) { |
90 |
/* |