Commit | Line | Data |
---|---|---|
e1228374 JS |
1 | /****************************************************************************** |
2 | * | |
1f447808 | 3 | * Copyright(c) 2008 - 2010 Intel Corporation. All rights reserved. |
e1228374 JS |
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 | ||
27 | #include <linux/kernel.h> | |
28 | #include <linux/module.h> | |
29 | #include <linux/init.h> | |
30 | #include <linux/pci.h> | |
31 | #include <linux/dma-mapping.h> | |
32 | #include <linux/delay.h> | |
33 | #include <linux/skbuff.h> | |
34 | #include <linux/netdevice.h> | |
35 | #include <linux/wireless.h> | |
36 | #include <net/mac80211.h> | |
37 | #include <linux/etherdevice.h> | |
38 | #include <asm/unaligned.h> | |
39 | ||
40 | #include "iwl-eeprom.h" | |
41 | #include "iwl-dev.h" | |
42 | #include "iwl-core.h" | |
43 | #include "iwl-io.h" | |
44 | #include "iwl-sta.h" | |
a1175124 | 45 | #include "iwl-agn.h" |
e1228374 | 46 | #include "iwl-helpers.h" |
19e6cda0 | 47 | #include "iwl-agn-hw.h" |
f3a2a424 | 48 | #include "iwl-6000-hw.h" |
e932a609 | 49 | #include "iwl-agn-led.h" |
b8c76267 | 50 | #include "iwl-agn-debugfs.h" |
e1228374 JS |
51 | |
52 | /* Highest firmware API version supported */ | |
fcbaf8b0 WYG |
53 | #define IWL6000_UCODE_API_MAX 4 |
54 | #define IWL6050_UCODE_API_MAX 4 | |
670245ed | 55 | #define IWL6000G2_UCODE_API_MAX 5 |
e1228374 JS |
56 | |
57 | /* Lowest firmware API version supported */ | |
44246421 WYG |
58 | #define IWL6000_UCODE_API_MIN 4 |
59 | #define IWL6050_UCODE_API_MIN 4 | |
4b3e8062 | 60 | #define IWL6000G2_UCODE_API_MIN 4 |
e1228374 JS |
61 | |
62 | #define IWL6000_FW_PRE "iwlwifi-6000-" | |
63 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" | |
64 | #define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api) | |
65 | ||
66 | #define IWL6050_FW_PRE "iwlwifi-6050-" | |
67 | #define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode" | |
68 | #define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api) | |
69 | ||
95b13014 SZ |
70 | #define IWL6000G2A_FW_PRE "iwlwifi-6000g2a-" |
71 | #define _IWL6000G2A_MODULE_FIRMWARE(api) IWL6000G2A_FW_PRE #api ".ucode" | |
72 | #define IWL6000G2A_MODULE_FIRMWARE(api) _IWL6000G2A_MODULE_FIRMWARE(api) | |
73 | ||
1808972f SZ |
74 | #define IWL6000G2B_FW_PRE "iwlwifi-6000g2b-" |
75 | #define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode" | |
76 | #define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api) | |
77 | ||
4b3e8062 | 78 | |
672639de WYG |
79 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) |
80 | { | |
81 | /* want Celsius */ | |
82 | priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD; | |
83 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | |
84 | } | |
85 | ||
d5755939 | 86 | /* Indicate calibration version to uCode. */ |
178d1596 | 87 | static void iwl6000_set_calib_version(struct iwl_priv *priv) |
d5755939 | 88 | { |
178d1596 WYG |
89 | if (priv->cfg->need_dc_calib && |
90 | (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)) | |
d5755939 AK |
91 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, |
92 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | |
93 | } | |
94 | ||
65b7998a WYG |
95 | /* NIC configuration for 6000 series */ |
96 | static void iwl6000_nic_config(struct iwl_priv *priv) | |
97 | { | |
9371d4ed WYG |
98 | u16 radio_cfg; |
99 | ||
100 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); | |
101 | ||
102 | /* write radio config values to register */ | |
103 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX) | |
104 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | |
105 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) | | |
106 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) | | |
107 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); | |
108 | ||
109 | /* set CSR_HW_CONFIG_REG for uCode use */ | |
110 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | |
111 | CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI | | |
112 | CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); | |
65b7998a WYG |
113 | |
114 | /* no locking required for register write */ | |
740e7f51 | 115 | if (priv->cfg->pa_type == IWL_PA_INTERNAL) { |
65b7998a WYG |
116 | /* 2x2 IPA phy type */ |
117 | iwl_write32(priv, CSR_GP_DRIVER_REG, | |
118 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | |
119 | } | |
120 | /* else do nothing, uCode configured */ | |
d5755939 AK |
121 | if (priv->cfg->ops->lib->temp_ops.set_calib_version) |
122 | priv->cfg->ops->lib->temp_ops.set_calib_version(priv); | |
65b7998a WYG |
123 | } |
124 | ||
670245ed JB |
125 | /* |
126 | * Macros to access the lookup table. | |
127 | * | |
128 | * The lookup table has 7 inputs: bt3_prio, bt3_txrx, bt_rf_act, wifi_req, | |
129 | * wifi_prio, wifi_txrx and wifi_sh_ant_req. | |
130 | * | |
131 | * It has three outputs: WLAN_ACTIVE, WLAN_KILL and ANT_SWITCH | |
132 | * | |
133 | * The format is that "registers" 8 through 11 contain the WLAN_ACTIVE bits | |
134 | * one after another in 32-bit registers, and "registers" 0 through 7 contain | |
135 | * the WLAN_KILL and ANT_SWITCH bits interleaved (in that order). | |
136 | * | |
137 | * These macros encode that format. | |
138 | */ | |
139 | #define LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, wifi_req, wifi_prio, \ | |
140 | wifi_txrx, wifi_sh_ant_req) \ | |
141 | (bt3_prio | (bt3_txrx << 1) | (bt_rf_act << 2) | (wifi_req << 3) | \ | |
142 | (wifi_prio << 4) | (wifi_txrx << 5) | (wifi_sh_ant_req << 6)) | |
143 | ||
144 | #define LUT_PTA_WLAN_ACTIVE_OP(lut, op, val) \ | |
145 | lut[8 + ((val) >> 5)] op (cpu_to_le32(BIT((val) & 0x1f))) | |
146 | #define LUT_TEST_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \ | |
147 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
148 | (!!(LUT_PTA_WLAN_ACTIVE_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx,\ | |
149 | bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)))) | |
150 | #define LUT_SET_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \ | |
151 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
152 | LUT_PTA_WLAN_ACTIVE_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, \ | |
153 | bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)) | |
154 | #define LUT_CLEAR_PTA_WLAN_ACTIVE(lut, bt3_prio, bt3_txrx, bt_rf_act, \ | |
155 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
156 | LUT_PTA_WLAN_ACTIVE_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, \ | |
157 | bt_rf_act, wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)) | |
158 | ||
159 | #define LUT_WLAN_KILL_OP(lut, op, val) \ | |
160 | lut[(val) >> 4] op (cpu_to_le32(BIT(((val) << 1) & 0x1e))) | |
161 | #define LUT_TEST_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \ | |
162 | wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
163 | (!!(LUT_WLAN_KILL_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \ | |
164 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)))) | |
165 | #define LUT_SET_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \ | |
166 | wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
167 | LUT_WLAN_KILL_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \ | |
168 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)) | |
169 | #define LUT_CLEAR_WLAN_KILL(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \ | |
170 | wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
171 | LUT_WLAN_KILL_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \ | |
172 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)) | |
173 | ||
174 | #define LUT_ANT_SWITCH_OP(lut, op, val) \ | |
175 | lut[(val) >> 4] op (cpu_to_le32(BIT((((val) << 1) & 0x1e) + 1))) | |
176 | #define LUT_TEST_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \ | |
177 | wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
178 | (!!(LUT_ANT_SWITCH_OP(lut, &, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \ | |
179 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)))) | |
180 | #define LUT_SET_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \ | |
181 | wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
182 | LUT_ANT_SWITCH_OP(lut, |=, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \ | |
183 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)) | |
184 | #define LUT_CLEAR_ANT_SWITCH(lut, bt3_prio, bt3_txrx, bt_rf_act, wifi_req, \ | |
185 | wifi_prio, wifi_txrx, wifi_sh_ant_req) \ | |
186 | LUT_ANT_SWITCH_OP(lut, &= ~, LUT_VALUE(bt3_prio, bt3_txrx, bt_rf_act, \ | |
187 | wifi_req, wifi_prio, wifi_txrx, wifi_sh_ant_req)) | |
188 | ||
189 | static const __le32 iwl6000g2b_def_3w_lookup[12] = { | |
190 | cpu_to_le32(0xaaaaaaaa), | |
191 | cpu_to_le32(0xaaaaaaaa), | |
192 | cpu_to_le32(0xaeaaaaaa), | |
193 | cpu_to_le32(0xaaaaaaaa), | |
194 | cpu_to_le32(0xcc00ff28), | |
195 | cpu_to_le32(0x0000aaaa), | |
196 | cpu_to_le32(0xcc00aaaa), | |
197 | cpu_to_le32(0x0000aaaa), | |
198 | cpu_to_le32(0xc0004000), | |
199 | cpu_to_le32(0x00004000), | |
200 | cpu_to_le32(0xf0005000), | |
201 | cpu_to_le32(0xf0004000), | |
202 | }; | |
203 | ||
bee008b7 WYG |
204 | static const __le32 iwl6000g2b_concurrent_lookup[12] = { |
205 | cpu_to_le32(0xaaaaaaaa), | |
206 | cpu_to_le32(0xaaaaaaaa), | |
207 | cpu_to_le32(0xaaaaaaaa), | |
208 | cpu_to_le32(0xaaaaaaaa), | |
209 | cpu_to_le32(0xaaaaaaaa), | |
210 | cpu_to_le32(0xaaaaaaaa), | |
211 | cpu_to_le32(0xaaaaaaaa), | |
212 | cpu_to_le32(0xaaaaaaaa), | |
213 | cpu_to_le32(0x00000000), | |
214 | cpu_to_le32(0x00000000), | |
215 | cpu_to_le32(0x00000000), | |
216 | cpu_to_le32(0x00000000), | |
217 | }; | |
218 | ||
670245ed JB |
219 | static void iwl6000g2b_send_bt_config(struct iwl_priv *priv) |
220 | { | |
221 | struct iwl6000g2b_bt_cmd bt_cmd = { | |
222 | .prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT, | |
223 | .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT, | |
224 | .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT, | |
225 | .kill_ack_mask = IWL6000G2B_BT_KILL_ACK_MASK_DEFAULT, | |
226 | .kill_cts_mask = IWL6000G2B_BT_KILL_CTS_MASK_DEFAULT, | |
227 | .bt3_prio_sample_time = IWL6000G2B_BT3_PRIO_SAMPLE_DEFAULT, | |
228 | .bt3_timer_t2_value = IWL6000G2B_BT3_T2_DEFAULT, | |
229 | .valid = IWL6000G2B_BT_VALID_ENABLE_FLAGS, | |
230 | }; | |
231 | ||
232 | BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) != | |
233 | sizeof(bt_cmd.bt3_lookup_table)); | |
234 | ||
59079949 JB |
235 | /* |
236 | * Configure BT coex mode to "no coexistence" when the | |
237 | * user disabled BT coexistence, we have no interface | |
aeb4a2ee | 238 | * user disabled BT coexistence, or the interface is in |
59079949 JB |
239 | * IBSS mode (no proper uCode support for coex then). |
240 | */ | |
aeb4a2ee | 241 | if (!bt_coex_active || priv->iw_mode == NL80211_IFTYPE_ADHOC) { |
670245ed JB |
242 | bt_cmd.flags = 0; |
243 | } else { | |
244 | bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION | | |
245 | IWL6000G2B_BT_FLAG_COEX_MODE_3W << | |
246 | IWL6000G2B_BT_FLAG_COEX_MODE_SHIFT; | |
247 | bt_cmd.valid |= IWL6000G2B_BT_ALL_VALID_MSK; | |
248 | } | |
249 | ||
bee008b7 WYG |
250 | if (priv->bt_full_concurrent) |
251 | memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_concurrent_lookup, | |
252 | sizeof(iwl6000g2b_concurrent_lookup)); | |
253 | else | |
254 | memcpy(bt_cmd.bt3_lookup_table, iwl6000g2b_def_3w_lookup, | |
255 | sizeof(iwl6000g2b_def_3w_lookup)); | |
670245ed | 256 | |
bee008b7 WYG |
257 | IWL_DEBUG_INFO(priv, "BT coex %s in %s mode\n", |
258 | bt_cmd.flags ? "active" : "disabled", | |
259 | priv->bt_full_concurrent ? | |
260 | "full concurrency" : "3-wire"); | |
670245ed JB |
261 | |
262 | if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd)) | |
263 | IWL_ERR(priv, "failed to send BT Coex Config\n"); | |
511b082d JB |
264 | |
265 | /* | |
266 | * When we are doing a restart, need to also reconfigure BT | |
267 | * SCO to the device. If not doing a restart, bt_sco_active | |
268 | * will always be false, so there's no need to have an extra | |
269 | * variable to check for it. | |
270 | */ | |
271 | if (priv->bt_sco_active) { | |
272 | struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 }; | |
273 | ||
274 | if (priv->bt_sco_active) | |
275 | sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE; | |
276 | if (iwl_send_cmd_pdu(priv, REPLY_BT_COEX_SCO, | |
277 | sizeof(sco_cmd), &sco_cmd)) | |
278 | IWL_ERR(priv, "failed to send BT SCO command\n"); | |
279 | } | |
670245ed JB |
280 | } |
281 | ||
f3a2a424 WYG |
282 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
283 | .min_nrg_cck = 97, | |
284 | .max_nrg_cck = 0, /* not used, set to 0 */ | |
285 | .auto_corr_min_ofdm = 80, | |
286 | .auto_corr_min_ofdm_mrc = 128, | |
287 | .auto_corr_min_ofdm_x1 = 105, | |
288 | .auto_corr_min_ofdm_mrc_x1 = 192, | |
289 | ||
290 | .auto_corr_max_ofdm = 145, | |
291 | .auto_corr_max_ofdm_mrc = 232, | |
2494f63c | 292 | .auto_corr_max_ofdm_x1 = 110, |
f3a2a424 WYG |
293 | .auto_corr_max_ofdm_mrc_x1 = 232, |
294 | ||
295 | .auto_corr_min_cck = 125, | |
296 | .auto_corr_max_cck = 175, | |
297 | .auto_corr_min_cck_mrc = 160, | |
298 | .auto_corr_max_cck_mrc = 310, | |
299 | .nrg_th_cck = 97, | |
300 | .nrg_th_ofdm = 100, | |
55036d66 WYG |
301 | |
302 | .barker_corr_th_min = 190, | |
303 | .barker_corr_th_min_mrc = 390, | |
304 | .nrg_th_cca = 62, | |
f3a2a424 WYG |
305 | }; |
306 | ||
307 | static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |
308 | { | |
88804e2b | 309 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
19e6cda0 | 310 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
88804e2b WYG |
311 | priv->cfg->num_of_queues = |
312 | priv->cfg->mod_params->num_of_queues; | |
f3a2a424 | 313 | |
88804e2b | 314 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; |
f3a2a424 WYG |
315 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
316 | priv->hw_params.scd_bc_tbls_size = | |
88804e2b | 317 | priv->cfg->num_of_queues * |
19e6cda0 | 318 | sizeof(struct iwlagn_scd_bc_tbl); |
f3a2a424 | 319 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
bf3c7fdd WYG |
320 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
321 | priv->hw_params.bcast_sta_id = IWLAGN_BROADCAST_ID; | |
f3a2a424 WYG |
322 | |
323 | priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE; | |
324 | priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE; | |
325 | ||
326 | priv->hw_params.max_bsm_size = 0; | |
327 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | |
328 | BIT(IEEE80211_BAND_5GHZ); | |
329 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | |
330 | ||
331 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | |
332 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | |
333 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | |
334 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | |
335 | ||
336 | if (priv->cfg->ops->lib->temp_ops.set_ct_kill) | |
337 | priv->cfg->ops->lib->temp_ops.set_ct_kill(priv); | |
338 | ||
339 | /* Set initial sensitivity parameters */ | |
340 | /* Set initial calibration set */ | |
341 | priv->hw_params.sens = &iwl6000_sensitivity; | |
e517736a WYG |
342 | priv->hw_params.calib_init_cfg = |
343 | BIT(IWL_CALIB_XTAL) | | |
344 | BIT(IWL_CALIB_LO) | | |
345 | BIT(IWL_CALIB_TX_IQ) | | |
346 | BIT(IWL_CALIB_BASE_BAND); | |
178d1596 WYG |
347 | if (priv->cfg->need_dc_calib) |
348 | priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC); | |
07f33f92 | 349 | |
a0ee74cf WYG |
350 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; |
351 | ||
f3a2a424 WYG |
352 | return 0; |
353 | } | |
354 | ||
79d07325 WYG |
355 | static int iwl6000_hw_channel_switch(struct iwl_priv *priv, |
356 | struct ieee80211_channel_switch *ch_switch) | |
4a56e965 WYG |
357 | { |
358 | struct iwl6000_channel_switch_cmd cmd; | |
359 | const struct iwl_channel_info *ch_info; | |
79d07325 WYG |
360 | u32 switch_time_in_usec, ucode_switch_time; |
361 | u16 ch; | |
362 | u32 tsf_low; | |
363 | u8 switch_count; | |
364 | u16 beacon_interval = le16_to_cpu(priv->rxon_timing.beacon_interval); | |
365 | struct ieee80211_vif *vif = priv->vif; | |
4a56e965 WYG |
366 | struct iwl_host_cmd hcmd = { |
367 | .id = REPLY_CHANNEL_SWITCH, | |
368 | .len = sizeof(cmd), | |
3839f7ce | 369 | .flags = CMD_SYNC, |
4a56e965 WYG |
370 | .data = &cmd, |
371 | }; | |
372 | ||
4a56e965 | 373 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; |
81e95430 | 374 | ch = ch_switch->channel->hw_value; |
79d07325 WYG |
375 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
376 | priv->active_rxon.channel, ch); | |
377 | cmd.channel = cpu_to_le16(ch); | |
0924e519 WYG |
378 | cmd.rxon_flags = priv->staging_rxon.flags; |
379 | cmd.rxon_filter_flags = priv->staging_rxon.filter_flags; | |
79d07325 WYG |
380 | switch_count = ch_switch->count; |
381 | tsf_low = ch_switch->timestamp & 0x0ffffffff; | |
382 | /* | |
383 | * calculate the ucode channel switch time | |
384 | * adding TSF as one of the factor for when to switch | |
385 | */ | |
386 | if ((priv->ucode_beacon_time > tsf_low) && beacon_interval) { | |
387 | if (switch_count > ((priv->ucode_beacon_time - tsf_low) / | |
388 | beacon_interval)) { | |
389 | switch_count -= (priv->ucode_beacon_time - | |
390 | tsf_low) / beacon_interval; | |
391 | } else | |
392 | switch_count = 0; | |
393 | } | |
394 | if (switch_count <= 1) | |
395 | cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time); | |
396 | else { | |
397 | switch_time_in_usec = | |
398 | vif->bss_conf.beacon_int * switch_count * TIME_UNIT; | |
399 | ucode_switch_time = iwl_usecs_to_beacons(priv, | |
400 | switch_time_in_usec, | |
401 | beacon_interval); | |
402 | cmd.switch_time = iwl_add_beacon_time(priv, | |
403 | priv->ucode_beacon_time, | |
404 | ucode_switch_time, | |
405 | beacon_interval); | |
406 | } | |
407 | IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n", | |
408 | cmd.switch_time); | |
409 | ch_info = iwl_get_channel_info(priv, priv->band, ch); | |
4a56e965 WYG |
410 | if (ch_info) |
411 | cmd.expect_beacon = is_channel_radar(ch_info); | |
412 | else { | |
413 | IWL_ERR(priv, "invalid channel switch from %u to %u\n", | |
79d07325 | 414 | priv->active_rxon.channel, ch); |
4a56e965 WYG |
415 | return -EFAULT; |
416 | } | |
79d07325 | 417 | priv->switch_rxon.channel = cmd.channel; |
0924e519 | 418 | priv->switch_rxon.switch_in_progress = true; |
4a56e965 WYG |
419 | |
420 | return iwl_send_cmd_sync(priv, &hcmd); | |
421 | } | |
422 | ||
9e4afc21 JB |
423 | static void iwl6000g2b_bt_traffic_change_work(struct work_struct *work) |
424 | { | |
425 | struct iwl_priv *priv = | |
426 | container_of(work, struct iwl_priv, bt_traffic_change_work); | |
427 | int smps_request = -1; | |
428 | ||
429 | switch (priv->bt_traffic_load) { | |
430 | case IWL_BT_COEX_TRAFFIC_LOAD_NONE: | |
431 | smps_request = IEEE80211_SMPS_AUTOMATIC; | |
432 | break; | |
433 | case IWL_BT_COEX_TRAFFIC_LOAD_LOW: | |
434 | smps_request = IEEE80211_SMPS_DYNAMIC; | |
435 | break; | |
436 | case IWL_BT_COEX_TRAFFIC_LOAD_HIGH: | |
437 | case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS: | |
438 | smps_request = IEEE80211_SMPS_STATIC; | |
439 | break; | |
440 | default: | |
441 | IWL_ERR(priv, "Invalid BT traffic load: %d\n", | |
442 | priv->bt_traffic_load); | |
443 | break; | |
444 | } | |
445 | ||
446 | mutex_lock(&priv->mutex); | |
447 | ||
448 | if (smps_request != -1 && | |
449 | priv->vif && priv->vif->type == NL80211_IFTYPE_STATION) | |
450 | ieee80211_request_smps(priv->vif, smps_request); | |
451 | ||
452 | mutex_unlock(&priv->mutex); | |
453 | } | |
454 | ||
455 | static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv, | |
456 | struct iwl_rx_mem_buffer *rxb) | |
457 | { | |
bee008b7 | 458 | unsigned long flags; |
9e4afc21 JB |
459 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
460 | struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif; | |
461 | struct iwl6000g2b_bt_sco_cmd sco_cmd = { .flags = 0 }; | |
462 | ||
463 | IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n"); | |
464 | IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status); | |
465 | IWL_DEBUG_NOTIF(priv, " traffic load: %d\n", coex->bt_traffic_load); | |
466 | IWL_DEBUG_NOTIF(priv, " CI compliance: %d\n", coex->bt_ci_compliance); | |
467 | IWL_DEBUG_NOTIF(priv, " UART msg: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x:" | |
468 | "%.2x:%.2x\n", | |
469 | coex->uart_msg[0], coex->uart_msg[1], coex->uart_msg[2], | |
470 | coex->uart_msg[3], coex->uart_msg[4], coex->uart_msg[5], | |
471 | coex->uart_msg[6], coex->uart_msg[7]); | |
472 | ||
59079949 | 473 | priv->notif_bt_traffic_load = coex->bt_traffic_load; |
9e4afc21 | 474 | |
59079949 JB |
475 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { |
476 | if (coex->bt_traffic_load != priv->bt_traffic_load) { | |
477 | priv->bt_traffic_load = coex->bt_traffic_load; | |
9e4afc21 | 478 | |
59079949 JB |
479 | queue_work(priv->workqueue, |
480 | &priv->bt_traffic_change_work); | |
481 | } | |
482 | ||
483 | /* FIXME: add defines for this check */ | |
484 | priv->bt_sco_active = coex->uart_msg[3] & 1; | |
485 | if (priv->bt_sco_active) | |
486 | sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE; | |
487 | iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO, | |
488 | sizeof(sco_cmd), &sco_cmd, NULL); | |
489 | } | |
bee008b7 WYG |
490 | |
491 | spin_lock_irqsave(&priv->lock, flags); | |
492 | priv->bt_ci_compliance = coex->bt_ci_compliance; | |
493 | spin_unlock_irqrestore(&priv->lock, flags); | |
9e4afc21 JB |
494 | } |
495 | ||
496 | void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv) | |
497 | { | |
498 | iwlagn_rx_handler_setup(priv); | |
499 | priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] = | |
500 | iwl6000g2b_bt_coex_profile_notif; | |
501 | } | |
502 | ||
503 | static void iwl6000g2b_bt_setup_deferred_work(struct iwl_priv *priv) | |
504 | { | |
505 | iwlagn_setup_deferred_work(priv); | |
506 | ||
507 | INIT_WORK(&priv->bt_traffic_change_work, | |
508 | iwl6000g2b_bt_traffic_change_work); | |
509 | ||
510 | } | |
511 | ||
512 | static void iwl6000g2b_bt_cancel_deferred_work(struct iwl_priv *priv) | |
513 | { | |
514 | cancel_work_sync(&priv->bt_traffic_change_work); | |
515 | } | |
516 | ||
672639de | 517 | static struct iwl_lib_ops iwl6000_lib = { |
f3a2a424 | 518 | .set_hw_params = iwl6000_hw_set_hw_params, |
b305a080 WYG |
519 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
520 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | |
521 | .txq_set_sched = iwlagn_txq_set_sched, | |
522 | .txq_agg_enable = iwlagn_txq_agg_enable, | |
523 | .txq_agg_disable = iwlagn_txq_agg_disable, | |
672639de WYG |
524 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
525 | .txq_free_tfd = iwl_hw_txq_free_tfd, | |
526 | .txq_init = iwl_hw_tx_queue_init, | |
e04ed0a5 WYG |
527 | .rx_handler_setup = iwlagn_rx_handler_setup, |
528 | .setup_deferred_work = iwlagn_setup_deferred_work, | |
529 | .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, | |
81b8176e | 530 | .load_ucode = iwlagn_load_ucode, |
b7a79404 RC |
531 | .dump_nic_event_log = iwl_dump_nic_event_log, |
532 | .dump_nic_error_log = iwl_dump_nic_error_log, | |
696bdee3 | 533 | .dump_csr = iwl_dump_csr, |
1b3eb823 | 534 | .dump_fh = iwl_dump_fh, |
741a6266 WYG |
535 | .init_alive_start = iwlagn_init_alive_start, |
536 | .alive_notify = iwlagn_alive_notify, | |
e04ed0a5 | 537 | .send_tx_power = iwlagn_send_tx_power, |
672639de | 538 | .update_chain_flags = iwl_update_chain_flags, |
4a56e965 | 539 | .set_channel_switch = iwl6000_hw_channel_switch, |
672639de | 540 | .apm_ops = { |
fadb3582 | 541 | .init = iwl_apm_init, |
d68b603c | 542 | .stop = iwl_apm_stop, |
65b7998a | 543 | .config = iwl6000_nic_config, |
672639de WYG |
544 | .set_pwr_src = iwl_set_pwr_src, |
545 | }, | |
546 | .eeprom_ops = { | |
547 | .regulatory_bands = { | |
e04ed0a5 WYG |
548 | EEPROM_REG_BAND_1_CHANNELS, |
549 | EEPROM_REG_BAND_2_CHANNELS, | |
550 | EEPROM_REG_BAND_3_CHANNELS, | |
551 | EEPROM_REG_BAND_4_CHANNELS, | |
552 | EEPROM_REG_BAND_5_CHANNELS, | |
f2fa1b01 | 553 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, |
e04ed0a5 | 554 | EEPROM_REG_BAND_52_HT40_CHANNELS |
672639de WYG |
555 | }, |
556 | .verify_signature = iwlcore_eeprom_verify_signature, | |
557 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | |
558 | .release_semaphore = iwlcore_eeprom_release_semaphore, | |
e04ed0a5 WYG |
559 | .calib_version = iwlagn_eeprom_calib_version, |
560 | .query_addr = iwlagn_eeprom_query_addr, | |
ab9fd1bf | 561 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, |
672639de WYG |
562 | }, |
563 | .post_associate = iwl_post_associate, | |
564 | .isr = iwl_isr_ict, | |
565 | .config_ap = iwl_config_ap, | |
566 | .temp_ops = { | |
e04ed0a5 | 567 | .temperature = iwlagn_temperature, |
672639de | 568 | .set_ct_kill = iwl6000_set_ct_threshold, |
178d1596 | 569 | .set_calib_version = iwl6000_set_calib_version, |
672639de | 570 | }, |
1fa61b2e | 571 | .manage_ibss_station = iwlagn_manage_ibss_station, |
278c2f6f | 572 | .update_bcast_station = iwl_update_bcast_station, |
b8c76267 AK |
573 | .debugfs_ops = { |
574 | .rx_stats_read = iwl_ucode_rx_stats_read, | |
575 | .tx_stats_read = iwl_ucode_tx_stats_read, | |
576 | .general_stats_read = iwl_ucode_general_stats_read, | |
ffb7d896 | 577 | .bt_stats_read = iwl_ucode_bt_stats_read, |
b8c76267 | 578 | }, |
b74e31a9 | 579 | .recover_from_tx_stall = iwl_bg_monitor_recover, |
fa8f130c WYG |
580 | .check_plcp_health = iwl_good_plcp_health, |
581 | .check_ack_health = iwl_good_ack_health, | |
716c74b0 | 582 | .txfifo_flush = iwlagn_txfifo_flush, |
65550636 | 583 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, |
0975cc8f WYG |
584 | .tt_ops = { |
585 | .lower_power_detection = iwl_tt_is_low_power_state, | |
586 | .tt_power_mode = iwl_tt_current_power_mode, | |
587 | .ct_kill_check = iwl_check_for_ct_kill, | |
588 | } | |
672639de WYG |
589 | }; |
590 | ||
9e4afc21 JB |
591 | static struct iwl_lib_ops iwl6000g2b_lib = { |
592 | .set_hw_params = iwl6000_hw_set_hw_params, | |
593 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | |
594 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | |
595 | .txq_set_sched = iwlagn_txq_set_sched, | |
596 | .txq_agg_enable = iwlagn_txq_agg_enable, | |
597 | .txq_agg_disable = iwlagn_txq_agg_disable, | |
598 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | |
599 | .txq_free_tfd = iwl_hw_txq_free_tfd, | |
600 | .txq_init = iwl_hw_tx_queue_init, | |
601 | .rx_handler_setup = iwl6000g2b_rx_handler_setup, | |
602 | .setup_deferred_work = iwl6000g2b_bt_setup_deferred_work, | |
603 | .cancel_deferred_work = iwl6000g2b_bt_cancel_deferred_work, | |
604 | .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, | |
605 | .load_ucode = iwlagn_load_ucode, | |
606 | .dump_nic_event_log = iwl_dump_nic_event_log, | |
607 | .dump_nic_error_log = iwl_dump_nic_error_log, | |
608 | .dump_csr = iwl_dump_csr, | |
609 | .dump_fh = iwl_dump_fh, | |
610 | .init_alive_start = iwlagn_init_alive_start, | |
611 | .alive_notify = iwlagn_alive_notify, | |
612 | .send_tx_power = iwlagn_send_tx_power, | |
613 | .update_chain_flags = iwl_update_chain_flags, | |
614 | .set_channel_switch = iwl6000_hw_channel_switch, | |
615 | .apm_ops = { | |
616 | .init = iwl_apm_init, | |
617 | .stop = iwl_apm_stop, | |
618 | .config = iwl6000_nic_config, | |
619 | .set_pwr_src = iwl_set_pwr_src, | |
620 | }, | |
621 | .eeprom_ops = { | |
622 | .regulatory_bands = { | |
623 | EEPROM_REG_BAND_1_CHANNELS, | |
624 | EEPROM_REG_BAND_2_CHANNELS, | |
625 | EEPROM_REG_BAND_3_CHANNELS, | |
626 | EEPROM_REG_BAND_4_CHANNELS, | |
627 | EEPROM_REG_BAND_5_CHANNELS, | |
628 | EEPROM_6000_REG_BAND_24_HT40_CHANNELS, | |
629 | EEPROM_REG_BAND_52_HT40_CHANNELS | |
630 | }, | |
631 | .verify_signature = iwlcore_eeprom_verify_signature, | |
632 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | |
633 | .release_semaphore = iwlcore_eeprom_release_semaphore, | |
634 | .calib_version = iwlagn_eeprom_calib_version, | |
635 | .query_addr = iwlagn_eeprom_query_addr, | |
636 | .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, | |
637 | }, | |
638 | .post_associate = iwl_post_associate, | |
639 | .isr = iwl_isr_ict, | |
640 | .config_ap = iwl_config_ap, | |
641 | .temp_ops = { | |
642 | .temperature = iwlagn_temperature, | |
643 | .set_ct_kill = iwl6000_set_ct_threshold, | |
644 | .set_calib_version = iwl6000_set_calib_version, | |
645 | }, | |
646 | .manage_ibss_station = iwlagn_manage_ibss_station, | |
647 | .update_bcast_station = iwl_update_bcast_station, | |
648 | .debugfs_ops = { | |
649 | .rx_stats_read = iwl_ucode_rx_stats_read, | |
650 | .tx_stats_read = iwl_ucode_tx_stats_read, | |
651 | .general_stats_read = iwl_ucode_general_stats_read, | |
652 | .bt_stats_read = iwl_ucode_bt_stats_read, | |
653 | }, | |
654 | .recover_from_tx_stall = iwl_bg_monitor_recover, | |
655 | .check_plcp_health = iwl_good_plcp_health, | |
656 | .check_ack_health = iwl_good_ack_health, | |
657 | .txfifo_flush = iwlagn_txfifo_flush, | |
658 | .dev_txfifo_flush = iwlagn_dev_txfifo_flush, | |
659 | .tt_ops = { | |
660 | .lower_power_detection = iwl_tt_is_low_power_state, | |
661 | .tt_power_mode = iwl_tt_current_power_mode, | |
662 | .ct_kill_check = iwl_check_for_ct_kill, | |
663 | } | |
664 | }; | |
665 | ||
45d5d805 | 666 | static const struct iwl_ops iwl6000_ops = { |
672639de | 667 | .lib = &iwl6000_lib, |
7dc77dba WYG |
668 | .hcmd = &iwlagn_hcmd, |
669 | .utils = &iwlagn_hcmd_utils, | |
e932a609 | 670 | .led = &iwlagn_led_ops, |
29f35c14 JS |
671 | }; |
672 | ||
1808972f SZ |
673 | static struct iwl_hcmd_ops iwl6000g2b_hcmd = { |
674 | .rxon_assoc = iwlagn_send_rxon_assoc, | |
675 | .commit_rxon = iwl_commit_rxon, | |
676 | .set_rxon_chain = iwl_set_rxon_chain, | |
677 | .set_tx_ant = iwlagn_send_tx_ant_config, | |
670245ed | 678 | .send_bt_config = iwl6000g2b_send_bt_config, |
1808972f SZ |
679 | }; |
680 | ||
681 | static const struct iwl_ops iwl6000g2b_ops = { | |
9e4afc21 | 682 | .lib = &iwl6000g2b_lib, |
1808972f SZ |
683 | .hcmd = &iwl6000g2b_hcmd, |
684 | .utils = &iwlagn_hcmd_utils, | |
685 | .led = &iwlagn_led_ops, | |
686 | }; | |
687 | ||
95b13014 SZ |
688 | struct iwl_cfg iwl6000g2a_2agn_cfg = { |
689 | .name = "6000 Series 2x2 AGN Gen2a", | |
690 | .fw_name_pre = IWL6000G2A_FW_PRE, | |
4b3e8062 SZ |
691 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
692 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
0b5af201 JS |
693 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
694 | .ops = &iwl6000_ops, | |
695 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
4b3e8062 SZ |
696 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
697 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
0b5af201 JS |
698 | .num_of_queues = IWLAGN_NUM_QUEUES, |
699 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
700 | .mod_params = &iwlagn_mod_params, | |
701 | .valid_tx_ant = ANT_AB, | |
702 | .valid_rx_ant = ANT_AB, | |
703 | .pll_cfg_val = 0, | |
704 | .set_l0s = true, | |
705 | .use_bsm = false, | |
33e6f816 | 706 | .pa_type = IWL_PA_SYSTEM, |
0b5af201 JS |
707 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
708 | .shadow_ram_support = true, | |
709 | .ht_greenfield_support = true, | |
710 | .led_compensation = 51, | |
94597ab2 | 711 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
0b5af201 JS |
712 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
713 | .supports_idle = true, | |
714 | .adv_thermal_throttle = true, | |
715 | .support_ct_kill_exit = true, | |
716 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
717 | .chain_noise_scale = 1000, | |
ce60659a | 718 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
95b13014 | 719 | .max_event_log_size = 512, |
6e5c800e | 720 | .ucode_tracing = true, |
65d1f896 WYG |
721 | .sensitivity_calib_by_driver = true, |
722 | .chain_noise_calib_by_driver = true, | |
178d1596 | 723 | .need_dc_calib = true, |
0b5af201 JS |
724 | }; |
725 | ||
1808972f SZ |
726 | struct iwl_cfg iwl6000g2a_2abg_cfg = { |
727 | .name = "6000 Series 2x2 ABG Gen2a", | |
728 | .fw_name_pre = IWL6000G2A_FW_PRE, | |
729 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
730 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
731 | .sku = IWL_SKU_A|IWL_SKU_G, | |
732 | .ops = &iwl6000_ops, | |
733 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
734 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
735 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
736 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
737 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
738 | .mod_params = &iwlagn_mod_params, | |
739 | .valid_tx_ant = ANT_AB, | |
740 | .valid_rx_ant = ANT_AB, | |
741 | .pll_cfg_val = 0, | |
742 | .set_l0s = true, | |
743 | .use_bsm = false, | |
744 | .pa_type = IWL_PA_SYSTEM, | |
745 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
746 | .shadow_ram_support = true, | |
747 | .led_compensation = 51, | |
748 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
749 | .supports_idle = true, | |
750 | .adv_thermal_throttle = true, | |
751 | .support_ct_kill_exit = true, | |
752 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
753 | .chain_noise_scale = 1000, | |
ce60659a | 754 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
1808972f | 755 | .max_event_log_size = 512, |
679db794 WYG |
756 | .sensitivity_calib_by_driver = true, |
757 | .chain_noise_calib_by_driver = true, | |
178d1596 | 758 | .need_dc_calib = true, |
1808972f SZ |
759 | }; |
760 | ||
761 | struct iwl_cfg iwl6000g2a_2bg_cfg = { | |
762 | .name = "6000 Series 2x2 BG Gen2a", | |
763 | .fw_name_pre = IWL6000G2A_FW_PRE, | |
764 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
765 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
766 | .sku = IWL_SKU_G, | |
767 | .ops = &iwl6000_ops, | |
768 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
769 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
770 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
771 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
772 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
773 | .mod_params = &iwlagn_mod_params, | |
774 | .valid_tx_ant = ANT_AB, | |
775 | .valid_rx_ant = ANT_AB, | |
776 | .pll_cfg_val = 0, | |
777 | .set_l0s = true, | |
778 | .use_bsm = false, | |
779 | .pa_type = IWL_PA_SYSTEM, | |
780 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
781 | .shadow_ram_support = true, | |
782 | .led_compensation = 51, | |
783 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
784 | .supports_idle = true, | |
785 | .adv_thermal_throttle = true, | |
786 | .support_ct_kill_exit = true, | |
787 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
788 | .chain_noise_scale = 1000, | |
ce60659a | 789 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
1808972f | 790 | .max_event_log_size = 512, |
679db794 WYG |
791 | .sensitivity_calib_by_driver = true, |
792 | .chain_noise_calib_by_driver = true, | |
178d1596 | 793 | .need_dc_calib = true, |
1808972f SZ |
794 | }; |
795 | ||
796 | struct iwl_cfg iwl6000g2b_2agn_cfg = { | |
797 | .name = "6000 Series 2x2 AGN Gen2b", | |
798 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
799 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
800 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
801 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
802 | .ops = &iwl6000g2b_ops, | |
803 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
804 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
805 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
806 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
807 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
808 | .mod_params = &iwlagn_mod_params, | |
809 | .valid_tx_ant = ANT_AB, | |
810 | .valid_rx_ant = ANT_AB, | |
811 | .pll_cfg_val = 0, | |
812 | .set_l0s = true, | |
813 | .use_bsm = false, | |
814 | .pa_type = IWL_PA_SYSTEM, | |
815 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
816 | .shadow_ram_support = true, | |
817 | .ht_greenfield_support = true, | |
818 | .led_compensation = 51, | |
94597ab2 | 819 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
1808972f SZ |
820 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
821 | .supports_idle = true, | |
822 | .adv_thermal_throttle = true, | |
823 | .support_ct_kill_exit = true, | |
74e5c41b | 824 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 825 | .chain_noise_scale = 1000, |
3198c68c | 826 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 827 | .max_event_log_size = 512, |
679db794 WYG |
828 | .sensitivity_calib_by_driver = true, |
829 | .chain_noise_calib_by_driver = true, | |
178d1596 | 830 | .need_dc_calib = true, |
af8ee055 | 831 | .bt_statistics = true, |
670245ed JB |
832 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
833 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
834 | .advanced_bt_coexist = true, | |
1808972f SZ |
835 | }; |
836 | ||
837 | struct iwl_cfg iwl6000g2b_2abg_cfg = { | |
838 | .name = "6000 Series 2x2 ABG Gen2b", | |
839 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
840 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
841 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
842 | .sku = IWL_SKU_A|IWL_SKU_G, | |
843 | .ops = &iwl6000g2b_ops, | |
844 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
845 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
846 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
847 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
848 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
849 | .mod_params = &iwlagn_mod_params, | |
850 | .valid_tx_ant = ANT_AB, | |
851 | .valid_rx_ant = ANT_AB, | |
852 | .pll_cfg_val = 0, | |
853 | .set_l0s = true, | |
854 | .use_bsm = false, | |
855 | .pa_type = IWL_PA_SYSTEM, | |
856 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
857 | .shadow_ram_support = true, | |
858 | .led_compensation = 51, | |
859 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
860 | .supports_idle = true, | |
861 | .adv_thermal_throttle = true, | |
862 | .support_ct_kill_exit = true, | |
74e5c41b | 863 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 864 | .chain_noise_scale = 1000, |
3198c68c | 865 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 866 | .max_event_log_size = 512, |
679db794 WYG |
867 | .sensitivity_calib_by_driver = true, |
868 | .chain_noise_calib_by_driver = true, | |
178d1596 | 869 | .need_dc_calib = true, |
af8ee055 | 870 | .bt_statistics = true, |
670245ed JB |
871 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
872 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
873 | .advanced_bt_coexist = true, | |
1808972f SZ |
874 | }; |
875 | ||
9f6e1baf SZ |
876 | struct iwl_cfg iwl6000g2b_2bgn_cfg = { |
877 | .name = "6000 Series 2x2 BGN Gen2b", | |
878 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
879 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
880 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
881 | .sku = IWL_SKU_G|IWL_SKU_N, | |
882 | .ops = &iwl6000g2b_ops, | |
883 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
884 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
885 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
886 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
887 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
888 | .mod_params = &iwlagn_mod_params, | |
889 | .valid_tx_ant = ANT_AB, | |
890 | .valid_rx_ant = ANT_AB, | |
891 | .pll_cfg_val = 0, | |
892 | .set_l0s = true, | |
893 | .use_bsm = false, | |
894 | .pa_type = IWL_PA_SYSTEM, | |
895 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
896 | .shadow_ram_support = true, | |
897 | .ht_greenfield_support = true, | |
898 | .led_compensation = 51, | |
94597ab2 | 899 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
9f6e1baf SZ |
900 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
901 | .supports_idle = true, | |
902 | .adv_thermal_throttle = true, | |
903 | .support_ct_kill_exit = true, | |
74e5c41b | 904 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
9f6e1baf | 905 | .chain_noise_scale = 1000, |
3198c68c | 906 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
9f6e1baf | 907 | .max_event_log_size = 512, |
679db794 WYG |
908 | .sensitivity_calib_by_driver = true, |
909 | .chain_noise_calib_by_driver = true, | |
178d1596 | 910 | .need_dc_calib = true, |
af8ee055 | 911 | .bt_statistics = true, |
670245ed JB |
912 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
913 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
914 | .advanced_bt_coexist = true, | |
9f6e1baf SZ |
915 | }; |
916 | ||
1808972f SZ |
917 | struct iwl_cfg iwl6000g2b_2bg_cfg = { |
918 | .name = "6000 Series 2x2 BG Gen2b", | |
919 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
920 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
921 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
922 | .sku = IWL_SKU_G, | |
923 | .ops = &iwl6000g2b_ops, | |
924 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
925 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
926 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
927 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
928 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
929 | .mod_params = &iwlagn_mod_params, | |
930 | .valid_tx_ant = ANT_AB, | |
931 | .valid_rx_ant = ANT_AB, | |
932 | .pll_cfg_val = 0, | |
933 | .set_l0s = true, | |
934 | .use_bsm = false, | |
935 | .pa_type = IWL_PA_SYSTEM, | |
936 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
937 | .shadow_ram_support = true, | |
938 | .led_compensation = 51, | |
939 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
940 | .supports_idle = true, | |
941 | .adv_thermal_throttle = true, | |
942 | .support_ct_kill_exit = true, | |
74e5c41b | 943 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 944 | .chain_noise_scale = 1000, |
3198c68c | 945 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 946 | .max_event_log_size = 512, |
679db794 WYG |
947 | .sensitivity_calib_by_driver = true, |
948 | .chain_noise_calib_by_driver = true, | |
178d1596 | 949 | .need_dc_calib = true, |
af8ee055 | 950 | .bt_statistics = true, |
670245ed JB |
951 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
952 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
953 | .advanced_bt_coexist = true, | |
1808972f SZ |
954 | }; |
955 | ||
956 | struct iwl_cfg iwl6000g2b_bgn_cfg = { | |
957 | .name = "6000 Series 1x2 BGN Gen2b", | |
958 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
959 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
960 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
961 | .sku = IWL_SKU_G|IWL_SKU_N, | |
962 | .ops = &iwl6000g2b_ops, | |
963 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
964 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
965 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
966 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
967 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
968 | .mod_params = &iwlagn_mod_params, | |
969 | .valid_tx_ant = ANT_A, | |
970 | .valid_rx_ant = ANT_AB, | |
971 | .pll_cfg_val = 0, | |
972 | .set_l0s = true, | |
973 | .use_bsm = false, | |
974 | .pa_type = IWL_PA_SYSTEM, | |
975 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
976 | .shadow_ram_support = true, | |
977 | .ht_greenfield_support = true, | |
978 | .led_compensation = 51, | |
94597ab2 | 979 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
1808972f SZ |
980 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
981 | .supports_idle = true, | |
982 | .adv_thermal_throttle = true, | |
983 | .support_ct_kill_exit = true, | |
74e5c41b | 984 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 985 | .chain_noise_scale = 1000, |
3198c68c | 986 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 987 | .max_event_log_size = 512, |
679db794 WYG |
988 | .sensitivity_calib_by_driver = true, |
989 | .chain_noise_calib_by_driver = true, | |
178d1596 | 990 | .need_dc_calib = true, |
af8ee055 | 991 | .bt_statistics = true, |
670245ed JB |
992 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
993 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
994 | .advanced_bt_coexist = true, | |
1808972f SZ |
995 | }; |
996 | ||
997 | struct iwl_cfg iwl6000g2b_bg_cfg = { | |
998 | .name = "6000 Series 1x2 BG Gen2b", | |
999 | .fw_name_pre = IWL6000G2B_FW_PRE, | |
1000 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | |
1001 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | |
1002 | .sku = IWL_SKU_G, | |
1003 | .ops = &iwl6000g2b_ops, | |
1004 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
1005 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | |
1006 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | |
1007 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
1008 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
1009 | .mod_params = &iwlagn_mod_params, | |
1010 | .valid_tx_ant = ANT_A, | |
1011 | .valid_rx_ant = ANT_AB, | |
1012 | .pll_cfg_val = 0, | |
1013 | .set_l0s = true, | |
1014 | .use_bsm = false, | |
1015 | .pa_type = IWL_PA_SYSTEM, | |
1016 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
1017 | .shadow_ram_support = true, | |
1018 | .led_compensation = 51, | |
1019 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | |
1020 | .supports_idle = true, | |
1021 | .adv_thermal_throttle = true, | |
1022 | .support_ct_kill_exit = true, | |
74e5c41b | 1023 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, |
1808972f | 1024 | .chain_noise_scale = 1000, |
3198c68c | 1025 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, |
1808972f | 1026 | .max_event_log_size = 512, |
679db794 WYG |
1027 | .sensitivity_calib_by_driver = true, |
1028 | .chain_noise_calib_by_driver = true, | |
178d1596 | 1029 | .need_dc_calib = true, |
af8ee055 | 1030 | .bt_statistics = true, |
670245ed JB |
1031 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
1032 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | |
1033 | .advanced_bt_coexist = true, | |
1808972f SZ |
1034 | }; |
1035 | ||
95b13014 SZ |
1036 | /* |
1037 | * "i": Internal configuration, use internal Power Amplifier | |
1038 | */ | |
65b7998a | 1039 | struct iwl_cfg iwl6000i_2agn_cfg = { |
c11362c0 | 1040 | .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN", |
65b7998a WYG |
1041 | .fw_name_pre = IWL6000_FW_PRE, |
1042 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
1043 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
1044 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
1045 | .ops = &iwl6000_ops, | |
415e4993 | 1046 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1f4b9665 | 1047 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
00e70590 | 1048 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
1049 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1050 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1051 | .mod_params = &iwlagn_mod_params, |
65b7998a WYG |
1052 | .valid_tx_ant = ANT_BC, |
1053 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 1054 | .pll_cfg_val = 0, |
a6c5c731 | 1055 | .set_l0s = true, |
fadb3582 | 1056 | .use_bsm = false, |
65b7998a | 1057 | .pa_type = IWL_PA_INTERNAL, |
415e4993 WYG |
1058 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
1059 | .shadow_ram_support = true, | |
b261793d | 1060 | .ht_greenfield_support = true, |
f2d0d0e2 | 1061 | .led_compensation = 51, |
94597ab2 | 1062 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
d8c07e7a | 1063 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1064 | .supports_idle = true, |
6047b4f9 | 1065 | .adv_thermal_throttle = true, |
480e8407 | 1066 | .support_ct_kill_exit = true, |
3e4fb5fa | 1067 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1068 | .chain_noise_scale = 1000, |
ce60659a | 1069 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1070 | .max_event_log_size = 1024, |
6e5c800e | 1071 | .ucode_tracing = true, |
65d1f896 WYG |
1072 | .sensitivity_calib_by_driver = true, |
1073 | .chain_noise_calib_by_driver = true, | |
e1228374 JS |
1074 | }; |
1075 | ||
5953a62e | 1076 | struct iwl_cfg iwl6000i_2abg_cfg = { |
c11362c0 | 1077 | .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG", |
5953a62e WYG |
1078 | .fw_name_pre = IWL6000_FW_PRE, |
1079 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
1080 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
1081 | .sku = IWL_SKU_A|IWL_SKU_G, | |
1082 | .ops = &iwl6000_ops, | |
1083 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
1084 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | |
00e70590 | 1085 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
1086 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1087 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1088 | .mod_params = &iwlagn_mod_params, |
5953a62e WYG |
1089 | .valid_tx_ant = ANT_BC, |
1090 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 1091 | .pll_cfg_val = 0, |
a6c5c731 | 1092 | .set_l0s = true, |
fadb3582 | 1093 | .use_bsm = false, |
5953a62e WYG |
1094 | .pa_type = IWL_PA_INTERNAL, |
1095 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
1096 | .shadow_ram_support = true, | |
5953a62e | 1097 | .led_compensation = 51, |
d8c07e7a | 1098 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1099 | .supports_idle = true, |
6047b4f9 | 1100 | .adv_thermal_throttle = true, |
480e8407 | 1101 | .support_ct_kill_exit = true, |
3e4fb5fa | 1102 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1103 | .chain_noise_scale = 1000, |
ce60659a | 1104 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1105 | .max_event_log_size = 1024, |
6e5c800e | 1106 | .ucode_tracing = true, |
65d1f896 WYG |
1107 | .sensitivity_calib_by_driver = true, |
1108 | .chain_noise_calib_by_driver = true, | |
5953a62e WYG |
1109 | }; |
1110 | ||
1111 | struct iwl_cfg iwl6000i_2bg_cfg = { | |
c11362c0 | 1112 | .name = "Intel(R) Centrino(R) Advanced-N 6200 BG", |
5953a62e WYG |
1113 | .fw_name_pre = IWL6000_FW_PRE, |
1114 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
1115 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
1116 | .sku = IWL_SKU_G, | |
1117 | .ops = &iwl6000_ops, | |
1118 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
1119 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | |
00e70590 | 1120 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
1121 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1122 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1123 | .mod_params = &iwlagn_mod_params, |
5953a62e WYG |
1124 | .valid_tx_ant = ANT_BC, |
1125 | .valid_rx_ant = ANT_BC, | |
fadb3582 | 1126 | .pll_cfg_val = 0, |
a6c5c731 | 1127 | .set_l0s = true, |
fadb3582 | 1128 | .use_bsm = false, |
5953a62e WYG |
1129 | .pa_type = IWL_PA_INTERNAL, |
1130 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | |
1131 | .shadow_ram_support = true, | |
5953a62e | 1132 | .led_compensation = 51, |
d8c07e7a | 1133 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1134 | .supports_idle = true, |
6047b4f9 | 1135 | .adv_thermal_throttle = true, |
480e8407 | 1136 | .support_ct_kill_exit = true, |
3e4fb5fa | 1137 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1138 | .chain_noise_scale = 1000, |
ce60659a | 1139 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1140 | .max_event_log_size = 1024, |
6e5c800e | 1141 | .ucode_tracing = true, |
65d1f896 WYG |
1142 | .sensitivity_calib_by_driver = true, |
1143 | .chain_noise_calib_by_driver = true, | |
5953a62e WYG |
1144 | }; |
1145 | ||
e1228374 | 1146 | struct iwl_cfg iwl6050_2agn_cfg = { |
c11362c0 | 1147 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN", |
e1228374 JS |
1148 | .fw_name_pre = IWL6050_FW_PRE, |
1149 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
1150 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
1151 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
178d1596 | 1152 | .ops = &iwl6000_ops, |
415e4993 | 1153 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
32b7e244 | 1154 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
00e70590 | 1155 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
19e6cda0 WYG |
1156 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1157 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1158 | .mod_params = &iwlagn_mod_params, |
542cc793 JS |
1159 | .valid_tx_ant = ANT_AB, |
1160 | .valid_rx_ant = ANT_AB, | |
fadb3582 | 1161 | .pll_cfg_val = 0, |
a6c5c731 | 1162 | .set_l0s = true, |
fadb3582 | 1163 | .use_bsm = false, |
65b7998a | 1164 | .pa_type = IWL_PA_SYSTEM, |
3ab312a8 | 1165 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
415e4993 | 1166 | .shadow_ram_support = true, |
b261793d | 1167 | .ht_greenfield_support = true, |
f2d0d0e2 | 1168 | .led_compensation = 51, |
94597ab2 | 1169 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
d8c07e7a | 1170 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
03264339 SZ |
1171 | .supports_idle = true, |
1172 | .adv_thermal_throttle = true, | |
1173 | .support_ct_kill_exit = true, | |
1174 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | |
1175 | .chain_noise_scale = 1500, | |
ce60659a | 1176 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
03264339 SZ |
1177 | .max_event_log_size = 1024, |
1178 | .ucode_tracing = true, | |
1179 | .sensitivity_calib_by_driver = true, | |
1180 | .chain_noise_calib_by_driver = true, | |
1181 | .need_dc_calib = true, | |
1182 | }; | |
1183 | ||
1184 | struct iwl_cfg iwl6050g2_bgn_cfg = { | |
1185 | .name = "6050 Series 1x2 BGN Gen2", | |
1186 | .fw_name_pre = IWL6050_FW_PRE, | |
1187 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
1188 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
1189 | .sku = IWL_SKU_G|IWL_SKU_N, | |
1190 | .ops = &iwl6000_ops, | |
1191 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | |
1192 | .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, | |
1193 | .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, | |
1194 | .num_of_queues = IWLAGN_NUM_QUEUES, | |
1195 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
1196 | .mod_params = &iwlagn_mod_params, | |
1197 | .valid_tx_ant = ANT_A, | |
1198 | .valid_rx_ant = ANT_AB, | |
1199 | .pll_cfg_val = 0, | |
1200 | .set_l0s = true, | |
1201 | .use_bsm = false, | |
1202 | .pa_type = IWL_PA_SYSTEM, | |
1203 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | |
1204 | .shadow_ram_support = true, | |
1205 | .ht_greenfield_support = true, | |
1206 | .led_compensation = 51, | |
94597ab2 | 1207 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
03264339 | 1208 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1209 | .supports_idle = true, |
6047b4f9 | 1210 | .adv_thermal_throttle = true, |
480e8407 | 1211 | .support_ct_kill_exit = true, |
3e4fb5fa | 1212 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1213 | .chain_noise_scale = 1500, |
ce60659a | 1214 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1215 | .max_event_log_size = 1024, |
6e5c800e | 1216 | .ucode_tracing = true, |
65d1f896 WYG |
1217 | .sensitivity_calib_by_driver = true, |
1218 | .chain_noise_calib_by_driver = true, | |
178d1596 | 1219 | .need_dc_calib = true, |
e1228374 JS |
1220 | }; |
1221 | ||
5953a62e | 1222 | struct iwl_cfg iwl6050_2abg_cfg = { |
c11362c0 | 1223 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG", |
5953a62e WYG |
1224 | .fw_name_pre = IWL6050_FW_PRE, |
1225 | .ucode_api_max = IWL6050_UCODE_API_MAX, | |
1226 | .ucode_api_min = IWL6050_UCODE_API_MIN, | |
1227 | .sku = IWL_SKU_A|IWL_SKU_G, | |
178d1596 | 1228 | .ops = &iwl6000_ops, |
5953a62e | 1229 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
32b7e244 | 1230 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
00e70590 | 1231 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
19e6cda0 WYG |
1232 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1233 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1234 | .mod_params = &iwlagn_mod_params, |
5953a62e WYG |
1235 | .valid_tx_ant = ANT_AB, |
1236 | .valid_rx_ant = ANT_AB, | |
fadb3582 | 1237 | .pll_cfg_val = 0, |
a6c5c731 | 1238 | .set_l0s = true, |
fadb3582 | 1239 | .use_bsm = false, |
5953a62e | 1240 | .pa_type = IWL_PA_SYSTEM, |
3ab312a8 | 1241 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
5953a62e | 1242 | .shadow_ram_support = true, |
5953a62e | 1243 | .led_compensation = 51, |
d8c07e7a | 1244 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1245 | .supports_idle = true, |
6047b4f9 | 1246 | .adv_thermal_throttle = true, |
480e8407 | 1247 | .support_ct_kill_exit = true, |
3e4fb5fa | 1248 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1249 | .chain_noise_scale = 1500, |
ce60659a | 1250 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1251 | .max_event_log_size = 1024, |
6e5c800e | 1252 | .ucode_tracing = true, |
65d1f896 WYG |
1253 | .sensitivity_calib_by_driver = true, |
1254 | .chain_noise_calib_by_driver = true, | |
178d1596 | 1255 | .need_dc_calib = true, |
5953a62e WYG |
1256 | }; |
1257 | ||
e1228374 | 1258 | struct iwl_cfg iwl6000_3agn_cfg = { |
c11362c0 | 1259 | .name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN", |
e1228374 JS |
1260 | .fw_name_pre = IWL6000_FW_PRE, |
1261 | .ucode_api_max = IWL6000_UCODE_API_MAX, | |
1262 | .ucode_api_min = IWL6000_UCODE_API_MIN, | |
1263 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | |
29f35c14 | 1264 | .ops = &iwl6000_ops, |
415e4993 | 1265 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
1f4b9665 | 1266 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
00e70590 | 1267 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
19e6cda0 WYG |
1268 | .num_of_queues = IWLAGN_NUM_QUEUES, |
1269 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | |
348ee7cd | 1270 | .mod_params = &iwlagn_mod_params, |
c0bac76a JS |
1271 | .valid_tx_ant = ANT_ABC, |
1272 | .valid_rx_ant = ANT_ABC, | |
fadb3582 | 1273 | .pll_cfg_val = 0, |
a6c5c731 | 1274 | .set_l0s = true, |
fadb3582 | 1275 | .use_bsm = false, |
65b7998a | 1276 | .pa_type = IWL_PA_SYSTEM, |
415e4993 WYG |
1277 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
1278 | .shadow_ram_support = true, | |
b261793d | 1279 | .ht_greenfield_support = true, |
f2d0d0e2 | 1280 | .led_compensation = 51, |
94597ab2 | 1281 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
d8c07e7a | 1282 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
78f5fb7f | 1283 | .supports_idle = true, |
6047b4f9 | 1284 | .adv_thermal_throttle = true, |
480e8407 | 1285 | .support_ct_kill_exit = true, |
3e4fb5fa | 1286 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
d4fe5ac9 | 1287 | .chain_noise_scale = 1000, |
ce60659a | 1288 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
678b385d | 1289 | .max_event_log_size = 1024, |
6e5c800e | 1290 | .ucode_tracing = true, |
65d1f896 WYG |
1291 | .sensitivity_calib_by_driver = true, |
1292 | .chain_noise_calib_by_driver = true, | |
e1228374 JS |
1293 | }; |
1294 | ||
e1228374 JS |
1295 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
1296 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | |
95b13014 | 1297 | MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |
1808972f | 1298 | MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |