Commit | Line | Data |
---|---|---|
5a6a256e TW |
1 | /****************************************************************************** |
2 | * | |
4e318262 | 3 | * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved. |
5a6a256e TW |
4 | * |
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. | |
8 | * | |
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 | |
12 | * more details. | |
13 | * | |
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 | |
17 | * | |
18 | * The full GNU General Public License is included in this distribution in the | |
19 | * file called LICENSE. | |
20 | * | |
21 | * Contact Information: | |
3d2b162e | 22 | * Intel Linux Wireless <ilw@linux.intel.com> |
5a6a256e TW |
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
24 | * | |
25 | *****************************************************************************/ | |
26 | ||
5a6a256e | 27 | #include <linux/module.h> |
8fcbd4dc | 28 | #include <linux/stringify.h> |
e9676695 | 29 | #include "iwl-config.h" |
0db19cde JB |
30 | #include "iwl-agn-hw.h" |
31 | #include "iwl-csr.h" | |
6468a01a | 32 | #include "cfg.h" |
5a6a256e | 33 | |
a0987a8d | 34 | /* Highest firmware API version supported */ |
41504cce | 35 | #define IWL5000_UCODE_API_MAX 5 |
39e6d225 | 36 | #define IWL5150_UCODE_API_MAX 2 |
5a6a256e | 37 | |
78cbcf2b MV |
38 | /* Oldest version we won't warn about */ |
39 | #define IWL5000_UCODE_API_OK 5 | |
40 | #define IWL5150_UCODE_API_OK 2 | |
41 | ||
a0987a8d RC |
42 | /* Lowest firmware API version supported */ |
43 | #define IWL5000_UCODE_API_MIN 1 | |
44 | #define IWL5150_UCODE_API_MIN 1 | |
45 | ||
586aed96 JB |
46 | /* EEPROM versions */ |
47 | #define EEPROM_5000_TX_POWER_VERSION (4) | |
48 | #define EEPROM_5000_EEPROM_VERSION (0x11A) | |
49 | #define EEPROM_5050_TX_POWER_VERSION (4) | |
50 | #define EEPROM_5050_EEPROM_VERSION (0x21E) | |
51 | ||
a0987a8d | 52 | #define IWL5000_FW_PRE "iwlwifi-5000-" |
8fcbd4dc | 53 | #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode" |
a0987a8d RC |
54 | |
55 | #define IWL5150_FW_PRE "iwlwifi-5150-" | |
8fcbd4dc | 56 | #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode" |
4e062f99 | 57 | |
6794f3ee | 58 | static const struct iwl_base_params iwl5000_base_params = { |
19e6cda0 | 59 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
19e6cda0 | 60 | .num_of_queues = IWLAGN_NUM_QUEUES, |
fadb3582 | 61 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
f2d0d0e2 | 62 | .led_compensation = 51, |
3e4fb5fa | 63 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
d4fe5ac9 | 64 | .chain_noise_scale = 1000, |
7c5ba4a8 | 65 | .wd_timeout = IWL_WATCHHDOG_DISABLED, |
678b385d | 66 | .max_event_log_size = 512, |
f3529108 | 67 | .no_idle_support = true, |
5a6a256e | 68 | }; |
6794f3ee JB |
69 | |
70 | static const struct iwl_ht_params iwl5000_ht_params = { | |
7cb1b088 | 71 | .ht_greenfield_support = true, |
7cb1b088 WYG |
72 | }; |
73 | ||
65af8dea WYG |
74 | #define IWL_DEVICE_5000 \ |
75 | .fw_name_pre = IWL5000_FW_PRE, \ | |
76 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ | |
78cbcf2b | 77 | .ucode_api_ok = IWL5000_UCODE_API_OK, \ |
65af8dea | 78 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ |
2d771cb6 | 79 | .device_family = IWL_DEVICE_FAMILY_5000, \ |
dae66d0d EG |
80 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
81 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | |
65af8dea WYG |
82 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ |
83 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ | |
65af8dea WYG |
84 | .base_params = &iwl5000_base_params, \ |
85 | .led_mode = IWL_LED_BLINK | |
86 | ||
706c4ff6 | 87 | const struct iwl_cfg iwl5300_agn_cfg = { |
7cb1b088 | 88 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", |
65af8dea | 89 | IWL_DEVICE_5000, |
2845fd85 JB |
90 | /* at least EEPROM 0x11A has wrong info */ |
91 | .valid_tx_ant = ANT_ABC, /* .cfg overwrite */ | |
92 | .valid_rx_ant = ANT_ABC, /* .cfg overwrite */ | |
7cb1b088 WYG |
93 | .ht_params = &iwl5000_ht_params, |
94 | }; | |
5a6a256e | 95 | |
706c4ff6 | 96 | const struct iwl_cfg iwl5100_bgn_cfg = { |
c11362c0 | 97 | .name = "Intel(R) WiFi Link 5100 BGN", |
65af8dea | 98 | IWL_DEVICE_5000, |
dbbf1755 WYG |
99 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
100 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | |
7cb1b088 | 101 | .ht_params = &iwl5000_ht_params, |
47408639 EK |
102 | }; |
103 | ||
706c4ff6 | 104 | const struct iwl_cfg iwl5100_abg_cfg = { |
c11362c0 | 105 | .name = "Intel(R) WiFi Link 5100 ABG", |
65af8dea | 106 | IWL_DEVICE_5000, |
dbbf1755 WYG |
107 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
108 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | |
47408639 EK |
109 | }; |
110 | ||
706c4ff6 | 111 | const struct iwl_cfg iwl5100_agn_cfg = { |
c11362c0 | 112 | .name = "Intel(R) WiFi Link 5100 AGN", |
65af8dea | 113 | IWL_DEVICE_5000, |
dbbf1755 WYG |
114 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
115 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | |
7cb1b088 | 116 | .ht_params = &iwl5000_ht_params, |
5a6a256e TW |
117 | }; |
118 | ||
706c4ff6 | 119 | const struct iwl_cfg iwl5350_agn_cfg = { |
c11362c0 | 120 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", |
a0987a8d RC |
121 | .fw_name_pre = IWL5000_FW_PRE, |
122 | .ucode_api_max = IWL5000_UCODE_API_MAX, | |
78cbcf2b | 123 | .ucode_api_ok = IWL5000_UCODE_API_OK, |
a0987a8d | 124 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
2d771cb6 | 125 | .device_family = IWL_DEVICE_FAMILY_5000, |
dae66d0d EG |
126 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
127 | .max_data_size = IWLAGN_RTC_DATA_SIZE, | |
0ef2ca67 TW |
128 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
129 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | |
7cb1b088 WYG |
130 | .base_params = &iwl5000_base_params, |
131 | .ht_params = &iwl5000_ht_params, | |
564b344c | 132 | .led_mode = IWL_LED_BLINK, |
50619ac9 | 133 | .internal_wimax_coex = true, |
5a6a256e TW |
134 | }; |
135 | ||
65af8dea WYG |
136 | #define IWL_DEVICE_5150 \ |
137 | .fw_name_pre = IWL5150_FW_PRE, \ | |
138 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ | |
78cbcf2b | 139 | .ucode_api_ok = IWL5150_UCODE_API_OK, \ |
65af8dea | 140 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ |
2d771cb6 | 141 | .device_family = IWL_DEVICE_FAMILY_5150, \ |
dae66d0d EG |
142 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
143 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | |
65af8dea WYG |
144 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ |
145 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ | |
65af8dea | 146 | .base_params = &iwl5000_base_params, \ |
c27bdc84 | 147 | .no_xtal_calib = true, \ |
65af8dea WYG |
148 | .led_mode = IWL_LED_BLINK, \ |
149 | .internal_wimax_coex = true | |
150 | ||
706c4ff6 | 151 | const struct iwl_cfg iwl5150_agn_cfg = { |
c11362c0 | 152 | .name = "Intel(R) WiMAX/WiFi Link 5150 AGN", |
65af8dea | 153 | IWL_DEVICE_5150, |
7cb1b088 | 154 | .ht_params = &iwl5000_ht_params, |
65af8dea | 155 | |
7100e924 TW |
156 | }; |
157 | ||
706c4ff6 | 158 | const struct iwl_cfg iwl5150_abg_cfg = { |
c11362c0 | 159 | .name = "Intel(R) WiMAX/WiFi Link 5150 ABG", |
65af8dea | 160 | IWL_DEVICE_5150, |
7100e924 TW |
161 | }; |
162 | ||
78cbcf2b MV |
163 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); |
164 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); |