aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-10-23 16:42:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:50:01 -0400
commit480e8407dc0bccdd8d7cfe29b8fcaaa21dd20e68 (patch)
tree457ede73d9680e744e46ac179d690ef944c3a058 /drivers/net/wireless
parent6047b4f939682ae9bf839fd00c80029cb8f073bb (diff)
iwlwifi: issue ct_kill host command based on device config
Using device configuration structure to decide how to configure ct_kill host command. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
4 files changed, 16 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 3da5913225e2..3a645e485dda 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -171,6 +171,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
171 .ht_greenfield_support = true, 171 .ht_greenfield_support = true,
172 .led_compensation = 51, 172 .led_compensation = 51,
173 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 173 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
174 .support_ct_kill_exit = true,
174}; 175};
175 176
176struct iwl_cfg iwl1000_bg_cfg = { 177struct iwl_cfg iwl1000_bg_cfg = {
@@ -196,6 +197,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
196 .ht_greenfield_support = true, 197 .ht_greenfield_support = true,
197 .led_compensation = 51, 198 .led_compensation = 51,
198 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 199 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
200 .support_ct_kill_exit = true,
199}; 201};
200 202
201MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 203MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 0873322755aa..f5855293c767 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -278,6 +278,7 @@ struct iwl_cfg iwl6000h_2agn_cfg = {
278 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 278 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
279 .supports_idle = true, 279 .supports_idle = true,
280 .adv_thermal_throttle = true, 280 .adv_thermal_throttle = true,
281 .support_ct_kill_exit = true,
281}; 282};
282 283
283struct iwl_cfg iwl6000h_2abg_cfg = { 284struct iwl_cfg iwl6000h_2abg_cfg = {
@@ -306,6 +307,7 @@ struct iwl_cfg iwl6000h_2abg_cfg = {
306 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 307 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
307 .supports_idle = true, 308 .supports_idle = true,
308 .adv_thermal_throttle = true, 309 .adv_thermal_throttle = true,
310 .support_ct_kill_exit = true,
309}; 311};
310 312
311struct iwl_cfg iwl6000h_2bg_cfg = { 313struct iwl_cfg iwl6000h_2bg_cfg = {
@@ -334,6 +336,7 @@ struct iwl_cfg iwl6000h_2bg_cfg = {
334 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 336 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
335 .supports_idle = true, 337 .supports_idle = true,
336 .adv_thermal_throttle = true, 338 .adv_thermal_throttle = true,
339 .support_ct_kill_exit = true,
337}; 340};
338 341
339/* 342/*
@@ -366,6 +369,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
366 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 369 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
367 .supports_idle = true, 370 .supports_idle = true,
368 .adv_thermal_throttle = true, 371 .adv_thermal_throttle = true,
372 .support_ct_kill_exit = true,
369}; 373};
370 374
371struct iwl_cfg iwl6000i_2abg_cfg = { 375struct iwl_cfg iwl6000i_2abg_cfg = {
@@ -394,6 +398,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
394 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 398 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
395 .supports_idle = true, 399 .supports_idle = true,
396 .adv_thermal_throttle = true, 400 .adv_thermal_throttle = true,
401 .support_ct_kill_exit = true,
397}; 402};
398 403
399struct iwl_cfg iwl6000i_2bg_cfg = { 404struct iwl_cfg iwl6000i_2bg_cfg = {
@@ -422,6 +427,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
422 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 427 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
423 .supports_idle = true, 428 .supports_idle = true,
424 .adv_thermal_throttle = true, 429 .adv_thermal_throttle = true,
430 .support_ct_kill_exit = true,
425}; 431};
426 432
427struct iwl_cfg iwl6050_2agn_cfg = { 433struct iwl_cfg iwl6050_2agn_cfg = {
@@ -451,6 +457,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
451 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 457 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
452 .supports_idle = true, 458 .supports_idle = true,
453 .adv_thermal_throttle = true, 459 .adv_thermal_throttle = true,
460 .support_ct_kill_exit = true,
454}; 461};
455 462
456struct iwl_cfg iwl6050_2abg_cfg = { 463struct iwl_cfg iwl6050_2abg_cfg = {
@@ -479,6 +486,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
479 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 486 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
480 .supports_idle = true, 487 .supports_idle = true,
481 .adv_thermal_throttle = true, 488 .adv_thermal_throttle = true,
489 .support_ct_kill_exit = true,
482}; 490};
483 491
484struct iwl_cfg iwl6000_3agn_cfg = { 492struct iwl_cfg iwl6000_3agn_cfg = {
@@ -508,6 +516,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
508 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 516 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
509 .supports_idle = true, 517 .supports_idle = true,
510 .adv_thermal_throttle = true, 518 .adv_thermal_throttle = true,
519 .support_ct_kill_exit = true,
511}; 520};
512 521
513struct iwl_cfg iwl6050_3agn_cfg = { 522struct iwl_cfg iwl6050_3agn_cfg = {
@@ -537,6 +546,7 @@ struct iwl_cfg iwl6050_3agn_cfg = {
537 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 546 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
538 .supports_idle = true, 547 .supports_idle = true,
539 .adv_thermal_throttle = true, 548 .adv_thermal_throttle = true,
549 .support_ct_kill_exit = true,
540}; 550};
541 551
542MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); 552MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 77b9825f79ba..e43469cfbbc0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2165,10 +2165,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
2165 spin_unlock_irqrestore(&priv->lock, flags); 2165 spin_unlock_irqrestore(&priv->lock, flags);
2166 priv->thermal_throttle.ct_kill_toggle = false; 2166 priv->thermal_throttle.ct_kill_toggle = false;
2167 2167
2168 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { 2168 if (priv->cfg->support_ct_kill_exit) {
2169 case CSR_HW_REV_TYPE_1000:
2170 case CSR_HW_REV_TYPE_6x00:
2171 case CSR_HW_REV_TYPE_6x50:
2172 adv_cmd.critical_temperature_enter = 2169 adv_cmd.critical_temperature_enter =
2173 cpu_to_le32(priv->hw_params.ct_kill_threshold); 2170 cpu_to_le32(priv->hw_params.ct_kill_threshold);
2174 adv_cmd.critical_temperature_exit = 2171 adv_cmd.critical_temperature_exit =
@@ -2185,8 +2182,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
2185 "exit is %d\n", 2182 "exit is %d\n",
2186 priv->hw_params.ct_kill_threshold, 2183 priv->hw_params.ct_kill_threshold,
2187 priv->hw_params.ct_kill_exit_threshold); 2184 priv->hw_params.ct_kill_exit_threshold);
2188 break; 2185 } else {
2189 default:
2190 cmd.critical_temperature_R = 2186 cmd.critical_temperature_R =
2191 cpu_to_le32(priv->hw_params.ct_kill_threshold); 2187 cpu_to_le32(priv->hw_params.ct_kill_threshold);
2192 2188
@@ -2199,7 +2195,6 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
2199 "succeeded, " 2195 "succeeded, "
2200 "critical temperature is %d\n", 2196 "critical temperature is %d\n",
2201 priv->hw_params.ct_kill_threshold); 2197 priv->hw_params.ct_kill_threshold);
2202 break;
2203 } 2198 }
2204} 2199}
2205EXPORT_SYMBOL(iwl_rf_kill_ct_config); 2200EXPORT_SYMBOL(iwl_rf_kill_ct_config);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 9dbf59811f45..02bacc4975f0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -226,6 +226,7 @@ struct iwl_mod_params {
226 * @use_rts_for_ht: use rts/cts protection for HT traffic 226 * @use_rts_for_ht: use rts/cts protection for HT traffic
227 * @chain_noise_num_beacons: number of beacons used to compute chain noise 227 * @chain_noise_num_beacons: number of beacons used to compute chain noise
228 * @adv_thermal_throttle: support advance thermal throttle 228 * @adv_thermal_throttle: support advance thermal throttle
229 * @support_ct_kill_exit: support ct kill exit condition
229 * 230 *
230 * We enable the driver to be backward compatible wrt API version. The 231 * We enable the driver to be backward compatible wrt API version. The
231 * driver specifies which APIs it supports (with @ucode_api_max being the 232 * driver specifies which APIs it supports (with @ucode_api_max being the
@@ -280,6 +281,7 @@ struct iwl_cfg {
280 int chain_noise_num_beacons; 281 int chain_noise_num_beacons;
281 const bool supports_idle; 282 const bool supports_idle;
282 bool adv_thermal_throttle; 283 bool adv_thermal_throttle;
284 bool support_ct_kill_exit;
283}; 285};
284 286
285/*************************** 287/***************************