Commit | Line | Data |
---|---|---|
c5a5e185 WYG |
1 | /****************************************************************************** |
2 | * | |
51368bf7 | 3 | * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved. |
c5a5e185 WYG |
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: | |
22 | * Intel Linux Wireless <ilw@linux.intel.com> | |
23 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | |
24 | * | |
25 | *****************************************************************************/ | |
26 | ||
c5a5e185 | 27 | #include <linux/module.h> |
8fcbd4dc | 28 | #include <linux/stringify.h> |
e9676695 | 29 | #include "iwl-config.h" |
0db19cde | 30 | #include "iwl-agn-hw.h" |
1023fdc4 | 31 | #include "dvm/commands.h" /* needed for BT for now */ |
c5a5e185 WYG |
32 | |
33 | /* Highest firmware API version supported */ | |
ca9a4605 JB |
34 | #define IWL2030_UCODE_API_MAX 6 |
35 | #define IWL2000_UCODE_API_MAX 6 | |
36 | #define IWL105_UCODE_API_MAX 6 | |
37 | #define IWL135_UCODE_API_MAX 6 | |
38 | ||
39 | /* Oldest version we won't warn about */ | |
78cbcf2b MV |
40 | #define IWL2030_UCODE_API_OK 6 |
41 | #define IWL2000_UCODE_API_OK 6 | |
42 | #define IWL105_UCODE_API_OK 6 | |
43 | #define IWL135_UCODE_API_OK 6 | |
c5a5e185 WYG |
44 | |
45 | /* Lowest firmware API version supported */ | |
46 | #define IWL2030_UCODE_API_MIN 5 | |
47 | #define IWL2000_UCODE_API_MIN 5 | |
b4ed221d | 48 | #define IWL105_UCODE_API_MIN 5 |
54e9c409 | 49 | #define IWL135_UCODE_API_MIN 5 |
c5a5e185 | 50 | |
586aed96 JB |
51 | /* EEPROM version */ |
52 | #define EEPROM_2000_TX_POWER_VERSION (6) | |
53 | #define EEPROM_2000_EEPROM_VERSION (0x805) | |
54 | ||
55 | ||
c5a5e185 | 56 | #define IWL2030_FW_PRE "iwlwifi-2030-" |
8fcbd4dc | 57 | #define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode" |
c5a5e185 WYG |
58 | |
59 | #define IWL2000_FW_PRE "iwlwifi-2000-" | |
8fcbd4dc | 60 | #define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode" |
c5a5e185 | 61 | |
b4ed221d | 62 | #define IWL105_FW_PRE "iwlwifi-105-" |
8fcbd4dc | 63 | #define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode" |
c5a5e185 | 64 | |
54e9c409 | 65 | #define IWL135_FW_PRE "iwlwifi-135-" |
5092e47a | 66 | #define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode" |
54e9c409 | 67 | |
6794f3ee | 68 | static const struct iwl_base_params iwl2000_base_params = { |
c5a5e185 WYG |
69 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
70 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
c5a5e185 | 71 | .pll_cfg_val = 0, |
c5a5e185 WYG |
72 | .max_ll_items = OTP_MAX_LL_ITEMS_2x00, |
73 | .shadow_ram_support = true, | |
74 | .led_compensation = 51, | |
c5a5e185 WYG |
75 | .wd_timeout = IWL_DEF_WD_TIMEOUT, |
76 | .max_event_log_size = 512, | |
66a77072 | 77 | .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ |
c5a5e185 WYG |
78 | }; |
79 | ||
80 | ||
6794f3ee | 81 | static const struct iwl_base_params iwl2030_base_params = { |
c5a5e185 WYG |
82 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
83 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
c5a5e185 | 84 | .pll_cfg_val = 0, |
c5a5e185 WYG |
85 | .max_ll_items = OTP_MAX_LL_ITEMS_2x00, |
86 | .shadow_ram_support = true, | |
87 | .led_compensation = 57, | |
c5a5e185 WYG |
88 | .wd_timeout = IWL_LONG_WD_TIMEOUT, |
89 | .max_event_log_size = 512, | |
66a77072 | 90 | .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ |
c5a5e185 WYG |
91 | }; |
92 | ||
6794f3ee | 93 | static const struct iwl_ht_params iwl2000_ht_params = { |
c5a5e185 WYG |
94 | .ht_greenfield_support = true, |
95 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | |
d370493f | 96 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ), |
c5a5e185 WYG |
97 | }; |
98 | ||
26a7ca9a JB |
99 | static const struct iwl_eeprom_params iwl20x0_eeprom_params = { |
100 | .regulatory_bands = { | |
101 | EEPROM_REG_BAND_1_CHANNELS, | |
102 | EEPROM_REG_BAND_2_CHANNELS, | |
103 | EEPROM_REG_BAND_3_CHANNELS, | |
104 | EEPROM_REG_BAND_4_CHANNELS, | |
105 | EEPROM_REG_BAND_5_CHANNELS, | |
106 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, | |
107 | EEPROM_REGULATORY_BAND_NO_HT40, | |
108 | }, | |
109 | .enhanced_txpower = true, | |
110 | }; | |
111 | ||
c5a5e185 WYG |
112 | #define IWL_DEVICE_2000 \ |
113 | .fw_name_pre = IWL2000_FW_PRE, \ | |
114 | .ucode_api_max = IWL2000_UCODE_API_MAX, \ | |
ca9a4605 | 115 | .ucode_api_ok = IWL2000_UCODE_API_OK, \ |
c5a5e185 | 116 | .ucode_api_min = IWL2000_UCODE_API_MIN, \ |
2d771cb6 | 117 | .device_family = IWL_DEVICE_FAMILY_2000, \ |
dae66d0d EG |
118 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
119 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
0d8877a1 JB |
120 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
121 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 122 | .base_params = &iwl2000_base_params, \ |
26a7ca9a | 123 | .eeprom_params = &iwl20x0_eeprom_params, \ |
cf61686a | 124 | .led_mode = IWL_LED_RF_STATE |
c5a5e185 | 125 | |
706c4ff6 | 126 | const struct iwl_cfg iwl2000_2bgn_cfg = { |
6195d135 | 127 | .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN", |
c5a5e185 WYG |
128 | IWL_DEVICE_2000, |
129 | .ht_params = &iwl2000_ht_params, | |
130 | }; | |
131 | ||
706c4ff6 | 132 | const struct iwl_cfg iwl2000_2bgn_d_cfg = { |
6195d135 | 133 | .name = "Intel(R) Centrino(R) Wireless-N 2200D BGN", |
1603dd49 | 134 | IWL_DEVICE_2000, |
ec8f734f | 135 | .ht_params = &iwl2000_ht_params, |
1603dd49 WYG |
136 | }; |
137 | ||
c5a5e185 WYG |
138 | #define IWL_DEVICE_2030 \ |
139 | .fw_name_pre = IWL2030_FW_PRE, \ | |
140 | .ucode_api_max = IWL2030_UCODE_API_MAX, \ | |
ca9a4605 | 141 | .ucode_api_ok = IWL2030_UCODE_API_OK, \ |
c5a5e185 | 142 | .ucode_api_min = IWL2030_UCODE_API_MIN, \ |
2d771cb6 | 143 | .device_family = IWL_DEVICE_FAMILY_2030, \ |
dae66d0d EG |
144 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
145 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
b7998c8b EL |
146 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
147 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 148 | .base_params = &iwl2030_base_params, \ |
26a7ca9a | 149 | .eeprom_params = &iwl20x0_eeprom_params, \ |
0d8877a1 | 150 | .led_mode = IWL_LED_RF_STATE |
c5a5e185 | 151 | |
706c4ff6 | 152 | const struct iwl_cfg iwl2030_2bgn_cfg = { |
6195d135 | 153 | .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN", |
96234cc8 | 154 | IWL_DEVICE_2030, |
c5a5e185 WYG |
155 | .ht_params = &iwl2000_ht_params, |
156 | }; | |
157 | ||
b4ed221d WYG |
158 | #define IWL_DEVICE_105 \ |
159 | .fw_name_pre = IWL105_FW_PRE, \ | |
160 | .ucode_api_max = IWL105_UCODE_API_MAX, \ | |
ca9a4605 | 161 | .ucode_api_ok = IWL105_UCODE_API_OK, \ |
b4ed221d | 162 | .ucode_api_min = IWL105_UCODE_API_MIN, \ |
2d771cb6 | 163 | .device_family = IWL_DEVICE_FAMILY_105, \ |
dae66d0d EG |
164 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
165 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
b7998c8b EL |
166 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
167 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 168 | .base_params = &iwl2000_base_params, \ |
26a7ca9a | 169 | .eeprom_params = &iwl20x0_eeprom_params, \ |
c5a5e185 | 170 | .led_mode = IWL_LED_RF_STATE, \ |
cf61686a | 171 | .rx_with_siso_diversity = true |
c5a5e185 | 172 | |
706c4ff6 | 173 | const struct iwl_cfg iwl105_bgn_cfg = { |
6195d135 | 174 | .name = "Intel(R) Centrino(R) Wireless-N 105 BGN", |
b4ed221d | 175 | IWL_DEVICE_105, |
c5a5e185 WYG |
176 | .ht_params = &iwl2000_ht_params, |
177 | }; | |
178 | ||
706c4ff6 | 179 | const struct iwl_cfg iwl105_bgn_d_cfg = { |
6195d135 | 180 | .name = "Intel(R) Centrino(R) Wireless-N 105D BGN", |
b319d3eb WYG |
181 | IWL_DEVICE_105, |
182 | .ht_params = &iwl2000_ht_params, | |
183 | }; | |
184 | ||
b4ed221d | 185 | #define IWL_DEVICE_135 \ |
54e9c409 WYG |
186 | .fw_name_pre = IWL135_FW_PRE, \ |
187 | .ucode_api_max = IWL135_UCODE_API_MAX, \ | |
ca9a4605 | 188 | .ucode_api_ok = IWL135_UCODE_API_OK, \ |
54e9c409 | 189 | .ucode_api_min = IWL135_UCODE_API_MIN, \ |
2d771cb6 | 190 | .device_family = IWL_DEVICE_FAMILY_135, \ |
dae66d0d EG |
191 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
192 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
b7998c8b EL |
193 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
194 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 195 | .base_params = &iwl2030_base_params, \ |
26a7ca9a | 196 | .eeprom_params = &iwl20x0_eeprom_params, \ |
c5a5e185 | 197 | .led_mode = IWL_LED_RF_STATE, \ |
cf61686a | 198 | .rx_with_siso_diversity = true |
c5a5e185 | 199 | |
706c4ff6 | 200 | const struct iwl_cfg iwl135_bgn_cfg = { |
6195d135 | 201 | .name = "Intel(R) Centrino(R) Wireless-N 135 BGN", |
b4ed221d | 202 | IWL_DEVICE_135, |
c5a5e185 WYG |
203 | .ht_params = &iwl2000_ht_params, |
204 | }; | |
205 | ||
78cbcf2b MV |
206 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK)); |
207 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK)); | |
208 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK)); | |
209 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK)); |