Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
5000.c
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  * The full GNU General Public License is included in this distribution in the
19  * file called LICENSE.
20  *
21  * Contact Information:
22  * Intel Linux Wireless <[email protected]>
23  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24  *
25  *****************************************************************************/
26 
27 #include <linux/module.h>
28 #include <linux/stringify.h>
29 #include "iwl-config.h"
30 #include "iwl-agn-hw.h"
31 #include "iwl-csr.h"
32 #include "cfg.h"
33 
34 /* Highest firmware API version supported */
35 #define IWL5000_UCODE_API_MAX 5
36 #define IWL5150_UCODE_API_MAX 2
37 
38 /* Oldest version we won't warn about */
39 #define IWL5000_UCODE_API_OK 5
40 #define IWL5150_UCODE_API_OK 2
41 
42 /* Lowest firmware API version supported */
43 #define IWL5000_UCODE_API_MIN 1
44 #define IWL5150_UCODE_API_MIN 1
45 
46 /* EEPROM versions */
47 #define EEPROM_5000_TX_POWER_VERSION (4)
48 #define EEPROM_5000_EEPROM_VERSION (0x11A)
49 #define EEPROM_5050_TX_POWER_VERSION (4)
50 #define EEPROM_5050_EEPROM_VERSION (0x21E)
51 
52 #define IWL5000_FW_PRE "iwlwifi-5000-"
53 #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
54 
55 #define IWL5150_FW_PRE "iwlwifi-5150-"
56 #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
57 
58 static const struct iwl_base_params iwl5000_base_params = {
59  .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
60  .num_of_queues = IWLAGN_NUM_QUEUES,
61  .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
62  .led_compensation = 51,
63  .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
64  .chain_noise_scale = 1000,
65  .wd_timeout = IWL_WATCHDOG_DISABLED,
66  .max_event_log_size = 512,
67  .no_idle_support = true,
68 };
69 
70 static const struct iwl_ht_params iwl5000_ht_params = {
71  .ht_greenfield_support = true,
73 };
74 
75 static const struct iwl_eeprom_params iwl5000_eeprom_params = {
76  .regulatory_bands = {
84  },
85 };
86 
87 #define IWL_DEVICE_5000 \
88  .fw_name_pre = IWL5000_FW_PRE, \
89  .ucode_api_max = IWL5000_UCODE_API_MAX, \
90  .ucode_api_ok = IWL5000_UCODE_API_OK, \
91  .ucode_api_min = IWL5000_UCODE_API_MIN, \
92  .device_family = IWL_DEVICE_FAMILY_5000, \
93  .max_inst_size = IWLAGN_RTC_INST_SIZE, \
94  .max_data_size = IWLAGN_RTC_DATA_SIZE, \
95  .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
96  .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
97  .base_params = &iwl5000_base_params, \
98  .eeprom_params = &iwl5000_eeprom_params, \
99  .led_mode = IWL_LED_BLINK
100 
101 const struct iwl_cfg iwl5300_agn_cfg = {
102  .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
104  /* at least EEPROM 0x11A has wrong info */
105  .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
106  .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
107  .ht_params = &iwl5000_ht_params,
108 };
109 
110 const struct iwl_cfg iwl5100_bgn_cfg = {
111  .name = "Intel(R) WiFi Link 5100 BGN",
113  .valid_tx_ant = ANT_B, /* .cfg overwrite */
114  .valid_rx_ant = ANT_AB, /* .cfg overwrite */
115  .ht_params = &iwl5000_ht_params,
116 };
117 
118 const struct iwl_cfg iwl5100_abg_cfg = {
119  .name = "Intel(R) WiFi Link 5100 ABG",
121  .valid_tx_ant = ANT_B, /* .cfg overwrite */
122  .valid_rx_ant = ANT_AB, /* .cfg overwrite */
123 };
124 
125 const struct iwl_cfg iwl5100_agn_cfg = {
126  .name = "Intel(R) WiFi Link 5100 AGN",
128  .valid_tx_ant = ANT_B, /* .cfg overwrite */
129  .valid_rx_ant = ANT_AB, /* .cfg overwrite */
130  .ht_params = &iwl5000_ht_params,
131 };
132 
133 const struct iwl_cfg iwl5350_agn_cfg = {
134  .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
135  .fw_name_pre = IWL5000_FW_PRE,
136  .ucode_api_max = IWL5000_UCODE_API_MAX,
137  .ucode_api_ok = IWL5000_UCODE_API_OK,
138  .ucode_api_min = IWL5000_UCODE_API_MIN,
139  .device_family = IWL_DEVICE_FAMILY_5000,
140  .max_inst_size = IWLAGN_RTC_INST_SIZE,
141  .max_data_size = IWLAGN_RTC_DATA_SIZE,
142  .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
143  .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
144  .base_params = &iwl5000_base_params,
145  .eeprom_params = &iwl5000_eeprom_params,
146  .ht_params = &iwl5000_ht_params,
147  .led_mode = IWL_LED_BLINK,
148  .internal_wimax_coex = true,
149 };
150 
151 #define IWL_DEVICE_5150 \
152  .fw_name_pre = IWL5150_FW_PRE, \
153  .ucode_api_max = IWL5150_UCODE_API_MAX, \
154  .ucode_api_ok = IWL5150_UCODE_API_OK, \
155  .ucode_api_min = IWL5150_UCODE_API_MIN, \
156  .device_family = IWL_DEVICE_FAMILY_5150, \
157  .max_inst_size = IWLAGN_RTC_INST_SIZE, \
158  .max_data_size = IWLAGN_RTC_DATA_SIZE, \
159  .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
160  .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
161  .base_params = &iwl5000_base_params, \
162  .eeprom_params = &iwl5000_eeprom_params, \
163  .no_xtal_calib = true, \
164  .led_mode = IWL_LED_BLINK, \
165  .internal_wimax_coex = true
166 
167 const struct iwl_cfg iwl5150_agn_cfg = {
168  .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
170  .ht_params = &iwl5000_ht_params,
171 
172 };
173 
174 const struct iwl_cfg iwl5150_abg_cfg = {
175  .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
177 };
178