]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/blob - drivers/net/wireless/intel/iwlwifi/cfg/1000.c
Merge tag 'xfs-fixes-for-4.19-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[rpmsg/rpmsg.git] / drivers / net / wireless / intel / iwlwifi / cfg / 1000.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
4  * Copyright(c) 2018 Intel Corporation
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18  *
19  * The full GNU General Public License is included in this distribution in the
20  * file called LICENSE.
21  *
22  * Contact Information:
23  *  Intel Linux Wireless <linuxwifi@intel.com>
24  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25  *
26  *****************************************************************************/
28 #include <linux/module.h>
29 #include <linux/stringify.h>
30 #include "iwl-config.h"
31 #include "iwl-agn-hw.h"
33 /* Highest firmware API version supported */
34 #define IWL1000_UCODE_API_MAX 5
35 #define IWL100_UCODE_API_MAX 5
37 /* Lowest firmware API version supported */
38 #define IWL1000_UCODE_API_MIN 1
39 #define IWL100_UCODE_API_MIN 5
41 /* EEPROM version */
42 #define EEPROM_1000_TX_POWER_VERSION    (4)
43 #define EEPROM_1000_EEPROM_VERSION      (0x15C)
45 #define IWL1000_FW_PRE "iwlwifi-1000-"
46 #define IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE __stringify(api) ".ucode"
48 #define IWL100_FW_PRE "iwlwifi-100-"
49 #define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE __stringify(api) ".ucode"
52 static const struct iwl_base_params iwl1000_base_params = {
53         .num_of_queues = IWLAGN_NUM_QUEUES,
54         .max_tfd_queue_size = 256,
55         .eeprom_size = OTP_LOW_IMAGE_SIZE,
56         .pll_cfg = true,
57         .max_ll_items = OTP_MAX_LL_ITEMS_1000,
58         .shadow_ram_support = false,
59         .led_compensation = 51,
60         .wd_timeout = IWL_WATCHDOG_DISABLED,
61         .max_event_log_size = 128,
62         .scd_chain_ext_wa = true,
63 };
65 static const struct iwl_ht_params iwl1000_ht_params = {
66         .ht_greenfield_support = true,
67         .use_rts_for_aggregation = true, /* use rts/cts protection */
68         .ht40_bands = BIT(NL80211_BAND_2GHZ),
69 };
71 static const struct iwl_eeprom_params iwl1000_eeprom_params = {
72         .regulatory_bands = {
73                 EEPROM_REG_BAND_1_CHANNELS,
74                 EEPROM_REG_BAND_2_CHANNELS,
75                 EEPROM_REG_BAND_3_CHANNELS,
76                 EEPROM_REG_BAND_4_CHANNELS,
77                 EEPROM_REG_BAND_5_CHANNELS,
78                 EEPROM_REG_BAND_24_HT40_CHANNELS,
79                 EEPROM_REGULATORY_BAND_NO_HT40,
80         }
81 };
83 #define IWL_DEVICE_1000                                         \
84         .fw_name_pre = IWL1000_FW_PRE,                          \
85         .ucode_api_max = IWL1000_UCODE_API_MAX,                 \
86         .ucode_api_min = IWL1000_UCODE_API_MIN,                 \
87         .device_family = IWL_DEVICE_FAMILY_1000,                \
88         .max_inst_size = IWLAGN_RTC_INST_SIZE,                  \
89         .max_data_size = IWLAGN_RTC_DATA_SIZE,                  \
90         .nvm_ver = EEPROM_1000_EEPROM_VERSION,          \
91         .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,  \
92         .base_params = &iwl1000_base_params,                    \
93         .eeprom_params = &iwl1000_eeprom_params,                \
94         .led_mode = IWL_LED_BLINK,                              \
95         .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,    \
96         .csr = &iwl_csr_v1
98 const struct iwl_cfg iwl1000_bgn_cfg = {
99         .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
100         IWL_DEVICE_1000,
101         .ht_params = &iwl1000_ht_params,
102 };
104 const struct iwl_cfg iwl1000_bg_cfg = {
105         .name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
106         IWL_DEVICE_1000,
107 };
109 #define IWL_DEVICE_100                                          \
110         .fw_name_pre = IWL100_FW_PRE,                           \
111         .ucode_api_max = IWL100_UCODE_API_MAX,                  \
112         .ucode_api_min = IWL100_UCODE_API_MIN,                  \
113         .device_family = IWL_DEVICE_FAMILY_100,                 \
114         .max_inst_size = IWLAGN_RTC_INST_SIZE,                  \
115         .max_data_size = IWLAGN_RTC_DATA_SIZE,                  \
116         .nvm_ver = EEPROM_1000_EEPROM_VERSION,          \
117         .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION,  \
118         .base_params = &iwl1000_base_params,                    \
119         .eeprom_params = &iwl1000_eeprom_params,                \
120         .led_mode = IWL_LED_RF_STATE,                           \
121         .rx_with_siso_diversity = true,                         \
122         .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K,    \
123         .csr = &iwl_csr_v1
125 const struct iwl_cfg iwl100_bgn_cfg = {
126         .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
127         IWL_DEVICE_100,
128         .ht_params = &iwl1000_ht_params,
129 };
131 const struct iwl_cfg iwl100_bg_cfg = {
132         .name = "Intel(R) Centrino(R) Wireless-N 100 BG",
133         IWL_DEVICE_100,
134 };
136 MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
137 MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));