]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: add {ack, plpc}_check module parameters
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 9 May 2011 19:27:30 +0000 (21:27 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 May 2011 22:13:06 +0000 (15:13 -0700)
commit b7977ffaab5187ad75edaf04ac854615cea93828 upstream.

Add module ack_check, and plcp_check parameters. Ack_check is disabled
by default since is proved that check ack health can cause troubles.
Plcp_check is enabled by default.

This prevent connection hangs with "low ack count detected" messages.

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=666646

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-rx.c

index 3dee87e8f55dbdf1f09633f81cc54e8280a61dd0..d9c87b3227eb33ed16db98ae26f902905c70f6fb 100644 (file)
@@ -604,6 +604,7 @@ const u8 *iwlagn_eeprom_query_addr(const struct iwl_priv *priv,
 struct iwl_mod_params iwlagn_mod_params = {
        .amsdu_size_8K = 1,
        .restart_fw = 1,
+       .plcp_check = true,
        /* the rest are 0 by default */
 };
 
index 35239f04927c096390691976ca338bc65fa66848..be076439cc91eeb239564006c3552e3b6b216bd6 100644 (file)
@@ -4586,3 +4586,9 @@ 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: 1 [enabled])");
+
+module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
+MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");
index a3474376fdbc72afe78225f62551adf44cb7786e..5c0d5f72cbac5494fa389ecbb14358d38c91918a 100644 (file)
@@ -263,6 +263,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: true = enable plcp health check */
+       bool ack_check;         /* def: false = disable ack health check */
 };
 
 /*
index 87a6fd84d4d25827e7c363638fb31b3b5fbef3c8..b7076173436acefa541abe4c40df07db15783fe5 100644 (file)
@@ -234,10 +234,13 @@ EXPORT_SYMBOL(iwl_rx_spectrum_measure_notif);
 void iwl_recover_from_statistics(struct iwl_priv *priv,
                                struct iwl_rx_packet *pkt)
 {
+       const struct iwl_mod_params *mod_params = priv->cfg->mod_params;
+
        if (test_bit(STATUS_EXIT_PENDING, &priv->status))
                return;
        if (iwl_is_any_associated(priv)) {
-               if (priv->cfg->ops->lib->check_ack_health) {
+               if (mod_params->ack_check &&
+                   priv->cfg->ops->lib->check_ack_health) {
                        if (!priv->cfg->ops->lib->check_ack_health(
                            priv, pkt)) {
                                /*
@@ -250,7 +253,8 @@ void iwl_recover_from_statistics(struct iwl_priv *priv,
                                        return;
                        }
                }
-               if (priv->cfg->ops->lib->check_plcp_health) {
+               if (mod_params->plcp_check &&
+                   priv->cfg->ops->lib->check_plcp_health) {
                        if (!priv->cfg->ops->lib->check_plcp_health(
                            priv, pkt)) {
                                /*