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: | |
d01c5366 | 22 | * Intel Linux Wireless <linuxwifi@intel.com> |
c5a5e185 WYG |
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 | ||
c5a5e185 WYG |
39 | /* Lowest firmware API version supported */ |
40 | #define IWL2030_UCODE_API_MIN 5 | |
41 | #define IWL2000_UCODE_API_MIN 5 | |
b4ed221d | 42 | #define IWL105_UCODE_API_MIN 5 |
54e9c409 | 43 | #define IWL135_UCODE_API_MIN 5 |
c5a5e185 | 44 | |
586aed96 JB |
45 | /* EEPROM version */ |
46 | #define EEPROM_2000_TX_POWER_VERSION (6) | |
47 | #define EEPROM_2000_EEPROM_VERSION (0x805) | |
48 | ||
49 | ||
c5a5e185 | 50 | #define IWL2030_FW_PRE "iwlwifi-2030-" |
8fcbd4dc | 51 | #define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode" |
c5a5e185 WYG |
52 | |
53 | #define IWL2000_FW_PRE "iwlwifi-2000-" | |
8fcbd4dc | 54 | #define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode" |
c5a5e185 | 55 | |
b4ed221d | 56 | #define IWL105_FW_PRE "iwlwifi-105-" |
8fcbd4dc | 57 | #define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode" |
c5a5e185 | 58 | |
54e9c409 | 59 | #define IWL135_FW_PRE "iwlwifi-135-" |
5092e47a | 60 | #define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode" |
54e9c409 | 61 | |
6794f3ee | 62 | static const struct iwl_base_params iwl2000_base_params = { |
c5a5e185 WYG |
63 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
64 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
c5a5e185 WYG |
65 | .max_ll_items = OTP_MAX_LL_ITEMS_2x00, |
66 | .shadow_ram_support = true, | |
67 | .led_compensation = 51, | |
c5a5e185 WYG |
68 | .wd_timeout = IWL_DEF_WD_TIMEOUT, |
69 | .max_event_log_size = 512, | |
66a77072 | 70 | .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ |
e03bbb62 | 71 | .scd_chain_ext_wa = true, |
c5a5e185 WYG |
72 | }; |
73 | ||
74 | ||
6794f3ee | 75 | static const struct iwl_base_params iwl2030_base_params = { |
c5a5e185 WYG |
76 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
77 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
c5a5e185 WYG |
78 | .max_ll_items = OTP_MAX_LL_ITEMS_2x00, |
79 | .shadow_ram_support = true, | |
80 | .led_compensation = 57, | |
c5a5e185 WYG |
81 | .wd_timeout = IWL_LONG_WD_TIMEOUT, |
82 | .max_event_log_size = 512, | |
66a77072 | 83 | .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ |
e03bbb62 | 84 | .scd_chain_ext_wa = true, |
c5a5e185 WYG |
85 | }; |
86 | ||
6794f3ee | 87 | static const struct iwl_ht_params iwl2000_ht_params = { |
c5a5e185 WYG |
88 | .ht_greenfield_support = true, |
89 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | |
57fbcce3 | 90 | .ht40_bands = BIT(NL80211_BAND_2GHZ), |
c5a5e185 WYG |
91 | }; |
92 | ||
26a7ca9a JB |
93 | static const struct iwl_eeprom_params iwl20x0_eeprom_params = { |
94 | .regulatory_bands = { | |
95 | EEPROM_REG_BAND_1_CHANNELS, | |
96 | EEPROM_REG_BAND_2_CHANNELS, | |
97 | EEPROM_REG_BAND_3_CHANNELS, | |
98 | EEPROM_REG_BAND_4_CHANNELS, | |
99 | EEPROM_REG_BAND_5_CHANNELS, | |
100 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, | |
101 | EEPROM_REGULATORY_BAND_NO_HT40, | |
102 | }, | |
103 | .enhanced_txpower = true, | |
104 | }; | |
105 | ||
c5a5e185 WYG |
106 | #define IWL_DEVICE_2000 \ |
107 | .fw_name_pre = IWL2000_FW_PRE, \ | |
108 | .ucode_api_max = IWL2000_UCODE_API_MAX, \ | |
109 | .ucode_api_min = IWL2000_UCODE_API_MIN, \ | |
2d771cb6 | 110 | .device_family = IWL_DEVICE_FAMILY_2000, \ |
dae66d0d EG |
111 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
112 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
0d8877a1 JB |
113 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
114 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 115 | .base_params = &iwl2000_base_params, \ |
26a7ca9a | 116 | .eeprom_params = &iwl20x0_eeprom_params, \ |
540623ca EG |
117 | .led_mode = IWL_LED_RF_STATE, \ |
118 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K | |
119 | ||
c5a5e185 | 120 | |
706c4ff6 | 121 | const struct iwl_cfg iwl2000_2bgn_cfg = { |
6195d135 | 122 | .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN", |
c5a5e185 WYG |
123 | IWL_DEVICE_2000, |
124 | .ht_params = &iwl2000_ht_params, | |
125 | }; | |
126 | ||
706c4ff6 | 127 | const struct iwl_cfg iwl2000_2bgn_d_cfg = { |
6195d135 | 128 | .name = "Intel(R) Centrino(R) Wireless-N 2200D BGN", |
1603dd49 | 129 | IWL_DEVICE_2000, |
ec8f734f | 130 | .ht_params = &iwl2000_ht_params, |
1603dd49 WYG |
131 | }; |
132 | ||
c5a5e185 WYG |
133 | #define IWL_DEVICE_2030 \ |
134 | .fw_name_pre = IWL2030_FW_PRE, \ | |
135 | .ucode_api_max = IWL2030_UCODE_API_MAX, \ | |
136 | .ucode_api_min = IWL2030_UCODE_API_MIN, \ | |
2d771cb6 | 137 | .device_family = IWL_DEVICE_FAMILY_2030, \ |
dae66d0d EG |
138 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
139 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
b7998c8b EL |
140 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
141 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 142 | .base_params = &iwl2030_base_params, \ |
26a7ca9a | 143 | .eeprom_params = &iwl20x0_eeprom_params, \ |
540623ca EG |
144 | .led_mode = IWL_LED_RF_STATE, \ |
145 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K | |
c5a5e185 | 146 | |
706c4ff6 | 147 | const struct iwl_cfg iwl2030_2bgn_cfg = { |
6195d135 | 148 | .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN", |
96234cc8 | 149 | IWL_DEVICE_2030, |
c5a5e185 WYG |
150 | .ht_params = &iwl2000_ht_params, |
151 | }; | |
152 | ||
b4ed221d WYG |
153 | #define IWL_DEVICE_105 \ |
154 | .fw_name_pre = IWL105_FW_PRE, \ | |
155 | .ucode_api_max = IWL105_UCODE_API_MAX, \ | |
156 | .ucode_api_min = IWL105_UCODE_API_MIN, \ | |
2d771cb6 | 157 | .device_family = IWL_DEVICE_FAMILY_105, \ |
dae66d0d EG |
158 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
159 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
b7998c8b EL |
160 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
161 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 162 | .base_params = &iwl2000_base_params, \ |
26a7ca9a | 163 | .eeprom_params = &iwl20x0_eeprom_params, \ |
c5a5e185 | 164 | .led_mode = IWL_LED_RF_STATE, \ |
540623ca EG |
165 | .rx_with_siso_diversity = true, \ |
166 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K | |
c5a5e185 | 167 | |
706c4ff6 | 168 | const struct iwl_cfg iwl105_bgn_cfg = { |
6195d135 | 169 | .name = "Intel(R) Centrino(R) Wireless-N 105 BGN", |
b4ed221d | 170 | IWL_DEVICE_105, |
c5a5e185 WYG |
171 | .ht_params = &iwl2000_ht_params, |
172 | }; | |
173 | ||
706c4ff6 | 174 | const struct iwl_cfg iwl105_bgn_d_cfg = { |
6195d135 | 175 | .name = "Intel(R) Centrino(R) Wireless-N 105D BGN", |
b319d3eb WYG |
176 | IWL_DEVICE_105, |
177 | .ht_params = &iwl2000_ht_params, | |
178 | }; | |
179 | ||
b4ed221d | 180 | #define IWL_DEVICE_135 \ |
54e9c409 WYG |
181 | .fw_name_pre = IWL135_FW_PRE, \ |
182 | .ucode_api_max = IWL135_UCODE_API_MAX, \ | |
183 | .ucode_api_min = IWL135_UCODE_API_MIN, \ | |
2d771cb6 | 184 | .device_family = IWL_DEVICE_FAMILY_135, \ |
dae66d0d EG |
185 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
186 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | |
b7998c8b EL |
187 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
188 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | |
c5a5e185 | 189 | .base_params = &iwl2030_base_params, \ |
26a7ca9a | 190 | .eeprom_params = &iwl20x0_eeprom_params, \ |
c5a5e185 | 191 | .led_mode = IWL_LED_RF_STATE, \ |
540623ca EG |
192 | .rx_with_siso_diversity = true, \ |
193 | .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K | |
c5a5e185 | 194 | |
706c4ff6 | 195 | const struct iwl_cfg iwl135_bgn_cfg = { |
6195d135 | 196 | .name = "Intel(R) Centrino(R) Wireless-N 135 BGN", |
b4ed221d | 197 | IWL_DEVICE_135, |
c5a5e185 WYG |
198 | .ht_params = &iwl2000_ht_params, |
199 | }; | |
200 | ||
9d9b21d1 EG |
201 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX)); |
202 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX)); | |
203 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX)); | |
204 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX)); |