Commit | Line | Data |
---|---|---|
5a6a256e TW |
1 | /****************************************************************************** |
2 | * | |
51368bf7 | 3 | * Copyright(c) 2007 - 2014 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" | |
5a6a256e | 32 | |
a0987a8d | 33 | /* Highest firmware API version supported */ |
41504cce | 34 | #define IWL5000_UCODE_API_MAX 5 |
39e6d225 | 35 | #define IWL5150_UCODE_API_MAX 2 |
5a6a256e | 36 | |
78cbcf2b MV |
37 | /* Oldest version we won't warn about */ |
38 | #define IWL5000_UCODE_API_OK 5 | |
39 | #define IWL5150_UCODE_API_OK 2 | |
40 | ||
a0987a8d RC |
41 | /* Lowest firmware API version supported */ |
42 | #define IWL5000_UCODE_API_MIN 1 | |
43 | #define IWL5150_UCODE_API_MIN 1 | |
44 | ||
586aed96 JB |
45 | /* EEPROM versions */ |
46 | #define EEPROM_5000_TX_POWER_VERSION (4) | |
47 | #define EEPROM_5000_EEPROM_VERSION (0x11A) | |
48 | #define EEPROM_5050_TX_POWER_VERSION (4) | |
49 | #define EEPROM_5050_EEPROM_VERSION (0x21E) | |
50 | ||
a0987a8d | 51 | #define IWL5000_FW_PRE "iwlwifi-5000-" |
8fcbd4dc | 52 | #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode" |
a0987a8d RC |
53 | |
54 | #define IWL5150_FW_PRE "iwlwifi-5150-" | |
8fcbd4dc | 55 | #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode" |
4e062f99 | 56 | |
6794f3ee | 57 | static const struct iwl_base_params iwl5000_base_params = { |
19e6cda0 | 58 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
19e6cda0 | 59 | .num_of_queues = IWLAGN_NUM_QUEUES, |
fadb3582 | 60 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
f2d0d0e2 | 61 | .led_compensation = 51, |
6de4902e | 62 | .wd_timeout = IWL_WATCHDOG_DISABLED, |
678b385d | 63 | .max_event_log_size = 512, |
e03bbb62 | 64 | .scd_chain_ext_wa = true, |
5a6a256e | 65 | }; |
6794f3ee JB |
66 | |
67 | static const struct iwl_ht_params iwl5000_ht_params = { | |
7cb1b088 | 68 | .ht_greenfield_support = true, |
d370493f | 69 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), |
7cb1b088 WYG |
70 | }; |
71 | ||
26a7ca9a JB |
72 | static const struct iwl_eeprom_params iwl5000_eeprom_params = { |
73 | .regulatory_bands = { | |
74 | EEPROM_REG_BAND_1_CHANNELS, | |
75 | EEPROM_REG_BAND_2_CHANNELS, | |
76 | EEPROM_REG_BAND_3_CHANNELS, | |
77 | EEPROM_REG_BAND_4_CHANNELS, | |
78 | EEPROM_REG_BAND_5_CHANNELS, | |
79 | EEPROM_REG_BAND_24_HT40_CHANNELS, | |
80 | EEPROM_REG_BAND_52_HT40_CHANNELS | |
81 | }, | |
82 | }; | |
83 | ||
65af8dea WYG |
84 | #define IWL_DEVICE_5000 \ |
85 | .fw_name_pre = IWL5000_FW_PRE, \ | |
86 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ | |
78cbcf2b | 87 | .ucode_api_ok = IWL5000_UCODE_API_OK, \ |
65af8dea | 88 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ |
2d771cb6 | 89 | .device_family = IWL_DEVICE_FAMILY_5000, \ |
dae66d0d EG |
90 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
91 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | |
b7998c8b EL |
92 | .nvm_ver = EEPROM_5000_EEPROM_VERSION, \ |
93 | .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ | |
65af8dea | 94 | .base_params = &iwl5000_base_params, \ |
26a7ca9a | 95 | .eeprom_params = &iwl5000_eeprom_params, \ |
65af8dea WYG |
96 | .led_mode = IWL_LED_BLINK |
97 | ||
706c4ff6 | 98 | const struct iwl_cfg iwl5300_agn_cfg = { |
7cb1b088 | 99 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", |
65af8dea | 100 | IWL_DEVICE_5000, |
2845fd85 JB |
101 | /* at least EEPROM 0x11A has wrong info */ |
102 | .valid_tx_ant = ANT_ABC, /* .cfg overwrite */ | |
103 | .valid_rx_ant = ANT_ABC, /* .cfg overwrite */ | |
7cb1b088 WYG |
104 | .ht_params = &iwl5000_ht_params, |
105 | }; | |
5a6a256e | 106 | |
706c4ff6 | 107 | const struct iwl_cfg iwl5100_bgn_cfg = { |
c11362c0 | 108 | .name = "Intel(R) WiFi Link 5100 BGN", |
65af8dea | 109 | IWL_DEVICE_5000, |
dbbf1755 WYG |
110 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
111 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | |
7cb1b088 | 112 | .ht_params = &iwl5000_ht_params, |
47408639 EK |
113 | }; |
114 | ||
706c4ff6 | 115 | const struct iwl_cfg iwl5100_abg_cfg = { |
c11362c0 | 116 | .name = "Intel(R) WiFi Link 5100 ABG", |
65af8dea | 117 | IWL_DEVICE_5000, |
dbbf1755 WYG |
118 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
119 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | |
47408639 EK |
120 | }; |
121 | ||
706c4ff6 | 122 | const struct iwl_cfg iwl5100_agn_cfg = { |
c11362c0 | 123 | .name = "Intel(R) WiFi Link 5100 AGN", |
65af8dea | 124 | IWL_DEVICE_5000, |
dbbf1755 WYG |
125 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
126 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | |
7cb1b088 | 127 | .ht_params = &iwl5000_ht_params, |
5a6a256e TW |
128 | }; |
129 | ||
706c4ff6 | 130 | const struct iwl_cfg iwl5350_agn_cfg = { |
c11362c0 | 131 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", |
a0987a8d RC |
132 | .fw_name_pre = IWL5000_FW_PRE, |
133 | .ucode_api_max = IWL5000_UCODE_API_MAX, | |
78cbcf2b | 134 | .ucode_api_ok = IWL5000_UCODE_API_OK, |
a0987a8d | 135 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
2d771cb6 | 136 | .device_family = IWL_DEVICE_FAMILY_5000, |
dae66d0d EG |
137 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
138 | .max_data_size = IWLAGN_RTC_DATA_SIZE, | |
b7998c8b EL |
139 | .nvm_ver = EEPROM_5050_EEPROM_VERSION, |
140 | .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, | |
7cb1b088 | 141 | .base_params = &iwl5000_base_params, |
26a7ca9a | 142 | .eeprom_params = &iwl5000_eeprom_params, |
7cb1b088 | 143 | .ht_params = &iwl5000_ht_params, |
564b344c | 144 | .led_mode = IWL_LED_BLINK, |
50619ac9 | 145 | .internal_wimax_coex = true, |
5a6a256e TW |
146 | }; |
147 | ||
65af8dea WYG |
148 | #define IWL_DEVICE_5150 \ |
149 | .fw_name_pre = IWL5150_FW_PRE, \ | |
150 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ | |
78cbcf2b | 151 | .ucode_api_ok = IWL5150_UCODE_API_OK, \ |
65af8dea | 152 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ |
2d771cb6 | 153 | .device_family = IWL_DEVICE_FAMILY_5150, \ |
dae66d0d EG |
154 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
155 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | |
b7998c8b EL |
156 | .nvm_ver = EEPROM_5050_EEPROM_VERSION, \ |
157 | .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ | |
65af8dea | 158 | .base_params = &iwl5000_base_params, \ |
26a7ca9a | 159 | .eeprom_params = &iwl5000_eeprom_params, \ |
65af8dea WYG |
160 | .led_mode = IWL_LED_BLINK, \ |
161 | .internal_wimax_coex = true | |
162 | ||
706c4ff6 | 163 | const struct iwl_cfg iwl5150_agn_cfg = { |
c11362c0 | 164 | .name = "Intel(R) WiMAX/WiFi Link 5150 AGN", |
65af8dea | 165 | IWL_DEVICE_5150, |
7cb1b088 | 166 | .ht_params = &iwl5000_ht_params, |
65af8dea | 167 | |
7100e924 TW |
168 | }; |
169 | ||
706c4ff6 | 170 | const struct iwl_cfg iwl5150_abg_cfg = { |
c11362c0 | 171 | .name = "Intel(R) WiMAX/WiFi Link 5150 ABG", |
65af8dea | 172 | IWL_DEVICE_5150, |
7100e924 TW |
173 | }; |
174 | ||
78cbcf2b MV |
175 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); |
176 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); |