iwlagn: temperature should be measure for all _agn devices
[pandora-kernel.git] / drivers / net / wireless / iwlwifi / iwl-2000.c
index f602af4..c8bb4a4 100644 (file)
@@ -46,7 +46,6 @@
 #include "iwl-helpers.h"
 #include "iwl-agn-hw.h"
 #include "iwl-6000-hw.h"
-#include "iwl-agn-led.h"
 #include "iwl-agn-debugfs.h"
 
 /* Highest firmware API version supported */
 #define IWL200_UCODE_API_MIN 5
 
 #define IWL2030_FW_PRE "iwlwifi-2030-"
-#define _IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE #api ".ucode"
-#define IWL2030_MODULE_FIRMWARE(api) _IWL2030_MODULE_FIRMWARE(api)
+#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE #api ".ucode"
 
 #define IWL2000_FW_PRE "iwlwifi-2000-"
-#define _IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE #api ".ucode"
-#define IWL2000_MODULE_FIRMWARE(api) _IWL2000_MODULE_FIRMWARE(api)
+#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE #api ".ucode"
 
 #define IWL200_FW_PRE "iwlwifi-200-"
-#define _IWL200_MODULE_FIRMWARE(api) IWL200_FW_PRE #api ".ucode"
-#define IWL200_MODULE_FIRMWARE(api) _IWL200_MODULE_FIRMWARE(api)
+#define IWL200_MODULE_FIRMWARE(api) IWL200_FW_PRE #api ".ucode"
 
 static void iwl2000_set_ct_threshold(struct iwl_priv *priv)
 {
@@ -101,6 +97,8 @@ static void iwl2000_nic_config(struct iwl_priv *priv)
                iwl_set_bit(priv, CSR_GP_DRIVER_REG,
                            CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER);
 
+       if (priv->cfg->disable_otp_refresh)
+               iwl_write_prph(priv, APMG_ANALOG_SVR_REG, 0x80000010);
 }
 
 static struct iwl_sensitivity_ranges iwl2000_sensitivity = {
@@ -265,10 +263,6 @@ static struct iwl_lib_ops iwl2000_lib = {
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
-       .dump_nic_event_log = iwl_dump_nic_event_log,
-       .dump_nic_error_log = iwl_dump_nic_error_log,
-       .dump_csr = iwl_dump_csr,
-       .dump_fh = iwl_dump_fh,
        .send_tx_power = iwlagn_send_tx_power,
        .update_chain_flags = iwl_update_chain_flags,
        .set_channel_switch = iwl2030_hw_channel_switch,
@@ -304,18 +298,12 @@ static struct iwl_lib_ops iwl2000_lib = {
        },
        .txfifo_flush = iwlagn_txfifo_flush,
        .dev_txfifo_flush = iwlagn_dev_txfifo_flush,
-       .tt_ops = {
-               .lower_power_detection = iwl_tt_is_low_power_state,
-               .tt_power_mode = iwl_tt_current_power_mode,
-               .ct_kill_check = iwl_check_for_ct_kill,
-       }
 };
 
 static const struct iwl_ops iwl2000_ops = {
        .lib = &iwl2000_lib,
        .hcmd = &iwlagn_hcmd,
        .utils = &iwlagn_hcmd_utils,
-       .led = &iwlagn_led_ops,
        .ieee80211_ops = &iwlagn_hw_ops,
 };
 
@@ -323,7 +311,6 @@ static const struct iwl_ops iwl2030_ops = {
        .lib = &iwl2000_lib,
        .hcmd = &iwlagn_bt_hcmd,
        .utils = &iwlagn_hcmd_utils,
-       .led = &iwlagn_led_ops,
        .ieee80211_ops = &iwlagn_hw_ops,
 };
 
@@ -331,7 +318,6 @@ static const struct iwl_ops iwl200_ops = {
        .lib = &iwl2000_lib,
        .hcmd = &iwlagn_hcmd,
        .utils = &iwlagn_hcmd_utils,
-       .led = &iwlagn_led_ops,
        .ieee80211_ops = &iwlagn_hw_ops,
 };
 
@@ -339,7 +325,6 @@ static const struct iwl_ops iwl230_ops = {
        .lib = &iwl2000_lib,
        .hcmd = &iwlagn_bt_hcmd,
        .utils = &iwlagn_hcmd_utils,
-       .led = &iwlagn_led_ops,
        .ieee80211_ops = &iwlagn_hw_ops,
 };
 
@@ -348,7 +333,6 @@ static struct iwl_base_params iwl2000_base_params = {
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
        .pll_cfg_val = 0,
-       .set_l0s = true,
        .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
        .shadow_ram_support = true,
        .led_compensation = 51,
@@ -359,9 +343,6 @@ static struct iwl_base_params iwl2000_base_params = {
        .chain_noise_scale = 1000,
        .wd_timeout = IWL_DEF_WD_TIMEOUT,
        .max_event_log_size = 512,
-       .ucode_tracing = true,
-       .sensitivity_calib_by_driver = true,
-       .chain_noise_calib_by_driver = true,
        .shadow_reg_enable = true,
 };
 
@@ -371,7 +352,6 @@ static struct iwl_base_params iwl2030_base_params = {
        .num_of_queues = IWLAGN_NUM_QUEUES,
        .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
        .pll_cfg_val = 0,
-       .set_l0s = true,
        .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
        .shadow_ram_support = true,
        .led_compensation = 57,
@@ -382,9 +362,6 @@ static struct iwl_base_params iwl2030_base_params = {
        .chain_noise_scale = 1000,
        .wd_timeout = IWL_LONG_WD_TIMEOUT,
        .max_event_log_size = 512,
-       .ucode_tracing = true,
-       .sensitivity_calib_by_driver = true,
-       .chain_noise_calib_by_driver = true,
        .shadow_reg_enable = true,
 };
 
@@ -394,7 +371,6 @@ static struct iwl_ht_params iwl2000_ht_params = {
 };
 
 static struct iwl_bt_params iwl2030_bt_params = {
-       .bt_statistics = true,
        /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
        .advanced_bt_coexist = true,
        .agg_time_limit = BT_AGG_THRESHOLD_DEF,
@@ -416,7 +392,8 @@ static struct iwl_bt_params iwl2030_bt_params = {
        .need_dc_calib = true,                                  \
        .need_temp_offset_calib = true,                         \
        .led_mode = IWL_LED_RF_STATE,                           \
-       .iq_invert = true                                       \
+       .iq_invert = true,                                      \
+       .disable_otp_refresh = true                             \
 
 struct iwl_cfg iwl2000_2bgn_cfg = {
        .name = "2000 Series 2x2 BGN",