Loading...
1// SPDX-License-Identifier: GPL-2.0-only
2/******************************************************************************
3 *
4 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
5 * Copyright(c) 2018 - 2020, 2023 Intel Corporation
6 *****************************************************************************/
7
8#include <linux/module.h>
9#include <linux/stringify.h>
10#include "iwl-config.h"
11#include "iwl-agn-hw.h"
12#include "dvm/commands.h" /* needed for BT for now */
13
14/* Highest firmware API version supported */
15#define IWL2030_UCODE_API_MAX 6
16#define IWL2000_UCODE_API_MAX 6
17#define IWL105_UCODE_API_MAX 6
18#define IWL135_UCODE_API_MAX 6
19
20/* Lowest firmware API version supported */
21#define IWL2030_UCODE_API_MIN 5
22#define IWL2000_UCODE_API_MIN 5
23#define IWL105_UCODE_API_MIN 5
24#define IWL135_UCODE_API_MIN 5
25
26/* EEPROM version */
27#define EEPROM_2000_TX_POWER_VERSION (6)
28#define EEPROM_2000_EEPROM_VERSION (0x805)
29
30
31#define IWL2030_FW_PRE "iwlwifi-2030"
32#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE "-" __stringify(api) ".ucode"
33
34#define IWL2000_FW_PRE "iwlwifi-2000"
35#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE "-" __stringify(api) ".ucode"
36
37#define IWL105_FW_PRE "iwlwifi-105"
38#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE "-" __stringify(api) ".ucode"
39
40#define IWL135_FW_PRE "iwlwifi-135"
41#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE "-" __stringify(api) ".ucode"
42
43static const struct iwl_base_params iwl2000_base_params = {
44 .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
45 .num_of_queues = IWLAGN_NUM_QUEUES,
46 .max_tfd_queue_size = 256,
47 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
48 .shadow_ram_support = true,
49 .led_compensation = 51,
50 .wd_timeout = IWL_DEF_WD_TIMEOUT,
51 .max_event_log_size = 512,
52 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
53 .scd_chain_ext_wa = true,
54};
55
56
57static const struct iwl_base_params iwl2030_base_params = {
58 .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
59 .num_of_queues = IWLAGN_NUM_QUEUES,
60 .max_tfd_queue_size = 256,
61 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
62 .shadow_ram_support = true,
63 .led_compensation = 57,
64 .wd_timeout = IWL_LONG_WD_TIMEOUT,
65 .max_event_log_size = 512,
66 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
67 .scd_chain_ext_wa = true,
68};
69
70static const struct iwl_ht_params iwl2000_ht_params = {
71 .ht_greenfield_support = true,
72 .use_rts_for_aggregation = true, /* use rts/cts protection */
73 .ht40_bands = BIT(NL80211_BAND_2GHZ),
74};
75
76static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
77 .regulatory_bands = {
78 EEPROM_REG_BAND_1_CHANNELS,
79 EEPROM_REG_BAND_2_CHANNELS,
80 EEPROM_REG_BAND_3_CHANNELS,
81 EEPROM_REG_BAND_4_CHANNELS,
82 EEPROM_REG_BAND_5_CHANNELS,
83 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
84 EEPROM_REGULATORY_BAND_NO_HT40,
85 },
86 .enhanced_txpower = true,
87};
88
89#define IWL_DEVICE_2000 \
90 .fw_name_pre = IWL2000_FW_PRE, \
91 .ucode_api_max = IWL2000_UCODE_API_MAX, \
92 .ucode_api_min = IWL2000_UCODE_API_MIN, \
93 .trans.device_family = IWL_DEVICE_FAMILY_2000, \
94 .max_inst_size = IWL60_RTC_INST_SIZE, \
95 .max_data_size = IWL60_RTC_DATA_SIZE, \
96 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
97 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
98 .trans.base_params = &iwl2000_base_params, \
99 .eeprom_params = &iwl20x0_eeprom_params, \
100 .led_mode = IWL_LED_RF_STATE
101
102
103const struct iwl_cfg iwl2000_2bgn_cfg = {
104 .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN",
105 IWL_DEVICE_2000,
106 .ht_params = &iwl2000_ht_params,
107};
108
109const struct iwl_cfg iwl2000_2bgn_d_cfg = {
110 .name = "Intel(R) Centrino(R) Wireless-N 2200D BGN",
111 IWL_DEVICE_2000,
112 .ht_params = &iwl2000_ht_params,
113};
114
115#define IWL_DEVICE_2030 \
116 .fw_name_pre = IWL2030_FW_PRE, \
117 .ucode_api_max = IWL2030_UCODE_API_MAX, \
118 .ucode_api_min = IWL2030_UCODE_API_MIN, \
119 .trans.device_family = IWL_DEVICE_FAMILY_2030, \
120 .max_inst_size = IWL60_RTC_INST_SIZE, \
121 .max_data_size = IWL60_RTC_DATA_SIZE, \
122 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
123 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
124 .trans.base_params = &iwl2030_base_params, \
125 .eeprom_params = &iwl20x0_eeprom_params, \
126 .led_mode = IWL_LED_RF_STATE
127
128const struct iwl_cfg iwl2030_2bgn_cfg = {
129 .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
130 IWL_DEVICE_2030,
131 .ht_params = &iwl2000_ht_params,
132};
133
134#define IWL_DEVICE_105 \
135 .fw_name_pre = IWL105_FW_PRE, \
136 .ucode_api_max = IWL105_UCODE_API_MAX, \
137 .ucode_api_min = IWL105_UCODE_API_MIN, \
138 .trans.device_family = IWL_DEVICE_FAMILY_105, \
139 .max_inst_size = IWL60_RTC_INST_SIZE, \
140 .max_data_size = IWL60_RTC_DATA_SIZE, \
141 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
142 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
143 .trans.base_params = &iwl2000_base_params, \
144 .eeprom_params = &iwl20x0_eeprom_params, \
145 .led_mode = IWL_LED_RF_STATE, \
146 .rx_with_siso_diversity = true
147
148const struct iwl_cfg iwl105_bgn_cfg = {
149 .name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
150 IWL_DEVICE_105,
151 .ht_params = &iwl2000_ht_params,
152};
153
154const struct iwl_cfg iwl105_bgn_d_cfg = {
155 .name = "Intel(R) Centrino(R) Wireless-N 105D BGN",
156 IWL_DEVICE_105,
157 .ht_params = &iwl2000_ht_params,
158};
159
160#define IWL_DEVICE_135 \
161 .fw_name_pre = IWL135_FW_PRE, \
162 .ucode_api_max = IWL135_UCODE_API_MAX, \
163 .ucode_api_min = IWL135_UCODE_API_MIN, \
164 .trans.device_family = IWL_DEVICE_FAMILY_135, \
165 .max_inst_size = IWL60_RTC_INST_SIZE, \
166 .max_data_size = IWL60_RTC_DATA_SIZE, \
167 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
168 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
169 .trans.base_params = &iwl2030_base_params, \
170 .eeprom_params = &iwl20x0_eeprom_params, \
171 .led_mode = IWL_LED_RF_STATE, \
172 .rx_with_siso_diversity = true
173
174const struct iwl_cfg iwl135_bgn_cfg = {
175 .name = "Intel(R) Centrino(R) Wireless-N 135 BGN",
176 IWL_DEVICE_135,
177 .ht_params = &iwl2000_ht_params,
178};
179
180MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
181MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
182MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));
183MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX));
1/******************************************************************************
2 *
3 * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
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 <linuxwifi@intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27#include <linux/module.h>
28#include <linux/stringify.h>
29#include "iwl-config.h"
30#include "iwl-agn-hw.h"
31#include "dvm/commands.h" /* needed for BT for now */
32
33/* Highest firmware API version supported */
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/* Lowest firmware API version supported */
40#define IWL2030_UCODE_API_MIN 5
41#define IWL2000_UCODE_API_MIN 5
42#define IWL105_UCODE_API_MIN 5
43#define IWL135_UCODE_API_MIN 5
44
45/* EEPROM version */
46#define EEPROM_2000_TX_POWER_VERSION (6)
47#define EEPROM_2000_EEPROM_VERSION (0x805)
48
49
50#define IWL2030_FW_PRE "iwlwifi-2030-"
51#define IWL2030_MODULE_FIRMWARE(api) IWL2030_FW_PRE __stringify(api) ".ucode"
52
53#define IWL2000_FW_PRE "iwlwifi-2000-"
54#define IWL2000_MODULE_FIRMWARE(api) IWL2000_FW_PRE __stringify(api) ".ucode"
55
56#define IWL105_FW_PRE "iwlwifi-105-"
57#define IWL105_MODULE_FIRMWARE(api) IWL105_FW_PRE __stringify(api) ".ucode"
58
59#define IWL135_FW_PRE "iwlwifi-135-"
60#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode"
61
62static const struct iwl_base_params iwl2000_base_params = {
63 .eeprom_size = OTP_LOW_IMAGE_SIZE,
64 .num_of_queues = IWLAGN_NUM_QUEUES,
65 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
66 .shadow_ram_support = true,
67 .led_compensation = 51,
68 .wd_timeout = IWL_DEF_WD_TIMEOUT,
69 .max_event_log_size = 512,
70 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
71 .scd_chain_ext_wa = true,
72};
73
74
75static const struct iwl_base_params iwl2030_base_params = {
76 .eeprom_size = OTP_LOW_IMAGE_SIZE,
77 .num_of_queues = IWLAGN_NUM_QUEUES,
78 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
79 .shadow_ram_support = true,
80 .led_compensation = 57,
81 .wd_timeout = IWL_LONG_WD_TIMEOUT,
82 .max_event_log_size = 512,
83 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
84 .scd_chain_ext_wa = true,
85};
86
87static const struct iwl_ht_params iwl2000_ht_params = {
88 .ht_greenfield_support = true,
89 .use_rts_for_aggregation = true, /* use rts/cts protection */
90 .ht40_bands = BIT(NL80211_BAND_2GHZ),
91};
92
93static 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
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, \
110 .device_family = IWL_DEVICE_FAMILY_2000, \
111 .max_inst_size = IWL60_RTC_INST_SIZE, \
112 .max_data_size = IWL60_RTC_DATA_SIZE, \
113 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
114 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
115 .base_params = &iwl2000_base_params, \
116 .eeprom_params = &iwl20x0_eeprom_params, \
117 .led_mode = IWL_LED_RF_STATE, \
118 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
119
120
121const struct iwl_cfg iwl2000_2bgn_cfg = {
122 .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN",
123 IWL_DEVICE_2000,
124 .ht_params = &iwl2000_ht_params,
125};
126
127const struct iwl_cfg iwl2000_2bgn_d_cfg = {
128 .name = "Intel(R) Centrino(R) Wireless-N 2200D BGN",
129 IWL_DEVICE_2000,
130 .ht_params = &iwl2000_ht_params,
131};
132
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, \
137 .device_family = IWL_DEVICE_FAMILY_2030, \
138 .max_inst_size = IWL60_RTC_INST_SIZE, \
139 .max_data_size = IWL60_RTC_DATA_SIZE, \
140 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
141 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
142 .base_params = &iwl2030_base_params, \
143 .eeprom_params = &iwl20x0_eeprom_params, \
144 .led_mode = IWL_LED_RF_STATE, \
145 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
146
147const struct iwl_cfg iwl2030_2bgn_cfg = {
148 .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
149 IWL_DEVICE_2030,
150 .ht_params = &iwl2000_ht_params,
151};
152
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, \
157 .device_family = IWL_DEVICE_FAMILY_105, \
158 .max_inst_size = IWL60_RTC_INST_SIZE, \
159 .max_data_size = IWL60_RTC_DATA_SIZE, \
160 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
161 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
162 .base_params = &iwl2000_base_params, \
163 .eeprom_params = &iwl20x0_eeprom_params, \
164 .led_mode = IWL_LED_RF_STATE, \
165 .rx_with_siso_diversity = true, \
166 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
167
168const struct iwl_cfg iwl105_bgn_cfg = {
169 .name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
170 IWL_DEVICE_105,
171 .ht_params = &iwl2000_ht_params,
172};
173
174const struct iwl_cfg iwl105_bgn_d_cfg = {
175 .name = "Intel(R) Centrino(R) Wireless-N 105D BGN",
176 IWL_DEVICE_105,
177 .ht_params = &iwl2000_ht_params,
178};
179
180#define IWL_DEVICE_135 \
181 .fw_name_pre = IWL135_FW_PRE, \
182 .ucode_api_max = IWL135_UCODE_API_MAX, \
183 .ucode_api_min = IWL135_UCODE_API_MIN, \
184 .device_family = IWL_DEVICE_FAMILY_135, \
185 .max_inst_size = IWL60_RTC_INST_SIZE, \
186 .max_data_size = IWL60_RTC_DATA_SIZE, \
187 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
188 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
189 .base_params = &iwl2030_base_params, \
190 .eeprom_params = &iwl20x0_eeprom_params, \
191 .led_mode = IWL_LED_RF_STATE, \
192 .rx_with_siso_diversity = true, \
193 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
194
195const struct iwl_cfg iwl135_bgn_cfg = {
196 .name = "Intel(R) Centrino(R) Wireless-N 135 BGN",
197 IWL_DEVICE_135,
198 .ht_params = &iwl2000_ht_params,
199};
200
201MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
202MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
203MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));
204MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX));