]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - drivers/net/wireless/intel/iwlwifi/cfg/5000.c
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / intel / iwlwifi / cfg / 5000.c
CommitLineData
4273a380 1// SPDX-License-Identifier: GPL-2.0-only
5a6a256e
TW
2/******************************************************************************
3 *
51368bf7 4 * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
5c9adef9 5 * Copyright(c) 2018 - 2019 Intel Corporation
5a6a256e 6 *
5a6a256e 7 * Contact Information:
d01c5366 8 * Intel Linux Wireless <linuxwifi@intel.com>
5a6a256e
TW
9 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
10 *
11 *****************************************************************************/
12
5a6a256e 13#include <linux/module.h>
8fcbd4dc 14#include <linux/stringify.h>
e9676695 15#include "iwl-config.h"
0db19cde 16#include "iwl-agn-hw.h"
5a6a256e 17
a0987a8d 18/* Highest firmware API version supported */
41504cce 19#define IWL5000_UCODE_API_MAX 5
39e6d225 20#define IWL5150_UCODE_API_MAX 2
5a6a256e 21
a0987a8d
RC
22/* Lowest firmware API version supported */
23#define IWL5000_UCODE_API_MIN 1
24#define IWL5150_UCODE_API_MIN 1
25
586aed96
JB
26/* EEPROM versions */
27#define EEPROM_5000_TX_POWER_VERSION (4)
28#define EEPROM_5000_EEPROM_VERSION (0x11A)
29#define EEPROM_5050_TX_POWER_VERSION (4)
30#define EEPROM_5050_EEPROM_VERSION (0x21E)
31
a0987a8d 32#define IWL5000_FW_PRE "iwlwifi-5000-"
8fcbd4dc 33#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
a0987a8d
RC
34
35#define IWL5150_FW_PRE "iwlwifi-5150-"
8fcbd4dc 36#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
4e062f99 37
6794f3ee 38static const struct iwl_base_params iwl5000_base_params = {
19e6cda0 39 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
19e6cda0 40 .num_of_queues = IWLAGN_NUM_QUEUES,
7b3e42ea 41 .max_tfd_queue_size = 256,
77d76931 42 .pll_cfg = true,
f2d0d0e2 43 .led_compensation = 51,
6de4902e 44 .wd_timeout = IWL_WATCHDOG_DISABLED,
678b385d 45 .max_event_log_size = 512,
e03bbb62 46 .scd_chain_ext_wa = true,
5a6a256e 47};
6794f3ee
JB
48
49static const struct iwl_ht_params iwl5000_ht_params = {
7cb1b088 50 .ht_greenfield_support = true,
57fbcce3 51 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
7cb1b088
WYG
52};
53
26a7ca9a
JB
54static const struct iwl_eeprom_params iwl5000_eeprom_params = {
55 .regulatory_bands = {
56 EEPROM_REG_BAND_1_CHANNELS,
57 EEPROM_REG_BAND_2_CHANNELS,
58 EEPROM_REG_BAND_3_CHANNELS,
59 EEPROM_REG_BAND_4_CHANNELS,
60 EEPROM_REG_BAND_5_CHANNELS,
61 EEPROM_REG_BAND_24_HT40_CHANNELS,
62 EEPROM_REG_BAND_52_HT40_CHANNELS
63 },
64};
65
65af8dea
WYG
66#define IWL_DEVICE_5000 \
67 .fw_name_pre = IWL5000_FW_PRE, \
68 .ucode_api_max = IWL5000_UCODE_API_MAX, \
69 .ucode_api_min = IWL5000_UCODE_API_MIN, \
2d771cb6 70 .device_family = IWL_DEVICE_FAMILY_5000, \
dae66d0d
EG
71 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
72 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
b7998c8b
EL
73 .nvm_ver = EEPROM_5000_EEPROM_VERSION, \
74 .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
65af8dea 75 .base_params = &iwl5000_base_params, \
26a7ca9a 76 .eeprom_params = &iwl5000_eeprom_params, \
540623ca 77 .led_mode = IWL_LED_BLINK, \
a8cbb46f
GBA
78 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
79 .csr = &iwl_csr_v1
65af8dea 80
706c4ff6 81const struct iwl_cfg iwl5300_agn_cfg = {
7cb1b088 82 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
65af8dea 83 IWL_DEVICE_5000,
2845fd85
JB
84 /* at least EEPROM 0x11A has wrong info */
85 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
86 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
7cb1b088
WYG
87 .ht_params = &iwl5000_ht_params,
88};
5a6a256e 89
706c4ff6 90const struct iwl_cfg iwl5100_bgn_cfg = {
c11362c0 91 .name = "Intel(R) WiFi Link 5100 BGN",
65af8dea 92 IWL_DEVICE_5000,
dbbf1755
WYG
93 .valid_tx_ant = ANT_B, /* .cfg overwrite */
94 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
7cb1b088 95 .ht_params = &iwl5000_ht_params,
47408639
EK
96};
97
706c4ff6 98const struct iwl_cfg iwl5100_abg_cfg = {
c11362c0 99 .name = "Intel(R) WiFi Link 5100 ABG",
65af8dea 100 IWL_DEVICE_5000,
dbbf1755
WYG
101 .valid_tx_ant = ANT_B, /* .cfg overwrite */
102 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
47408639
EK
103};
104
706c4ff6 105const struct iwl_cfg iwl5100_agn_cfg = {
c11362c0 106 .name = "Intel(R) WiFi Link 5100 AGN",
65af8dea 107 IWL_DEVICE_5000,
dbbf1755
WYG
108 .valid_tx_ant = ANT_B, /* .cfg overwrite */
109 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
7cb1b088 110 .ht_params = &iwl5000_ht_params,
5a6a256e
TW
111};
112
706c4ff6 113const struct iwl_cfg iwl5350_agn_cfg = {
c11362c0 114 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
a0987a8d
RC
115 .fw_name_pre = IWL5000_FW_PRE,
116 .ucode_api_max = IWL5000_UCODE_API_MAX,
117 .ucode_api_min = IWL5000_UCODE_API_MIN,
2d771cb6 118 .device_family = IWL_DEVICE_FAMILY_5000,
dae66d0d
EG
119 .max_inst_size = IWLAGN_RTC_INST_SIZE,
120 .max_data_size = IWLAGN_RTC_DATA_SIZE,
b7998c8b
EL
121 .nvm_ver = EEPROM_5050_EEPROM_VERSION,
122 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
7cb1b088 123 .base_params = &iwl5000_base_params,
26a7ca9a 124 .eeprom_params = &iwl5000_eeprom_params,
7cb1b088 125 .ht_params = &iwl5000_ht_params,
564b344c 126 .led_mode = IWL_LED_BLINK,
50619ac9 127 .internal_wimax_coex = true,
5c9adef9 128 .csr = &iwl_csr_v1,
5a6a256e
TW
129};
130
65af8dea
WYG
131#define IWL_DEVICE_5150 \
132 .fw_name_pre = IWL5150_FW_PRE, \
133 .ucode_api_max = IWL5150_UCODE_API_MAX, \
134 .ucode_api_min = IWL5150_UCODE_API_MIN, \
2d771cb6 135 .device_family = IWL_DEVICE_FAMILY_5150, \
dae66d0d
EG
136 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
137 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
b7998c8b
EL
138 .nvm_ver = EEPROM_5050_EEPROM_VERSION, \
139 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
65af8dea 140 .base_params = &iwl5000_base_params, \
26a7ca9a 141 .eeprom_params = &iwl5000_eeprom_params, \
65af8dea 142 .led_mode = IWL_LED_BLINK, \
540623ca 143 .internal_wimax_coex = true, \
a8cbb46f
GBA
144 .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K, \
145 .csr = &iwl_csr_v1
65af8dea 146
706c4ff6 147const struct iwl_cfg iwl5150_agn_cfg = {
c11362c0 148 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
65af8dea 149 IWL_DEVICE_5150,
7cb1b088 150 .ht_params = &iwl5000_ht_params,
65af8dea 151
7100e924
TW
152};
153
706c4ff6 154const struct iwl_cfg iwl5150_abg_cfg = {
c11362c0 155 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
65af8dea 156 IWL_DEVICE_5150,
7100e924
TW
157};
158
9d9b21d1
EG
159MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
160MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));