summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
diff options
context:
space:
mode:
authorDon Fry <donald.h.fry@intel.com>2012-03-15 13:27:05 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-04-09 16:37:47 -0400
commit17acd0b64e23d92013621dc2caa3042ce6769770 (patch)
treea4edbddf9a7a2a8a1b1b2115ac2af248da499e0a /drivers/net/wireless/iwlwifi/iwl-agn-lib.c
parente3ec26de90c18b1b198f94f5b2444ba48cc6ce2d (diff)
downloadlinux-17acd0b64e23d92013621dc2caa3042ce6769770.tar.bz2
iwlwifi: move FW_ERROR to priv
The op_mode should check for FW_ERROR before calling send_cmd. This removes the need to test for FW_ERROR in the trans layer. Signed-off-by: Don Fry <donald.h.fry@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-lib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index bbb67b0604fb..180df01d0916 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1298,6 +1298,12 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
return -EIO;
}
+ if (test_bit(STATUS_FW_ERROR, &priv->status)) {
+ IWL_ERR(priv, "Command %s failed: FW Error\n",
+ get_cmd_string(cmd->id));
+ return -EIO;
+ }
+
/*
* Synchronous commands from this op-mode must hold
* the mutex, this ensures we don't try to send two