aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-05 12:41:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:51:37 -0400
commite649437fd6e2bae6f7b8a36a302a1ec4faa5d906 (patch)
tree282932c057ba1eccdbc53e47413649c2a077f475 /drivers/net/wireless/iwlwifi/iwl-tx.c
parent1fc352765fb461e4afafff4d650624df8ab6b6d6 (diff)
iwlagn: centralize and fix ucode restart
The ucode restart has to take into account a number of things, like clearing the HCMD_ACTIVE and other status bits, and waking up the wait_command_queue. Currently, however, there are a number of places that neither do that, nor actually set the FW error bit that leads to proper restart handling, which means that in those cases things will probably just hang completely. To clean this up, make all ucode restart go through a single function, except for the cases where it's called during firmware loading. Also fix a bug in wimax coexist restart avoidance, it needs to first clear the status bits (and it has to clear the HCMD_ACTIVE one as well) and then wake up anything waiting on wait_command_queue. Signed-off-by: Johannes Berg <johannes.berg@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-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 39a4180ee854..fa81df22a103 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -474,7 +474,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
474 } 474 }
475 if (!is_ct_kill) { 475 if (!is_ct_kill) {
476 IWL_ERR(priv, "Restarting adapter due to queue full\n"); 476 IWL_ERR(priv, "Restarting adapter due to queue full\n");
477 queue_work(priv->workqueue, &priv->restart); 477 iwlagn_fw_error(priv, false);
478 } 478 }
479 return -ENOSPC; 479 return -ENOSPC;
480 } 480 }
@@ -582,7 +582,7 @@ static void iwl_hcmd_queue_reclaim(struct iwl_priv *priv, int txq_id,
582 if (nfreed++ > 0) { 582 if (nfreed++ > 0) {
583 IWL_ERR(priv, "HCMD skipped: index (%d) %d %d\n", idx, 583 IWL_ERR(priv, "HCMD skipped: index (%d) %d %d\n", idx,
584 q->write_ptr, q->read_ptr); 584 q->write_ptr, q->read_ptr);
585 queue_work(priv->workqueue, &priv->restart); 585 iwlagn_fw_error(priv, false);
586 } 586 }
587 587
588 } 588 }