File Index
Files and directories
Sign in
FILE

2000.c

File preview with syntax highlighting.

linux-6.19.14/drivers/net/wireless/intel/iwlwifi/cfg/2000.c C
  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, 2025 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_family_base_params iwl2000_base = {
 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_family_base_params iwl2030_base = {
 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_eeprom_params iwl20x0_eeprom_params = {
 71	.regulatory_bands = {
 72		EEPROM_REG_BAND_1_CHANNELS,
 73		EEPROM_REG_BAND_2_CHANNELS,
 74		EEPROM_REG_BAND_3_CHANNELS,
 75		EEPROM_REG_BAND_4_CHANNELS,
 76		EEPROM_REG_BAND_5_CHANNELS,
 77		EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
 78		EEPROM_REGULATORY_BAND_NO_HT40,
 79	},
 80	.enhanced_txpower = true,
 81};
 82
 83const struct iwl_mac_cfg iwl2000_mac_cfg = {
 84	.device_family = IWL_DEVICE_FAMILY_2000,
 85	.base = &iwl2000_base,
 86};
 87
 88#define IWL_DEVICE_2000						\
 89	.fw_name_pre = IWL2000_FW_PRE,				\
 90	.ucode_api_max = IWL2000_UCODE_API_MAX,			\
 91	.ucode_api_min = IWL2000_UCODE_API_MIN,			\
 92	.max_inst_size = IWL60_RTC_INST_SIZE,			\
 93	.max_data_size = IWL60_RTC_DATA_SIZE,			\
 94	.nvm_ver = EEPROM_2000_EEPROM_VERSION,			\
 95	.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION,		\
 96	.eeprom_params = &iwl20x0_eeprom_params,		\
 97	.led_mode = IWL_LED_RF_STATE
 98
 99
100const struct iwl_rf_cfg iwl2000_2bgn_cfg = {
101	IWL_DEVICE_2000,
102	.ht_params = {
103		.ht_greenfield_support = true,
104		.use_rts_for_aggregation = true, /* use rts/cts protection */
105		.ht40_bands = BIT(NL80211_BAND_2GHZ),
106	},
107};
108
109const char iwl2000_2bgn_name[] = "Intel(R) Centrino(R) Wireless-N 2200 BGN";
110const char iwl2000_2bgn_d_name[] = "Intel(R) Centrino(R) Wireless-N 2200D BGN";
111
112const struct iwl_mac_cfg iwl2030_mac_cfg = {
113	.device_family = IWL_DEVICE_FAMILY_2030,
114	.base = &iwl2030_base,
115};
116
117#define IWL_DEVICE_2030						\
118	.fw_name_pre = IWL2030_FW_PRE,				\
119	.ucode_api_max = IWL2030_UCODE_API_MAX,			\
120	.ucode_api_min = IWL2030_UCODE_API_MIN,			\
121	.max_inst_size = IWL60_RTC_INST_SIZE,			\
122	.max_data_size = IWL60_RTC_DATA_SIZE,			\
123	.nvm_ver = EEPROM_2000_EEPROM_VERSION,		\
124	.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
125	.eeprom_params = &iwl20x0_eeprom_params,		\
126	.led_mode = IWL_LED_RF_STATE
127
128const struct iwl_rf_cfg iwl2030_2bgn_cfg = {
129	IWL_DEVICE_2030,
130	.ht_params = {
131		.ht_greenfield_support = true,
132		.use_rts_for_aggregation = true, /* use rts/cts protection */
133		.ht40_bands = BIT(NL80211_BAND_2GHZ),
134	},
135};
136
137const char iwl2030_2bgn_name[] = "Intel(R) Centrino(R) Wireless-N 2230 BGN";
138
139const struct iwl_mac_cfg iwl105_mac_cfg = {
140	.device_family = IWL_DEVICE_FAMILY_105,
141	.base = &iwl2000_base,
142};
143
144#define IWL_DEVICE_105						\
145	.fw_name_pre = IWL105_FW_PRE,				\
146	.ucode_api_max = IWL105_UCODE_API_MAX,			\
147	.ucode_api_min = IWL105_UCODE_API_MIN,			\
148	.max_inst_size = IWL60_RTC_INST_SIZE,			\
149	.max_data_size = IWL60_RTC_DATA_SIZE,			\
150	.nvm_ver = EEPROM_2000_EEPROM_VERSION,		\
151	.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
152	.eeprom_params = &iwl20x0_eeprom_params,		\
153	.led_mode = IWL_LED_RF_STATE,				\
154	.rx_with_siso_diversity = true
155
156const struct iwl_rf_cfg iwl105_bgn_cfg = {
157	IWL_DEVICE_105,
158	.ht_params = {
159		.ht_greenfield_support = true,
160		.use_rts_for_aggregation = true, /* use rts/cts protection */
161		.ht40_bands = BIT(NL80211_BAND_2GHZ),
162	},
163};
164
165const char iwl105_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 105 BGN";
166const char iwl105_bgn_d_name[] = "Intel(R) Centrino(R) Wireless-N 105D BGN";
167
168const struct iwl_mac_cfg iwl135_mac_cfg = {
169	.device_family = IWL_DEVICE_FAMILY_135,
170	.base = &iwl2030_base,
171};
172
173#define IWL_DEVICE_135						\
174	.fw_name_pre = IWL135_FW_PRE,				\
175	.ucode_api_max = IWL135_UCODE_API_MAX,			\
176	.ucode_api_min = IWL135_UCODE_API_MIN,			\
177	.max_inst_size = IWL60_RTC_INST_SIZE,			\
178	.max_data_size = IWL60_RTC_DATA_SIZE,			\
179	.nvm_ver = EEPROM_2000_EEPROM_VERSION,		\
180	.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION,	\
181	.eeprom_params = &iwl20x0_eeprom_params,		\
182	.led_mode = IWL_LED_RF_STATE,				\
183	.rx_with_siso_diversity = true
184
185const struct iwl_rf_cfg iwl135_bgn_cfg = {
186	IWL_DEVICE_135,
187	.ht_params = {
188		.ht_greenfield_support = true,
189		.use_rts_for_aggregation = true, /* use rts/cts protection */
190		.ht40_bands = BIT(NL80211_BAND_2GHZ),
191	},
192};
193
194const char iwl135_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 135 BGN";
195
196MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
197MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
198MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));
199MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX));
~/ Read-only file preview.