summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2012-03-10 13:00:10 -0800
committerJohn W. Linville <linville@tuxdriver.com>2012-03-12 14:22:02 -0400
commit8f7ffbe2b275e5315773322161945a24518e31f4 (patch)
treeca73d736a52b9e443ce79a010c16d19cfb081f75 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent69a10b29eb87cf186cac20921b4884e349b59c97 (diff)
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-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 66d7446ff07..f1226dbf789 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -816,6 +816,7 @@ void iwl_down(struct iwl_priv *priv)
if (priv->mac80211_registered)
ieee80211_stop_queues(priv->hw);
+ priv->ucode_loaded = false;
iwl_trans_stop_device(trans(priv));
/* Clear out all status bits but a few that are stable across reset */
@@ -1406,6 +1407,7 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode)
iwl_tt_exit(priv);
/*This will stop the queues, move the device to low power state */
+ priv->ucode_loaded = false;
iwl_trans_stop_device(trans(priv));
iwl_eeprom_free(priv->shrd);