iwlwifi: checking for all the possible failure cases
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Wed, 28 Apr 2010 01:43:33 +0000 (18:43 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 10 May 2010 22:08:50 +0000 (15:08 -0700)
Multiple error condition require fw/rf reset, driver should check all
the possible errors as long as the error checking functions for the
devices are available.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-rx.c

index 1dff14a67b2c928791dec6f6be99286aa30fce2d..d661fce000c2177f21f1497fd43bb2b690eae026 100644 (file)
@@ -412,9 +412,11 @@ static void iwl_recover_from_statistics(struct iwl_priv *priv,
                                 */
                                IWL_ERR(priv, "low ack count detected, "
                                        "restart firmware\n");
-                               iwl_force_reset(priv, IWL_FW_RESET);
+                               if (!iwl_force_reset(priv, IWL_FW_RESET))
+                                       return;
                        }
-               } else if (priv->cfg->ops->lib->check_plcp_health) {
+               }
+               if (priv->cfg->ops->lib->check_plcp_health) {
                        if (!priv->cfg->ops->lib->check_plcp_health(
                            priv, pkt)) {
                                /*