diff options
author | David Spinadel <david.spinadel@intel.com> | 2012-03-11 01:00:10 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-12 22:22:02 +0400 |
commit | 8f7ffbe2b275e5315773322161945a24518e31f4 (patch) | |
tree | ca73d736a52b9e443ce79a010c16d19cfb081f75 /drivers/net/wireless/iwlwifi/iwl-ucode.c | |
parent | 69a10b29eb87cf186cac20921b4884e349b59c97 (diff) | |
download | linux-8f7ffbe2b275e5315773322161945a24518e31f4.tar.xz |
iwlwifi: avoid some operations if no uCode loaded
Printing the SRAM and similar testmode operations could
be triggered when no uCode is loaded; prevent those
invalid operations by tracking whether uCode is loaded.
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, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c index d97cf44b75ba..ae935c0e3563 100644 --- a/drivers/net/wireless/iwlwifi/iwl-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c @@ -465,6 +465,8 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv, priv->shrd->ucode_type = ucode_type; fw = iwl_get_ucode_image(priv, ucode_type); + priv->ucode_loaded = false; + if (!fw) return -EINVAL; @@ -519,6 +521,8 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv, return ret; } + priv->ucode_loaded = true; + return 0; } @@ -563,5 +567,7 @@ int iwl_run_init_ucode(struct iwl_priv *priv) out: /* Whatever happened, stop the device */ iwl_trans_stop_device(trans(priv)); + priv->ucode_loaded = false; + return ret; } |