diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-18 12:30:09 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-04-18 12:30:09 -0400 |
commit | f42e7662815647c1a6f73e160abcdf812d3057d2 (patch) | |
tree | 1038418013c66220fd0a8524db5787b0142ece50 | |
parent | b7af6a99690503a48c63ce5e587b4e4555f31cdb (diff) |
iwlagn: temperature should be measure for all _agn devices
Thermal throttling functions are available for all _agn devices, call the
functions directly.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 5 |
7 files changed, 3 insertions, 47 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index e7844565ef55..946c7dca440a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -214,11 +214,6 @@ static struct iwl_lib_ops iwl1000_lib = { | |||
214 | }, | 214 | }, |
215 | .txfifo_flush = iwlagn_txfifo_flush, | 215 | .txfifo_flush = iwlagn_txfifo_flush, |
216 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 216 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
217 | .tt_ops = { | ||
218 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
219 | .tt_power_mode = iwl_tt_current_power_mode, | ||
220 | .ct_kill_check = iwl_check_for_ct_kill, | ||
221 | } | ||
222 | }; | 217 | }; |
223 | 218 | ||
224 | static const struct iwl_ops iwl1000_ops = { | 219 | static const struct iwl_ops iwl1000_ops = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index dcd660818d21..c8bb4a4930df 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -298,11 +298,6 @@ static struct iwl_lib_ops iwl2000_lib = { | |||
298 | }, | 298 | }, |
299 | .txfifo_flush = iwlagn_txfifo_flush, | 299 | .txfifo_flush = iwlagn_txfifo_flush, |
300 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 300 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
301 | .tt_ops = { | ||
302 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
303 | .tt_power_mode = iwl_tt_current_power_mode, | ||
304 | .ct_kill_check = iwl_check_for_ct_kill, | ||
305 | } | ||
306 | }; | 301 | }; |
307 | 302 | ||
308 | static const struct iwl_ops iwl2000_ops = { | 303 | static const struct iwl_ops iwl2000_ops = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 14b75f1de186..ced89f662bd1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -383,11 +383,6 @@ static struct iwl_lib_ops iwl5000_lib = { | |||
383 | }, | 383 | }, |
384 | .txfifo_flush = iwlagn_txfifo_flush, | 384 | .txfifo_flush = iwlagn_txfifo_flush, |
385 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 385 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
386 | .tt_ops = { | ||
387 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
388 | .tt_power_mode = iwl_tt_current_power_mode, | ||
389 | .ct_kill_check = iwl_check_for_ct_kill, | ||
390 | } | ||
391 | }; | 386 | }; |
392 | 387 | ||
393 | static struct iwl_lib_ops iwl5150_lib = { | 388 | static struct iwl_lib_ops iwl5150_lib = { |
@@ -435,11 +430,6 @@ static struct iwl_lib_ops iwl5150_lib = { | |||
435 | }, | 430 | }, |
436 | .txfifo_flush = iwlagn_txfifo_flush, | 431 | .txfifo_flush = iwlagn_txfifo_flush, |
437 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 432 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
438 | .tt_ops = { | ||
439 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
440 | .tt_power_mode = iwl_tt_current_power_mode, | ||
441 | .ct_kill_check = iwl_check_for_ct_kill, | ||
442 | } | ||
443 | }; | 433 | }; |
444 | 434 | ||
445 | static const struct iwl_ops iwl5000_ops = { | 435 | static const struct iwl_ops iwl5000_ops = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 81881aad8751..ed6a0ed0f501 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -323,11 +323,6 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
323 | }, | 323 | }, |
324 | .txfifo_flush = iwlagn_txfifo_flush, | 324 | .txfifo_flush = iwlagn_txfifo_flush, |
325 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 325 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
326 | .tt_ops = { | ||
327 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
328 | .tt_power_mode = iwl_tt_current_power_mode, | ||
329 | .ct_kill_check = iwl_check_for_ct_kill, | ||
330 | } | ||
331 | }; | 326 | }; |
332 | 327 | ||
333 | static struct iwl_lib_ops iwl6030_lib = { | 328 | static struct iwl_lib_ops iwl6030_lib = { |
@@ -377,11 +372,6 @@ static struct iwl_lib_ops iwl6030_lib = { | |||
377 | }, | 372 | }, |
378 | .txfifo_flush = iwlagn_txfifo_flush, | 373 | .txfifo_flush = iwlagn_txfifo_flush, |
379 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | 374 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
380 | .tt_ops = { | ||
381 | .lower_power_detection = iwl_tt_is_low_power_state, | ||
382 | .tt_power_mode = iwl_tt_current_power_mode, | ||
383 | .ct_kill_check = iwl_check_for_ct_kill, | ||
384 | } | ||
385 | }; | 375 | }; |
386 | 376 | ||
387 | static struct iwl_nic_ops iwl6050_nic_ops = { | 377 | static struct iwl_nic_ops iwl6050_nic_ops = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 2e8c936e556d..abee5074d30e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -139,12 +139,6 @@ struct iwl_temp_ops { | |||
139 | void (*temperature)(struct iwl_priv *priv); | 139 | void (*temperature)(struct iwl_priv *priv); |
140 | }; | 140 | }; |
141 | 141 | ||
142 | struct iwl_tt_ops { | ||
143 | bool (*lower_power_detection)(struct iwl_priv *priv); | ||
144 | u8 (*tt_power_mode)(struct iwl_priv *priv); | ||
145 | bool (*ct_kill_check)(struct iwl_priv *priv); | ||
146 | }; | ||
147 | |||
148 | struct iwl_lib_ops { | 142 | struct iwl_lib_ops { |
149 | /* set hw dependent parameters */ | 143 | /* set hw dependent parameters */ |
150 | int (*set_hw_params)(struct iwl_priv *priv); | 144 | int (*set_hw_params)(struct iwl_priv *priv); |
@@ -190,9 +184,6 @@ struct iwl_lib_ops { | |||
190 | void (*dev_txfifo_flush)(struct iwl_priv *priv, u16 flush_control); | 184 | void (*dev_txfifo_flush)(struct iwl_priv *priv, u16 flush_control); |
191 | 185 | ||
192 | struct iwl_debugfs_ops debugfs_ops; | 186 | struct iwl_debugfs_ops debugfs_ops; |
193 | |||
194 | /* thermal throttling */ | ||
195 | struct iwl_tt_ops tt_ops; | ||
196 | }; | 187 | }; |
197 | 188 | ||
198 | struct iwl_led_ops { | 189 | struct iwl_led_ops { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index b7cd95820ff8..595c930b28ae 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -357,12 +357,10 @@ static void iwl_power_build_cmd(struct iwl_priv *priv, | |||
357 | 357 | ||
358 | if (priv->hw->conf.flags & IEEE80211_CONF_IDLE) | 358 | if (priv->hw->conf.flags & IEEE80211_CONF_IDLE) |
359 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); | 359 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); |
360 | else if (priv->cfg->ops->lib->tt_ops.lower_power_detection && | 360 | else if (iwl_tt_is_low_power_state(priv)) { |
361 | priv->cfg->ops->lib->tt_ops.tt_power_mode && | ||
362 | priv->cfg->ops->lib->tt_ops.lower_power_detection(priv)) { | ||
363 | /* in thermal throttling low power state */ | 361 | /* in thermal throttling low power state */ |
364 | iwl_static_sleep_cmd(priv, cmd, | 362 | iwl_static_sleep_cmd(priv, cmd, |
365 | priv->cfg->ops->lib->tt_ops.tt_power_mode(priv), dtimper); | 363 | iwl_tt_current_power_mode(priv), dtimper); |
366 | } else if (!enabled) | 364 | } else if (!enabled) |
367 | iwl_power_sleep_cam_cmd(priv, cmd); | 365 | iwl_power_sleep_cam_cmd(priv, cmd); |
368 | else if (priv->power_data.debug_sleep_level_override >= 0) | 366 | else if (priv->power_data.debug_sleep_level_override >= 0) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 1b69507db5fc..80c3565a66ae 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -484,10 +484,7 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
484 | spin_unlock_irqrestore(&priv->hcmd_lock, flags); | 484 | spin_unlock_irqrestore(&priv->hcmd_lock, flags); |
485 | 485 | ||
486 | IWL_ERR(priv, "No space in command queue\n"); | 486 | IWL_ERR(priv, "No space in command queue\n"); |
487 | if (priv->cfg->ops->lib->tt_ops.ct_kill_check) { | 487 | is_ct_kill = iwl_check_for_ct_kill(priv); |
488 | is_ct_kill = | ||
489 | priv->cfg->ops->lib->tt_ops.ct_kill_check(priv); | ||
490 | } | ||
491 | if (!is_ct_kill) { | 488 | if (!is_ct_kill) { |
492 | IWL_ERR(priv, "Restarting adapter due to queue full\n"); | 489 | IWL_ERR(priv, "Restarting adapter due to queue full\n"); |
493 | iwlagn_fw_error(priv, false); | 490 | iwlagn_fw_error(priv, false); |