]> www.infradead.org Git - linux.git/blob
c029e595
[linux.git] /
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
13 /* Highest firmware API version supported */
14 #define IWL1000_UCODE_API_MAX 5
15 #define IWL100_UCODE_API_MAX 5
16
17 /* Lowest firmware API version supported */
18 #define IWL1000_UCODE_API_MIN 1
19 #define IWL100_UCODE_API_MIN 5
20
21 /* EEPROM version */
22 #define EEPROM_1000_TX_POWER_VERSION    (4)
23 #define EEPROM_1000_EEPROM_VERSION      (0x15C)
24
25 #define IWL1000_FW_PRE "iwlwifi-1000"
26 #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE "-" __stringify(api) ".ucode"
27
28 #define IWL100_FW_PRE "iwlwifi-100"
29 #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE "-" __stringify(api) ".ucode"
30
31
32 static const struct iwl_family_base_params iwl1000_base = {
33         .num_of_queues = IWLAGN_NUM_QUEUES,
34         .max_tfd_queue_size = 256,
35         .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
36         .pll_cfg = true,
37         .max_ll_items = OTP_MAX_LL_ITEMS_1000,
38         .shadow_ram_support = false,
39         .led_compensation = 51,
40         .wd_timeout = IWL_WATCHDOG_DISABLED,
41         .max_event_log_size = 128,
42         .scd_chain_ext_wa = true,
43 };
44
45 static const struct iwl_eeprom_params iwl1000_eeprom_params = {
46         .regulatory_bands = {
47                 EEPROM_REG_BAND_1_CHANNELS,
48                 EEPROM_REG_BAND_2_CHANNELS,
49                 EEPROM_REG_BAND_3_CHANNELS,
50                 EEPROM_REG_BAND_4_CHANNELS,
51                 EEPROM_REG_BAND_5_CHANNELS,
52                 EEPROM_REG_BAND_24_HT40_CHANNELS,
53                 EEPROM_REGULATORY_BAND_NO_HT40,
54         }
55 };
56
57 const struct iwl_mac_cfg iwl1000_mac_cfg = {
58         .device_family = IWL_DEVICE_FAMILY_1000,
59         .base = &iwl1000_base,
60 };
61
62 #define IWL_DEVICE_1000                                         \
63         .fw_name_pre = IWL1000_FW_PRE,                          \
64         .ucode_api_max = IWL1000_UCODE_API_MAX,                 \
65         .ucode_api_min = IWL1000_UCODE_API_MIN,                 \
66         .max_inst_size = IWLAGN_RTC_INST_SIZE,                  \
67         .max_data_size = IWLAGN_RTC_DATA_SIZE,                  \
68         .nvm_ver = EEPROM_1000_EEPROM_VERSION,          \
69         .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,  \
70         .eeprom_params = &iwl1000_eeprom_params,                \
71         .led_mode = IWL_LED_BLINK
72
73 const struct iwl_rf_cfg iwl1000_bgn_cfg = {
74         IWL_DEVICE_1000,
75         .ht_params = {
76                 .ht_greenfield_support = true,
77                 .use_rts_for_aggregation = true, /* use rts/cts protection */
78                 .ht40_bands = BIT(NL80211_BAND_2GHZ),
79         },
80 };
81
82 const char iwl1000_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BGN";
83
84 const struct iwl_rf_cfg iwl1000_bg_cfg = {
85         IWL_DEVICE_1000,
86 };
87
88 const char iwl1000_bg_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BG";
89
90 #define IWL_DEVICE_100                                          \
91         .fw_name_pre = IWL100_FW_PRE,                           \
92         .ucode_api_max = IWL100_UCODE_API_MAX,                  \
93         .ucode_api_min = IWL100_UCODE_API_MIN,                  \
94         .max_inst_size = IWLAGN_RTC_INST_SIZE,                  \
95         .max_data_size = IWLAGN_RTC_DATA_SIZE,                  \
96         .nvm_ver = EEPROM_1000_EEPROM_VERSION,          \
97         .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,  \
98         .eeprom_params = &iwl1000_eeprom_params,                \
99         .led_mode = IWL_LED_RF_STATE,                           \
100         .rx_with_siso_diversity = true
101
102 const struct iwl_rf_cfg iwl100_bgn_cfg = {
103         IWL_DEVICE_100,
104         .ht_params = {
105                 .ht_greenfield_support = true,
106                 .use_rts_for_aggregation = true, /* use rts/cts protection */
107                 .ht40_bands = BIT(NL80211_BAND_2GHZ),
108         },
109 };
110
111 const char iwl100_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 100 BGN";
112
113 const struct iwl_rf_cfg iwl100_bg_cfg = {
114         IWL_DEVICE_100,
115 };
116
117 const char iwl100_bg_name[] = "Intel(R) Centrino(R) Wireless-N 100 BG";
118
119 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
120 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));