diff options
author | David Spinadel <david.spinadel@intel.com> | 2012-03-10 16:00:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-12 14:22:04 -0400 |
commit | b5ea1624833b816184aa262c190f2774b8d2ea63 (patch) | |
tree | d59b11f5a01d1c54f7acfe4d8d59ec6085fa6df5 /drivers/net/wireless/iwlwifi/iwl-ucode.c | |
parent | 8f7ffbe2b275e5315773322161945a24518e31f4 (diff) |
iwlwifi: explicitly track whether INIT uCode was run
Remove IWL_UCODE_NONE from enum iwl_ucode_type which,
by being the default value in 0-initialized memory,
implicitly allowed us to track whether any uCode had
ever been loaded successfully (which would have been
the INIT uCode) and instead explicitly track whether
or not INIT uCode has been run.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-ucode.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-ucode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c index ae935c0e3563..0908880dd7ac 100644 --- a/drivers/net/wireless/iwlwifi/iwl-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c | |||
@@ -87,7 +87,7 @@ iwl_get_ucode_image(struct iwl_priv *priv, enum iwl_ucode_type ucode_type) | |||
87 | return &priv->fw->ucode_wowlan; | 87 | return &priv->fw->ucode_wowlan; |
88 | case IWL_UCODE_REGULAR: | 88 | case IWL_UCODE_REGULAR: |
89 | return &priv->fw->ucode_rt; | 89 | return &priv->fw->ucode_rt; |
90 | case IWL_UCODE_NONE: | 90 | default: |
91 | break; | 91 | break; |
92 | } | 92 | } |
93 | return NULL; | 93 | return NULL; |
@@ -537,7 +537,7 @@ int iwl_run_init_ucode(struct iwl_priv *priv) | |||
537 | if (!priv->fw->ucode_init.code.len) | 537 | if (!priv->fw->ucode_init.code.len) |
538 | return 0; | 538 | return 0; |
539 | 539 | ||
540 | if (priv->shrd->ucode_type != IWL_UCODE_NONE) | 540 | if (priv->init_ucode_run) |
541 | return 0; | 541 | return 0; |
542 | 542 | ||
543 | iwl_init_notification_wait(&priv->notif_wait, &calib_wait, | 543 | iwl_init_notification_wait(&priv->notif_wait, &calib_wait, |
@@ -559,6 +559,8 @@ int iwl_run_init_ucode(struct iwl_priv *priv) | |||
559 | */ | 559 | */ |
560 | ret = iwl_wait_notification(&priv->notif_wait, &calib_wait, | 560 | ret = iwl_wait_notification(&priv->notif_wait, &calib_wait, |
561 | UCODE_CALIB_TIMEOUT); | 561 | UCODE_CALIB_TIMEOUT); |
562 | if (!ret) | ||
563 | priv->init_ucode_run = true; | ||
562 | 564 | ||
563 | goto out; | 565 | goto out; |
564 | 566 | ||