diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-07-31 08:34:07 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-24 16:28:07 -0400 |
commit | 0975cc8fbf5b61b188734f2edd9e588c7edff2a1 (patch) | |
tree | 9ea25bdc70467af87ba49c2a55128cc999647046 /drivers/net/wireless/iwlwifi/iwl-tx.c | |
parent | 36d344131c154c0fb7dd6a3703fc1b29c56a75a1 (diff) | |
download | linux-0975cc8fbf5b61b188734f2edd9e588c7edff2a1.tar.gz linux-0975cc8fbf5b61b188734f2edd9e588c7edff2a1.tar.bz2 linux-0975cc8fbf5b61b188734f2edd9e588c7edff2a1.zip |
iwlwifi: separate thermal throttling function
"Thermal Throttling" is an advance feature which only available for
newer _agn devices. Move from iwl-core to iwl-agn for better code
organization.
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index a81989c06983..c308dab14673 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c @@ -422,6 +422,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) int len; u32 idx; u16 fix_size; + bool is_ct_kill = false; cmd->len = priv->cfg->ops->utils->get_hcmd_size(cmd->id, cmd->len); fix_size = (u16)(cmd->len + sizeof(out_cmd->hdr)); @@ -443,9 +444,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) if (iwl_queue_space(q) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) { IWL_ERR(priv, "No space in command queue\n"); - if (iwl_within_ct_kill_margin(priv)) - iwl_tt_enter_ct_kill(priv); - else { + if (priv->cfg->ops->lib->tt_ops.ct_kill_check) { + is_ct_kill = + priv->cfg->ops->lib->tt_ops.ct_kill_check(priv); + } + if (!is_ct_kill) { IWL_ERR(priv, "Restarting adapter due to queue full\n"); queue_work(priv->workqueue, &priv->restart); } |