* [RFC/RFT] iwlwifi: module parameters for health check
@ 2011-02-08 13:38 Stanislaw Gruszka
2011-02-08 15:54 ` wwguy
0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2011-02-08 13:38 UTC (permalink / raw)
To: Wey-Yi Guy, Intel Linux Wireless; +Cc: linux-wireless, Stanislaw Gruszka
Currently we unconditionally check "health" and reset radio or whole
device when bad state is detected.
However that not always work correctly. Particularly plcp check is
causing very low speed problems on 3945 and low ack check make 5xxx
devices randomly stop working.
Patch module option to allow to disable this checks. Actually it
make checks disabled by default, since IMHO they are causing more
troubles than give help, but that need to be tested.
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 7 +++++++
drivers/net/wireless/iwlwifi/iwl-core.h | 2 ++
drivers/net/wireless/iwlwifi/iwl-rx.c | 6 ++++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 2d83f9f..65cfe12 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -4795,3 +4795,10 @@ MODULE_PARM_DESC(antenna_coupling,
module_param_named(bt_ch_inhibition, iwlagn_bt_ch_announce, bool, S_IRUGO);
MODULE_PARM_DESC(bt_ch_inhibition,
"Disable BT channel inhibition (default: enable)");
+
+module_param_named(plcp_check, iwlagn_mod_params.plcp_check, bool, S_IRUGO);
+MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 0 [disabled])");
+
+module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
+MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");
+
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 9e7a6d1..96f07d4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -261,6 +261,8 @@ struct iwl_mod_params {
int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
int antenna; /* def: 0 = both antennas (use diversity) */
int restart_fw; /* def: 1 = restart firmware */
+ bool plcp_check; /* def: false = disable plcp health check */
+ bool ack_check; /* def: false = disable ack health check */
};
/*
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index b9c2591..8a1a483 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -238,14 +238,16 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
!iwl_is_any_associated(priv))
return;
- if (priv->cfg->ops->lib->check_ack_health &&
+ if (priv->cfg->mod_params->ack_check &&
+ priv->cfg->ops->lib->check_ack_health &&
!priv->cfg->ops->lib->check_ack_health(priv, pkt)) {
IWL_ERR(priv, "low ack count detected, restart firmware\n");
if (!iwl_force_reset(priv, IWL_FW_RESET, false))
return;
}
- if (priv->cfg->ops->lib->check_plcp_health &&
+ if (priv->cfg->mod_params->plcp_check &&
+ priv->cfg->ops->lib->check_plcp_health &&
!priv->cfg->ops->lib->check_plcp_health(priv, pkt, msecs))
iwl_force_reset(priv, IWL_RF_RESET, false);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC/RFT] iwlwifi: module parameters for health check
2011-02-08 13:38 [RFC/RFT] iwlwifi: module parameters for health check Stanislaw Gruszka
@ 2011-02-08 15:54 ` wwguy
0 siblings, 0 replies; 2+ messages in thread
From: wwguy @ 2011-02-08 15:54 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: Intel Linux Wireless, linux-wireless@vger.kernel.org
Hi Stanislaw,
On Tue, 2011-02-08 at 05:38 -0800, Stanislaw Gruszka wrote:
> Currently we unconditionally check "health" and reset radio or whole
> device when bad state is detected.
>
> However that not always work correctly. Particularly plcp check is
> causing very low speed problems on 3945 and low ack check make 5xxx
> devices randomly stop working.
>
> Patch module option to allow to disable this checks. Actually it
> make checks disabled by default, since IMHO they are causing more
> troubles than give help, but that need to be tested.
> ---
> drivers/net/wireless/iwlwifi/iwl-agn.c | 7 +++++++
> drivers/net/wireless/iwlwifi/iwl-core.h | 2 ++
> drivers/net/wireless/iwlwifi/iwl-rx.c | 6 ++++--
> 3 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
> index 2d83f9f..65cfe12 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
> @@ -4795,3 +4795,10 @@ MODULE_PARM_DESC(antenna_coupling,
> module_param_named(bt_ch_inhibition, iwlagn_bt_ch_announce, bool, S_IRUGO);
> MODULE_PARM_DESC(bt_ch_inhibition,
> "Disable BT channel inhibition (default: enable)");
> +
> +module_param_named(plcp_check, iwlagn_mod_params.plcp_check, bool, S_IRUGO);
> +MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 0 [disabled])");
> +
> +module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
> +MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");
> +
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
> index 9e7a6d1..96f07d4 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.h
> @@ -261,6 +261,8 @@ struct iwl_mod_params {
> int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
> int antenna; /* def: 0 = both antennas (use diversity) */
> int restart_fw; /* def: 1 = restart firmware */
> + bool plcp_check; /* def: false = disable plcp health check */
> + bool ack_check; /* def: false = disable ack health check */
> };
>
> /*
> diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
> index b9c2591..8a1a483 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-rx.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
> @@ -238,14 +238,16 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
> !iwl_is_any_associated(priv))
> return;
>
> - if (priv->cfg->ops->lib->check_ack_health &&
> + if (priv->cfg->mod_params->ack_check &&
> + priv->cfg->ops->lib->check_ack_health &&
> !priv->cfg->ops->lib->check_ack_health(priv, pkt)) {
> IWL_ERR(priv, "low ack count detected, restart firmware\n");
> if (!iwl_force_reset(priv, IWL_FW_RESET, false))
> return;
> }
>
> - if (priv->cfg->ops->lib->check_plcp_health &&
> + if (priv->cfg->mod_params->plcp_check &&
> + priv->cfg->ops->lib->check_plcp_health &&
> !priv->cfg->ops->lib->check_plcp_health(priv, pkt, msecs))
> iwl_force_reset(priv, IWL_RF_RESET, false);
> }
I am even thinking remove it for 3945 all together.
for agn device, I agree disable "low_ack_check" by default, not so sure
about plcp_health
Wey
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-08 15:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08 13:38 [RFC/RFT] iwlwifi: module parameters for health check Stanislaw Gruszka
2011-02-08 15:54 ` 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).