Commit | Line | Data |
---|---|---|
c5a5e185 WYG |
1 | /****************************************************************************** |
2 | * | |
4e318262 | 3 | * Copyright(c) 2008 - 2012 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" |
cebcbd75 | 30 | #include "iwl-cfg.h" |
e9676695 | 31 | #include "iwl-dev.h" /* still needed */ |
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 */ | |
40 | #define IWL2030_UCODE_API_OK 5 | |
41 | #define IWL2000_UCODE_API_OK 5 | |
42 | #define IWL105_UCODE_API_OK 5 | |
43 | #define IWL135_UCODE_API_OK 5 | |
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 | .adv_thermal_throttle = true, |
76 | .support_ct_kill_exit = true, | |
77 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
78 | .chain_noise_scale = 1000, | |
79 | .wd_timeout = IWL_DEF_WD_TIMEOUT, | |
80 | .max_event_log_size = 512, | |
c5a5e185 | 81 | .shadow_reg_enable = true, |
ae7f9a74 | 82 | .hd_v2 = true, |
c5a5e185 WYG |
83 | }; |
84 | ||
85 | ||
6794f3ee | 86 | static const struct iwl_base_params iwl2030_base_params = { |
c5a5e185 WYG |
87 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
88 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
c5a5e185 | 89 | .pll_cfg_val = 0, |
c5a5e185 WYG |
90 | .max_ll_items = OTP_MAX_LL_ITEMS_2x00, |
91 | .shadow_ram_support = true, | |
92 | .led_compensation = 57, | |
c5a5e185 WYG |
93 | .adv_thermal_throttle = true, |
94 | .support_ct_kill_exit = true, | |
95 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
96 | .chain_noise_scale = 1000, | |
97 | .wd_timeout = IWL_LONG_WD_TIMEOUT, | |
98 | .max_event_log_size = 512, | |
c5a5e185 | 99 | .shadow_reg_enable = true, |
ae7f9a74 | 100 | .hd_v2 = true, |
c5a5e185 WYG |
101 | }; |
102 | ||
6794f3ee | 103 | static const struct iwl_ht_params iwl2000_ht_params = { |
c5a5e185 WYG |
104 | .ht_greenfield_support = true, |
105 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | |
106 | }; | |
107 | ||
6794f3ee | 108 | static const struct iwl_bt_params iwl2030_bt_params = { |
c5a5e185 WYG |
109 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
110 | .advanced_bt_coexist = true, | |
111 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, | |
112 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | |
113 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | |
114 | .bt_sco_disable = true, | |
6013270a | 115 | .bt_session_2 = true, |
c5a5e185 WYG |
116 | }; |
117 | ||
118 | #define IWL_DEVICE_2000 \ | |
119 | .fw_name_pre = IWL2000_FW_PRE, \ | |
120 | .ucode_api_max = IWL2000_UCODE_API_MAX, \ | |
ca9a4605 | 121 | .ucode_api_ok = IWL2000_UCODE_API_OK, \ |
c5a5e185 | 122 | .ucode_api_min = IWL2000_UCODE_API_MIN, \ |
2d771cb6 | 123 | .device_family = IWL_DEVICE_FAMILY_2000, \ |
dae66d0d EG |
124 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
125 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
c5a5e185 WYG |
126 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ |
127 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 128 | .base_params = &iwl2000_base_params, \ |
c5a5e185 | 129 | .need_temp_offset_calib = true, \ |
c6f30347 | 130 | .temp_offset_v2 = true, \ |
cf61686a | 131 | .led_mode = IWL_LED_RF_STATE |
c5a5e185 | 132 | |
706c4ff6 | 133 | const struct iwl_cfg iwl2000_2bgn_cfg = { |
6195d135 | 134 | .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN", |
c5a5e185 WYG |
135 | IWL_DEVICE_2000, |
136 | .ht_params = &iwl2000_ht_params, | |
137 | }; | |
138 | ||
706c4ff6 | 139 | const struct iwl_cfg iwl2000_2bgn_d_cfg = { |
6195d135 | 140 | .name = "Intel(R) Centrino(R) Wireless-N 2200D BGN", |
1603dd49 | 141 | IWL_DEVICE_2000, |
ec8f734f | 142 | .ht_params = &iwl2000_ht_params, |
1603dd49 WYG |
143 | }; |
144 | ||
c5a5e185 WYG |
145 | #define IWL_DEVICE_2030 \ |
146 | .fw_name_pre = IWL2030_FW_PRE, \ | |
147 | .ucode_api_max = IWL2030_UCODE_API_MAX, \ | |
ca9a4605 | 148 | .ucode_api_ok = IWL2030_UCODE_API_OK, \ |
c5a5e185 | 149 | .ucode_api_min = IWL2030_UCODE_API_MIN, \ |
2d771cb6 | 150 | .device_family = IWL_DEVICE_FAMILY_2030, \ |
dae66d0d EG |
151 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
152 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
c5a5e185 WYG |
153 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ |
154 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 WYG |
155 | .base_params = &iwl2030_base_params, \ |
156 | .bt_params = &iwl2030_bt_params, \ | |
c5a5e185 | 157 | .need_temp_offset_calib = true, \ |
c6f30347 | 158 | .temp_offset_v2 = true, \ |
c5a5e185 | 159 | .led_mode = IWL_LED_RF_STATE, \ |
cf61686a | 160 | .adv_pm = true |
c5a5e185 | 161 | |
706c4ff6 | 162 | const struct iwl_cfg iwl2030_2bgn_cfg = { |
6195d135 | 163 | .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN", |
96234cc8 | 164 | IWL_DEVICE_2030, |
c5a5e185 WYG |
165 | .ht_params = &iwl2000_ht_params, |
166 | }; | |
167 | ||
b4ed221d WYG |
168 | #define IWL_DEVICE_105 \ |
169 | .fw_name_pre = IWL105_FW_PRE, \ | |
170 | .ucode_api_max = IWL105_UCODE_API_MAX, \ | |
ca9a4605 | 171 | .ucode_api_ok = IWL105_UCODE_API_OK, \ |
b4ed221d | 172 | .ucode_api_min = IWL105_UCODE_API_MIN, \ |
2d771cb6 | 173 | .device_family = IWL_DEVICE_FAMILY_105, \ |
dae66d0d EG |
174 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
175 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
c5a5e185 WYG |
176 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ |
177 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 178 | .base_params = &iwl2000_base_params, \ |
c5a5e185 | 179 | .need_temp_offset_calib = true, \ |
c6f30347 | 180 | .temp_offset_v2 = true, \ |
c5a5e185 WYG |
181 | .led_mode = IWL_LED_RF_STATE, \ |
182 | .adv_pm = true, \ | |
cf61686a | 183 | .rx_with_siso_diversity = true |
c5a5e185 | 184 | |
706c4ff6 | 185 | const struct iwl_cfg iwl105_bgn_cfg = { |
6195d135 | 186 | .name = "Intel(R) Centrino(R) Wireless-N 105 BGN", |
b4ed221d | 187 | IWL_DEVICE_105, |
c5a5e185 WYG |
188 | .ht_params = &iwl2000_ht_params, |
189 | }; | |
190 | ||
706c4ff6 | 191 | const struct iwl_cfg iwl105_bgn_d_cfg = { |
6195d135 | 192 | .name = "Intel(R) Centrino(R) Wireless-N 105D BGN", |
b319d3eb WYG |
193 | IWL_DEVICE_105, |
194 | .ht_params = &iwl2000_ht_params, | |
195 | }; | |
196 | ||
b4ed221d | 197 | #define IWL_DEVICE_135 \ |
54e9c409 WYG |
198 | .fw_name_pre = IWL135_FW_PRE, \ |
199 | .ucode_api_max = IWL135_UCODE_API_MAX, \ | |
ca9a4605 | 200 | .ucode_api_ok = IWL135_UCODE_API_OK, \ |
54e9c409 | 201 | .ucode_api_min = IWL135_UCODE_API_MIN, \ |
2d771cb6 | 202 | .device_family = IWL_DEVICE_FAMILY_135, \ |
dae66d0d EG |
203 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
204 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
c5a5e185 WYG |
205 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ |
206 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 WYG |
207 | .base_params = &iwl2030_base_params, \ |
208 | .bt_params = &iwl2030_bt_params, \ | |
c5a5e185 | 209 | .need_temp_offset_calib = true, \ |
c6f30347 | 210 | .temp_offset_v2 = true, \ |
c5a5e185 WYG |
211 | .led_mode = IWL_LED_RF_STATE, \ |
212 | .adv_pm = true, \ | |
cf61686a | 213 | .rx_with_siso_diversity = true |
c5a5e185 | 214 | |
706c4ff6 | 215 | const struct iwl_cfg iwl135_bgn_cfg = { |
6195d135 | 216 | .name = "Intel(R) Centrino(R) Wireless-N 135 BGN", |
b4ed221d | 217 | IWL_DEVICE_135, |
c5a5e185 WYG |
218 | .ht_params = &iwl2000_ht_params, |
219 | }; | |
220 | ||
221 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX)); | |
222 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX)); | |
b4ed221d | 223 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX)); |
54e9c409 | 224 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX)); |