From: Wey-Yi Guy Date: Tue, 8 Feb 2011 00:54:50 +0000 (-0800) Subject: iwlwifi: Loading correct uCode again when fail to load X-Git-Tag: v2.6.39-rc1~468^2~158^2^2~70^2~4 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=46d0637a128f2f555c1f7be02cd65c45b92b2a60;p=~shefty%2Frdma-dev.git iwlwifi: Loading correct uCode again when fail to load During uCode loading, if the reply_alive come back with "failure", try to load the same uCode again. Signed-off-by: Wey-Yi Guy --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index abd0461bd30..c04d99124ca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -466,6 +466,15 @@ static void iwl_rx_reply_alive(struct iwl_priv *priv, IWL_WARN(priv, "%s uCode did not respond OK.\n", (palive->ver_subtype == INITIALIZE_SUBTYPE) ? "init" : "runtime"); + /* + * If fail to load init uCode, + * let's try to load the init uCode again. + * We should not get into this situation, but if it + * does happen, we should not move on and loading "runtime" + * without proper calibrate the device. + */ + if (palive->ver_subtype == INITIALIZE_SUBTYPE) + priv->ucode_type = UCODE_NONE; queue_work(priv->workqueue, &priv->restart); } }