From 8f7ffbe2b275e5315773322161945a24518e31f4 Mon Sep 17 00:00:00 2001 From: David Spinadel Date: Sat, 10 Mar 2012 13:00:10 -0800 Subject: 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 Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-core.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index e3eda50a5a6..46490d3b95b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -838,6 +838,9 @@ static void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand) iwl_print_rx_config_cmd(priv, IWL_RXON_CTX_BSS); #endif + /* uCode is no longer loaded. */ + priv->ucode_loaded = false; + /* Set the FW error flag -- cleared on iwl_down */ set_bit(STATUS_FW_ERROR, &priv->shrd->status); -- cgit v1.2.3-18-g5258