Thread (6 messages) 6 messages, 2 authors, 2011-02-23
STALE5593d
Revisions (4)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v1 [diff vs current]

[PATCH 2/4] iwlwifi: Loading correct uCode again when fail to load

From: Wey-Yi Guy <hidden>
Date: 2011-02-21 20:00:15
Subsystem: networking drivers (wireless), the rest · Maintainers: Johannes Berg, Linus Torvalds

During uCode loading, if the reply_alive come back with "failure",
try to load the same uCode again.

Signed-off-by: Wey-Yi Guy <redacted>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index abd0461..c04d991 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);
 	}
 }
-- 
1.7.0.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help