summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-09-15 11:37:17 +0300
committerJohannes Berg <johannes.berg@intel.com>2013-10-02 11:25:38 +0200
commit8ca95995e64f5d270889badb3e449dca91106a2b (patch)
treecb45262eca24a3e79ed173c5d35012390e6001ea /drivers/net/wireless/iwlwifi/iwl-trans.h
parentb49926629fb5c324bb1ed3960fb0d7905a4a8562 (diff)
downloadblackbird-op-linux-8ca95995e64f5d270889badb3e449dca91106a2b.tar.gz
blackbird-op-linux-8ca95995e64f5d270889badb3e449dca91106a2b.zip
iwlwifi: don't WARN on host commands sent when firmware is dead
This triggers automatic bug reports and add no valuable information. Print a simple error instead and drop the host command. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index dd57a36ecb10..80b47508647c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -601,8 +601,10 @@ static inline int iwl_trans_send_cmd(struct iwl_trans *trans,
{
int ret;
- WARN_ONCE(trans->state != IWL_TRANS_FW_ALIVE,
- "%s bad state = %d", __func__, trans->state);
+ if (trans->state != IWL_TRANS_FW_ALIVE) {
+ IWL_ERR(trans, "%s bad state = %d", __func__, trans->state);
+ return -EIO;
+ }
if (!(cmd->flags & CMD_ASYNC))
lock_map_acquire_read(&trans->sync_cmd_lockdep_map);
OpenPOWER on IntegriCloud