iwlagn: write iq invert register for 105/135 device
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-2000.c
index 64ed1f247df03fff3b4ec7517d952ffe94bdcd1c..00480e4b377b5a8964b0addf50b206ea30672cde 100644 (file)
 #define IWL2030_UCODE_API_MAX 5
 #define IWL2000_UCODE_API_MAX 5
 #define IWL105_UCODE_API_MAX 5
+#define IWL135_UCODE_API_MAX 5
 
 /* Lowest firmware API version supported */
 #define IWL2030_UCODE_API_MIN 5
 #define IWL2000_UCODE_API_MIN 5
 #define IWL105_UCODE_API_MIN 5
+#define IWL135_UCODE_API_MIN 5
 
 #define IWL2030_FW_PRE "iwlwifi-2030-"
 #define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode"
@@ -65,6 +67,9 @@
 #define IWL105_FW_PRE "iwlwifi-105-"
 #define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode"
 
+#define IWL135_FW_PRE "iwlwifi-135-"
+#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE #api ".ucode"
+
 static void iwl2000_set_ct_threshold(struct iwl_priv *priv)
 {
        /* want Celsius */
@@ -118,7 +123,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
                        iwlagn_mod_params.num_of_queues;
 
        priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
-       priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
        priv->hw_params.scd_bc_tbls_size =
                priv->cfg->base_params->num_of_queues *
                sizeof(struct iwlagn_scd_bc_tbl);
@@ -131,7 +135,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
 
        priv->hw_params.ht40_channel =  BIT(IEEE80211_BAND_2GHZ) |
                                        BIT(IEEE80211_BAND_5GHZ);
-       priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
 
        priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
        if (priv->cfg->rx_with_siso_diversity)
@@ -153,7 +156,7 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
                BIT(IWL_CALIB_TX_IQ)            |
                BIT(IWL_CALIB_BASE_BAND);
        if (priv->cfg->need_dc_calib)
-               priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX);
+               priv->hw_params.calib_rt_cfg |= IWL_CALIB_CFG_DC_IDX;
        if (priv->cfg->need_temp_offset_calib)
                priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
 
