From: Wey-Yi Guy Date: Wed, 28 Apr 2010 01:43:33 +0000 (-0700) Subject: iwlwifi: checking for all the possible failure cases X-Git-Tag: upstream/snapshot3+hdmi~13787^2~107^2~473^2~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d38f1731e3a8217e228fde0a4bfece865bc7901;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git iwlwifi: checking for all the possible failure cases 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 Signed-off-by: Wey-Yi Guy Signed-off-by: Reinette Chatre --- diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 1dff14a..d661fce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c @@ -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)) { /*