aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-11 21:46:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:05 -0400
commit203566f359b5702be72238a8b1d37655c986cc7c (patch)
tree8686ac5b77f31b4765e60210b731f1b52c888c33 /drivers
parent4e39317df0f9e48919130574238319f9a445e6e3 (diff)
iwlwifi: add possibility to disable tx_power calibration
This patch adds the possibility to disable the tx_power calibration. In 5000 HW, this calibration is implemented in uCode, hence, it is disabled in driver by default. 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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h1
5 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index be6b6ebc6bf8..6d249bbd7950 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2103,8 +2103,9 @@ void iwl4965_hw_rx_statistics(struct iwl_priv *priv,
2103 priv->temperature = temp; 2103 priv->temperature = temp;
2104 set_bit(STATUS_TEMPERATURE, &priv->status); 2104 set_bit(STATUS_TEMPERATURE, &priv->status);
2105 2105
2106 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) && 2106 if (!priv->disable_tx_power_cal &&
2107 iwl4965_is_temp_calib_needed(priv)) 2107 unlikely(!test_bit(STATUS_SCANNING, &priv->status)) &&
2108 iwl4965_is_temp_calib_needed(priv))
2108 queue_work(priv->workqueue, &priv->txpower_work); 2109 queue_work(priv->workqueue, &priv->txpower_work);
2109} 2110}
2110 2111
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index fc8ad7326edd..31ea363c62c7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1229,6 +1229,12 @@ static u16 iwl5000_get_hcmd_size(u8 cmd_id, u16 len)
1229 return len; 1229 return len;
1230} 1230}
1231 1231
1232static void iwl5000_setup_deferred_work(struct iwl_priv *priv)
1233{
1234 /* in 5000 the tx power calibration is done in uCode */
1235 priv->disable_tx_power_cal = 1;
1236}
1237
1232static void iwl5000_rx_handler_setup(struct iwl_priv *priv) 1238static void iwl5000_rx_handler_setup(struct iwl_priv *priv)
1233{ 1239{
1234 /* init calibration handlers */ 1240 /* init calibration handlers */
@@ -1313,6 +1319,7 @@ static struct iwl_lib_ops iwl5000_lib = {
1313 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, 1319 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl,
1314 .txq_set_sched = iwl5000_txq_set_sched, 1320 .txq_set_sched = iwl5000_txq_set_sched,
1315 .rx_handler_setup = iwl5000_rx_handler_setup, 1321 .rx_handler_setup = iwl5000_rx_handler_setup,
1322 .setup_deferred_work = iwl5000_setup_deferred_work,
1316 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, 1323 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr,
1317 .load_ucode = iwl5000_load_ucode, 1324 .load_ucode = iwl5000_load_ucode,
1318 .init_alive_start = iwl5000_init_alive_start, 1325 .init_alive_start = iwl5000_init_alive_start,
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index 48563a07795a..58384805a494 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -57,6 +57,7 @@ struct iwl_debugfs {
57 struct dir_rf_files { 57 struct dir_rf_files {
58 struct dentry *file_disable_sensitivity; 58 struct dentry *file_disable_sensitivity;
59 struct dentry *file_disable_chain_noise; 59 struct dentry *file_disable_chain_noise;
60 struct dentry *file_disable_tx_power;
60 } dbgfs_rf_files; 61 } dbgfs_rf_files;
61 u32 sram_offset; 62 u32 sram_offset;
62 u32 sram_len; 63 u32 sram_len;
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index da6dcb20b5e8..ed948dc59b3d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -388,6 +388,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
388 DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); 388 DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal);
389 DEBUGFS_ADD_BOOL(disable_chain_noise, rf, 389 DEBUGFS_ADD_BOOL(disable_chain_noise, rf,
390 &priv->disable_chain_noise_cal); 390 &priv->disable_chain_noise_cal);
391 DEBUGFS_ADD_BOOL(disable_tx_power, rf, &priv->disable_tx_power_cal);
391 return 0; 392 return 0;
392 393
393err: 394err:
@@ -415,6 +416,7 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv)
415 DEBUGFS_REMOVE(priv->dbgfs->dir_data); 416 DEBUGFS_REMOVE(priv->dbgfs->dir_data);
416 DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_sensitivity); 417 DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_sensitivity);
417 DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_chain_noise); 418 DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_chain_noise);
419 DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_tx_power);
418 DEBUGFS_REMOVE(priv->dbgfs->dir_rf); 420 DEBUGFS_REMOVE(priv->dbgfs->dir_rf);
419 DEBUGFS_REMOVE(priv->dbgfs->dir_drv); 421 DEBUGFS_REMOVE(priv->dbgfs->dir_drv);
420 kfree(priv->dbgfs); 422 kfree(priv->dbgfs);
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 9e5a7cddf146..bf4b8831c0a7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1204,6 +1204,7 @@ struct iwl_priv {
1204 struct work_struct txpower_work; 1204 struct work_struct txpower_work;
1205 u32 disable_sens_cal; 1205 u32 disable_sens_cal;
1206 u32 disable_chain_noise_cal; 1206 u32 disable_chain_noise_cal;
1207 u32 disable_tx_power_cal;
1207 struct work_struct run_time_calib_work; 1208 struct work_struct run_time_calib_work;
1208 struct timer_list statistics_periodic; 1209 struct timer_list statistics_periodic;
1209}; /*iwl_priv */ 1210}; /*iwl_priv */