aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-11 21:47:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:09 -0400
commit47f4a5871614756627d7209e0569b58faf99b0d9 (patch)
tree5800fc8d160fb9d67ed7ea4aa3f562ef458b221a /drivers/net/wireless
parentf53696de6722a4aac00b76e25a5321c01e88a55f (diff)
iwlwifi: move iwl4965_rf_kill_ct_config to iwl-core.c
This patch moves iwl4965_rf_kill_ct_config to iwl-core.c. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@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-4965.c24
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c23
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c2
5 files changed, 26 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 87648d0536b3..aeb29b9bf3c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -556,30 +556,6 @@ out:
556 556
557#define REG_RECALIB_PERIOD (60) 557#define REG_RECALIB_PERIOD (60)
558 558
559void iwl4965_rf_kill_ct_config(struct iwl_priv *priv)
560{
561 struct iwl4965_ct_kill_config cmd;
562 unsigned long flags;
563 int ret = 0;
564
565 spin_lock_irqsave(&priv->lock, flags);
566 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR,
567 CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
568 spin_unlock_irqrestore(&priv->lock, flags);
569
570 cmd.critical_temperature_R =
571 cpu_to_le32(priv->hw_params.ct_kill_threshold);
572
573 ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD,
574 sizeof(cmd), &cmd);
575 if (ret)
576 IWL_ERROR("REPLY_CT_KILL_CONFIG_CMD failed\n");
577 else
578 IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded, "
579 "critical temperature is %d\n",
580 cmd.critical_temperature_R);
581}
582
583/* Reset differential Rx gains in NIC to prepare for chain noise calibration. 559/* Reset differential Rx gains in NIC to prepare for chain noise calibration.
584 * Called after every association, but this runs only once! 560 * Called after every association, but this runs only once!
585 * ... once chain noise is calibrated the first time, it's good forever. */ 561 * ... once chain noise is calibrated the first time, it's good forever. */
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 6613d323262a..920dfc1b2db2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -2078,7 +2078,7 @@ struct iwl4965_card_state_notif {
2078#define RF_CARD_DISABLED 0x04 2078#define RF_CARD_DISABLED 0x04
2079#define RXON_CARD_DISABLED 0x10 2079#define RXON_CARD_DISABLED 0x10
2080 2080
2081struct iwl4965_ct_kill_config { 2081struct iwl_ct_kill_config {
2082 __le32 reserved; 2082 __le32 reserved;
2083 __le32 critical_temperature_M; 2083 __le32 critical_temperature_M;
2084 __le32 critical_temperature_R; 2084 __le32 critical_temperature_R;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 9794904b5bd9..809646358421 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1326,4 +1326,27 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv)
1326} 1326}
1327EXPORT_SYMBOL(iwl_dump_nic_event_log); 1327EXPORT_SYMBOL(iwl_dump_nic_event_log);
1328 1328
1329void iwl_rf_kill_ct_config(struct iwl_priv *priv)
1330{
1331 struct iwl_ct_kill_config cmd;
1332 unsigned long flags;
1333 int ret = 0;
1334
1335 spin_lock_irqsave(&priv->lock, flags);
1336 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR,
1337 CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
1338 spin_unlock_irqrestore(&priv->lock, flags);
1339
1340 cmd.critical_temperature_R =
1341 cpu_to_le32(priv->hw_params.ct_kill_threshold);
1329 1342
1343 ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD,
1344 sizeof(cmd), &cmd);
1345 if (ret)
1346 IWL_ERROR("REPLY_CT_KILL_CONFIG_CMD failed\n");
1347 else
1348 IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded, "
1349 "critical temperature is %d\n",
1350 cmd.critical_temperature_R);
1351}
1352EXPORT_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 8d9fde61a365..59dd34232fc3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -371,6 +371,7 @@ int iwlcore_low_level_notify(struct iwl_priv *priv,
371 enum iwlcore_card_notify notify); 371 enum iwlcore_card_notify notify);
372extern int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags); 372extern int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags);
373extern int iwl_verify_ucode(struct iwl_priv *priv); 373extern int iwl_verify_ucode(struct iwl_priv *priv);
374extern void iwl_rf_kill_ct_config(struct iwl_priv *priv);
374int iwl_send_lq_cmd(struct iwl_priv *priv, 375int iwl_send_lq_cmd(struct iwl_priv *priv,
375 struct iwl_link_quality_cmd *lq, u8 flags); 376 struct iwl_link_quality_cmd *lq, u8 flags);
376 377
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 2073ba686f35..3717f9924358 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -2295,7 +2295,7 @@ static void iwl_alive_start(struct iwl_priv *priv)
2295 iwl4965_commit_rxon(priv); 2295 iwl4965_commit_rxon(priv);
2296 2296
2297 /* At this point, the NIC is initialized and operational */ 2297 /* At this point, the NIC is initialized and operational */
2298 iwl4965_rf_kill_ct_config(priv); 2298 iwl_rf_kill_ct_config(priv);
2299 2299
2300 iwl_leds_register(priv); 2300 iwl_leds_register(priv);
2301 2301