• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-only
2 /******************************************************************************
3  *
4  * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
5  * Copyright(c) 2018 - 2019 Intel Corporation
6  *
7  * Contact Information:
8  *  Intel Linux Wireless <linuxwifi@intel.com>
9  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
10  *
11  *****************************************************************************/
12 
13 #include <linux/module.h>
14 #include <linux/stringify.h>
15 #include "iwl-config.h"
16 #include "iwl-agn-hw.h"
17 
18 /* Highest firmware API version supported */
19 #define IWL1000_UCODE_API_MAX 5
20 #define IWL100_UCODE_API_MAX 5
21 
22 /* Lowest firmware API version supported */
23 #define IWL1000_UCODE_API_MIN 1
24 #define IWL100_UCODE_API_MIN 5
25 
26 /* EEPROM version */
27 #define EEPROM_1000_TX_POWER_VERSION	(4)
28 #define EEPROM_1000_EEPROM_VERSION	(0x15C)
29 
30 #define IWL1000_FW_PRE "iwlwifi-1000-"
31 #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
32 
33 #define IWL100_FW_PRE "iwlwifi-100-"
34 #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
35 
36 
37 static const struct iwl_base_params iwl1000_base_params = {
38 	.num_of_queues = IWLAGN_NUM_QUEUES,
39 	.max_tfd_queue_size = 256,
40 	.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
41 	.pll_cfg = true,
42 	.max_ll_items = OTP_MAX_LL_ITEMS_1000,
43 	.shadow_ram_support = false,
44 	.led_compensation = 51,
45 	.wd_timeout = IWL_WATCHDOG_DISABLED,
46 	.max_event_log_size = 128,
47 	.scd_chain_ext_wa = true,
48 };
49 
50 static const struct iwl_ht_params iwl1000_ht_params = {
51 	.ht_greenfield_support = true,
52 	.use_rts_for_aggregation = true, /* use rts/cts protection */
53 	.ht40_bands = BIT(NL80211_BAND_2GHZ),
54 };
55 
56 static const struct iwl_eeprom_params iwl1000_eeprom_params = {
57 	.regulatory_bands = {
58 		EEPROM_REG_BAND_1_CHANNELS,
59 		EEPROM_REG_BAND_2_CHANNELS,
60 		EEPROM_REG_BAND_3_CHANNELS,
61 		EEPROM_REG_BAND_4_CHANNELS,
62 		EEPROM_REG_BAND_5_CHANNELS,
63 		EEPROM_REG_BAND_24_HT40_CHANNELS,
64 		EEPROM_REGULATORY_BAND_NO_HT40,
65 	}
66 };
67 
68 #define IWL_DEVICE_1000						\
69 	.fw_name_pre = IWL1000_FW_PRE,				\
70 	.ucode_api_max = IWL1000_UCODE_API_MAX,			\
71 	.ucode_api_min = IWL1000_UCODE_API_MIN,			\
72 	.trans.device_family = IWL_DEVICE_FAMILY_1000,		\
73 	.max_inst_size = IWLAGN_RTC_INST_SIZE,			\
74 	.max_data_size = IWLAGN_RTC_DATA_SIZE,			\
75 	.nvm_ver = EEPROM_1000_EEPROM_VERSION,		\
76 	.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
77 	.trans.base_params = &iwl1000_base_params,		\
78 	.eeprom_params = &iwl1000_eeprom_params,		\
79 	.led_mode = IWL_LED_BLINK,				\
80 	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
81 
82 const struct iwl_cfg iwl1000_bgn_cfg = {
83 	.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
84 	IWL_DEVICE_1000,
85 	.ht_params = &iwl1000_ht_params,
86 };
87 
88 const struct iwl_cfg iwl1000_bg_cfg = {
89 	.name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
90 	IWL_DEVICE_1000,
91 };
92 
93 #define IWL_DEVICE_100						\
94 	.fw_name_pre = IWL100_FW_PRE,				\
95 	.ucode_api_max = IWL100_UCODE_API_MAX,			\
96 	.ucode_api_min = IWL100_UCODE_API_MIN,			\
97 	.trans.device_family = IWL_DEVICE_FAMILY_100,		\
98 	.max_inst_size = IWLAGN_RTC_INST_SIZE,			\
99 	.max_data_size = IWLAGN_RTC_DATA_SIZE,			\
100 	.nvm_ver = EEPROM_1000_EEPROM_VERSION,		\
101 	.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,	\
102 	.trans.base_params = &iwl1000_base_params,		\
103 	.eeprom_params = &iwl1000_eeprom_params,		\
104 	.led_mode = IWL_LED_RF_STATE,				\
105 	.rx_with_siso_diversity = true,				\
106 	.max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
107 
108 const struct iwl_cfg iwl100_bgn_cfg = {
109 	.name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
110 	IWL_DEVICE_100,
111 	.ht_params = &iwl1000_ht_params,
112 };
113 
114 const struct iwl_cfg iwl100_bg_cfg = {
115 	.name = "Intel(R) Centrino(R) Wireless-N 100 BG",
116 	IWL_DEVICE_100,
117 };
118 
119 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
120 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));
121