1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * Intel Linux Wireless <ilw@linux.intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *****************************************************************************/
27 #include <linux/module.h>
28 #include <linux/stringify.h>
29 #include "iwl-config.h"
31 #include "iwl-dev.h" /* still needed */
33 /* Highest firmware API version supported */
34 #define IWL5000_UCODE_API_MAX 5
35 #define IWL5150_UCODE_API_MAX 2
37 /* Lowest firmware API version supported */
38 #define IWL5000_UCODE_API_MIN 1
39 #define IWL5150_UCODE_API_MIN 1
42 #define EEPROM_5000_TX_POWER_VERSION (4)
43 #define EEPROM_5000_EEPROM_VERSION (0x11A)
44 #define EEPROM_5050_TX_POWER_VERSION (4)
45 #define EEPROM_5050_EEPROM_VERSION (0x21E)
47 #define IWL5000_FW_PRE "iwlwifi-5000-"
48 #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
50 #define IWL5150_FW_PRE "iwlwifi-5150-"
51 #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
53 static const struct iwl_base_params iwl5000_base_params
= {
54 .eeprom_size
= IWLAGN_EEPROM_IMG_SIZE
,
55 .num_of_queues
= IWLAGN_NUM_QUEUES
,
56 .pll_cfg_val
= CSR50_ANA_PLL_CFG_VAL
,
57 .led_compensation
= 51,
58 .plcp_delta_threshold
= IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF
,
59 .chain_noise_scale
= 1000,
60 .wd_timeout
= IWL_WATCHHDOG_DISABLED
,
61 .max_event_log_size
= 512,
62 .no_idle_support
= true,
65 static const struct iwl_ht_params iwl5000_ht_params
= {
66 .ht_greenfield_support
= true,
69 #define IWL_DEVICE_5000 \
70 .fw_name_pre = IWL5000_FW_PRE, \
71 .ucode_api_max = IWL5000_UCODE_API_MAX, \
72 .ucode_api_min = IWL5000_UCODE_API_MIN, \
73 .device_family = IWL_DEVICE_FAMILY_5000, \
74 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
75 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
76 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
77 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
78 .base_params = &iwl5000_base_params, \
79 .led_mode = IWL_LED_BLINK
81 const struct iwl_cfg iwl5300_agn_cfg
= {
82 .name
= "Intel(R) Ultimate N WiFi Link 5300 AGN",
84 /* at least EEPROM 0x11A has wrong info */
85 .valid_tx_ant
= ANT_ABC
, /* .cfg overwrite */
86 .valid_rx_ant
= ANT_ABC
, /* .cfg overwrite */
87 .ht_params
= &iwl5000_ht_params
,
90 const struct iwl_cfg iwl5100_bgn_cfg
= {
91 .name
= "Intel(R) WiFi Link 5100 BGN",
93 .valid_tx_ant
= ANT_B
, /* .cfg overwrite */
94 .valid_rx_ant
= ANT_AB
, /* .cfg overwrite */
95 .ht_params
= &iwl5000_ht_params
,
98 const struct iwl_cfg iwl5100_abg_cfg
= {
99 .name
= "Intel(R) WiFi Link 5100 ABG",
101 .valid_tx_ant
= ANT_B
, /* .cfg overwrite */
102 .valid_rx_ant
= ANT_AB
, /* .cfg overwrite */
105 const struct iwl_cfg iwl5100_agn_cfg
= {
106 .name
= "Intel(R) WiFi Link 5100 AGN",
108 .valid_tx_ant
= ANT_B
, /* .cfg overwrite */
109 .valid_rx_ant
= ANT_AB
, /* .cfg overwrite */
110 .ht_params
= &iwl5000_ht_params
,
113 const struct iwl_cfg iwl5350_agn_cfg
= {
114 .name
= "Intel(R) WiMAX/WiFi Link 5350 AGN",
115 .fw_name_pre
= IWL5000_FW_PRE
,
116 .ucode_api_max
= IWL5000_UCODE_API_MAX
,
117 .ucode_api_min
= IWL5000_UCODE_API_MIN
,
118 .device_family
= IWL_DEVICE_FAMILY_5000
,
119 .max_inst_size
= IWLAGN_RTC_INST_SIZE
,
120 .max_data_size
= IWLAGN_RTC_DATA_SIZE
,
121 .eeprom_ver
= EEPROM_5050_EEPROM_VERSION
,
122 .eeprom_calib_ver
= EEPROM_5050_TX_POWER_VERSION
,
123 .base_params
= &iwl5000_base_params
,
124 .ht_params
= &iwl5000_ht_params
,
125 .led_mode
= IWL_LED_BLINK
,
126 .internal_wimax_coex
= true,
129 #define IWL_DEVICE_5150 \
130 .fw_name_pre = IWL5150_FW_PRE, \
131 .ucode_api_max = IWL5150_UCODE_API_MAX, \
132 .ucode_api_min = IWL5150_UCODE_API_MIN, \
133 .device_family = IWL_DEVICE_FAMILY_5150, \
134 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
135 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
136 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
137 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
138 .base_params = &iwl5000_base_params, \
139 .no_xtal_calib = true, \
140 .led_mode = IWL_LED_BLINK, \
141 .internal_wimax_coex = true
143 const struct iwl_cfg iwl5150_agn_cfg
= {
144 .name
= "Intel(R) WiMAX/WiFi Link 5150 AGN",
146 .ht_params
= &iwl5000_ht_params
,
150 const struct iwl_cfg iwl5150_abg_cfg
= {
151 .name
= "Intel(R) WiMAX/WiFi Link 5150 ABG",
155 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX
));
156 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX
));