@@ -164,15 +167,7 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
 
 static struct iwl_lib_ops iwl2000_lib = {
        .set_hw_params = iwl2000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_rx_handler_setup,
-       .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,
-       .update_chain_flags = iwl_update_chain_flags,
-       .apm_ops = {
-               .init = iwl_apm_init,
-               .config = iwl2000_nic_config,
-       },
+       .nic_config = iwl2000_nic_config,
        .eeprom_ops = {
                .regulatory_bands = {
                        EEPROM_REG_BAND_1_CHANNELS,
@@ -183,36 +178,30 @@ static struct iwl_lib_ops iwl2000_lib = {
                        EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
                        EEPROM_REGULATORY_BAND_NO_HT40,
                },
-               .query_addr = iwlagn_eeprom_query_addr,
                .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
        },
-       .temp_ops = {
-               .temperature = iwlagn_temperature,
-       },
-};
-
-static const struct iwl_ops iwl2000_ops = {
-       .lib = &iwl2000_lib,
-       .hcmd = &iwlagn_hcmd,
-       .utils = &iwlagn_hcmd_utils,
-};
-
-static const struct iwl_ops iwl2030_ops = {
-       .lib = &iwl2000_lib,
-       .hcmd = &iwlagn_bt_hcmd,
-       .utils = &iwlagn_hcmd_utils,
+       .temperature = iwlagn_temperature,
 };
 
-static const struct iwl_ops iwl105_ops = {
-       .lib = &iwl2000_lib,
-       .hcmd = &iwlagn_hcmd,
-       .utils = &iwlagn_hcmd_utils,
-};
-
-static const struct iwl_ops iwl135_ops = {
-       .lib = &iwl2000_lib,
-       .hcmd = &iwlagn_bt_hcmd,
-       .utils = &iwlagn_hcmd_utils,
+static struct iwl_lib_ops iwl2030_lib = {
+       .set_hw_params = iwl2000_hw_set_hw_params,
+       .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup,
+       .bt_setup_deferred_work = iwlagn_bt_setup_deferred_work,
+       .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
+       .nic_config = iwl2000_nic_config,
+       .eeprom_ops = {
+               .regulatory_bands = {
+                       EEPROM_REG_BAND_1_CHANNELS,
+                       EEPROM_REG_BAND_2_CHANNELS,
+                       EEPROM_REG_BAND_3_CHANNELS,
+                       EEPROM_REG_BAND_4_CHANNELS,
+                       EEPROM_REG_BAND_5_CHANNELS,
+                       EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
+                       EEPROM_REGULATORY_BAND_NO_HT40,
+               },
+               .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
+       },
+       .temperature = iwlagn_temperature,
 };
 
 static struct iwl_base_params iwl2000_base_params = {
@@ -273,7 +262,7 @@ static struct iwl_bt_params iwl2030_bt_params = {
        .ucode_api_min = IWL2000_UCODE_API_MIN,                 \
        .eeprom_ver = EEPROM_2000_EEPROM_VERSION,               \
        .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,       \
-       .ops = &iwl2000_ops,                                    \
+       .lib = &iwl2000_lib,                                    \
        .base_params = &iwl2000_base_params,                    \
        .need_dc_calib = true,                                  \
        .need_temp_offset_calib = true,                         \
@@ -298,7 +287,7 @@ struct iwl_cfg iwl2000_2bg_cfg = {
        .ucode_api_min = IWL2030_UCODE_API_MIN,                 \
        .eeprom_ver = EEPROM_2000_EEPROM_VERSION,               \
        .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,       \
-       .ops = &iwl2030_ops,                                    \
+       .lib = &iwl2030_lib,                                    \
        .base_params = &iwl2030_base_params,                    \
        .bt_params = &iwl2030_bt_params,                        \
        .need_dc_calib = true,                                  \
@@ -324,13 +313,14 @@ struct iwl_cfg iwl2030_2bg_cfg = {
        .ucode_api_min = IWL105_UCODE_API_MIN,                  \
        .eeprom_ver = EEPROM_2000_EEPROM_VERSION,               \
        .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,       \
-       .ops = &iwl105_ops,                                     \
+       .lib = &iwl2000_lib,                                    \
        .base_params = &iwl2000_base_params,                    \
        .need_dc_calib = true,                                  \
        .need_temp_offset_calib = true,                         \
        .led_mode = IWL_LED_RF_STATE,                           \
        .adv_pm = true,                                         \
-       .rx_with_siso_diversity = true                          \
+       .rx_with_siso_diversity = true,                         \
+       .iq_invert = true                                       \
 
 struct iwl_cfg iwl105_bg_cfg = {
        .name = "105 Series 1x1 BG",
@@ -344,27 +334,28 @@ struct iwl_cfg iwl105_bgn_cfg = {
 };
 
 #define IWL_DEVICE_135                                         \
-       .fw_name_pre = IWL105_FW_PRE,                           \
-       .ucode_api_max = IWL105_UCODE_API_MAX,                  \
-       .ucode_api_min = IWL105_UCODE_API_MIN,                  \
+       .fw_name_pre = IWL135_FW_PRE,                           \
+       .ucode_api_max = IWL135_UCODE_API_MAX,                  \
+       .ucode_api_min = IWL135_UCODE_API_MIN,                  \
        .eeprom_ver = EEPROM_2000_EEPROM_VERSION,               \
        .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION,       \
-       .ops = &iwl135_ops,                                     \
+       .lib = &iwl2030_lib,                                    \
        .base_params = &iwl2030_base_params,                    \
        .bt_params = &iwl2030_bt_params,                        \
        .need_dc_calib = true,                                  \
        .need_temp_offset_calib = true,                         \
        .led_mode = IWL_LED_RF_STATE,                           \
        .adv_pm = true,                                         \
-       .rx_with_siso_diversity = true                          \
+       .rx_with_siso_diversity = true,                         \
+       .iq_invert = true                                       \
 
 struct iwl_cfg iwl135_bg_cfg = {
-       .name = "105 Series 1x1 BG/BT",
+       .name = "135 Series 1x1 BG/BT",
        IWL_DEVICE_135,
 };
 
 struct iwl_cfg iwl135_bgn_cfg = {
-       .name = "105 Series 1x1 BGN/BT",
+       .name = "135 Series 1x1 BGN/BT",
        IWL_DEVICE_135,
        .ht_params = &iwl2000_ht_params,
 };
@@ -372,3 +363,4 @@ struct iwl_cfg iwl135_bgn_cfg = {
 MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
 MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));
+MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX));
This page took 0.040348 seconds and 5 git commands to generate.