Merge branch 'vhost-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mst...
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-5000.c
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 <ilw@linux.intel.com>
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-cfg.h"
31 #include "iwl-agn-hw.h"
32 #include "iwl-csr.h"
33
34 /* Highest firmware API version supported */
35 #define IWL5000_UCODE_API_MAX 5
36 #define IWL5150_UCODE_API_MAX 2
37
38 /* Lowest firmware API version supported */
39 #define IWL5000_UCODE_API_MIN 1
40 #define IWL5150_UCODE_API_MIN 1
41
42 /* EEPROM versions */
43 #define EEPROM_5000_TX_POWER_VERSION (4)
44 #define EEPROM_5000_EEPROM_VERSION (0x11A)
45 #define EEPROM_5050_TX_POWER_VERSION (4)
46 #define EEPROM_5050_EEPROM_VERSION (0x21E)
47
48 #define IWL5000_FW_PRE "iwlwifi-5000-"
49 #define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
50
51 #define IWL5150_FW_PRE "iwlwifi-5150-"
52 #define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
53
54 static const struct iwl_base_params iwl5000_base_params = {
55 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
56 .num_of_queues = IWLAGN_NUM_QUEUES,
57 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
58 .led_compensation = 51,
59 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
60 .chain_noise_scale = 1000,
61 .wd_timeout = IWL_WATCHHDOG_DISABLED,
62 .max_event_log_size = 512,
63 .no_idle_support = true,
64 };
65
66 static const struct iwl_ht_params iwl5000_ht_params = {
67 .ht_greenfield_support = true,
68 };
69
70 #define IWL_DEVICE_5000 \
71 .fw_name_pre = IWL5000_FW_PRE, \
72 .ucode_api_max = IWL5000_UCODE_API_MAX, \
73 .ucode_api_min = IWL5000_UCODE_API_MIN, \
74 .device_family = IWL_DEVICE_FAMILY_5000, \
75 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
76 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
77 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
78 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
79 .base_params = &iwl5000_base_params, \
80 .led_mode = IWL_LED_BLINK
81
82 const struct iwl_cfg iwl5300_agn_cfg = {
83 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
84 IWL_DEVICE_5000,
85 /* at least EEPROM 0x11A has wrong info */
86 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
87 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
88 .ht_params = &iwl5000_ht_params,
89 };
90
91 const struct iwl_cfg iwl5100_bgn_cfg = {
92 .name = "Intel(R) WiFi Link 5100 BGN",
93 IWL_DEVICE_5000,
94 .valid_tx_ant = ANT_B, /* .cfg overwrite */
95 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
96 .ht_params = &iwl5000_ht_params,
97 };
98
99 const struct iwl_cfg iwl5100_abg_cfg = {
100 .name = "Intel(R) WiFi Link 5100 ABG",
101 IWL_DEVICE_5000,
102 .valid_tx_ant = ANT_B, /* .cfg overwrite */
103 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
104 };
105
106 const struct iwl_cfg iwl5100_agn_cfg = {
107 .name = "Intel(R) WiFi Link 5100 AGN",
108 IWL_DEVICE_5000,
109 .valid_tx_ant = ANT_B, /* .cfg overwrite */
110 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
111 .ht_params = &iwl5000_ht_params,
112 };
113
114 const struct iwl_cfg iwl5350_agn_cfg = {
115 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
116 .fw_name_pre = IWL5000_FW_PRE,
117 .ucode_api_max = IWL5000_UCODE_API_MAX,
118 .ucode_api_min = IWL5000_UCODE_API_MIN,
119 .device_family = IWL_DEVICE_FAMILY_5000,
120 .max_inst_size = IWLAGN_RTC_INST_SIZE,
121 .max_data_size = IWLAGN_RTC_DATA_SIZE,
122 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
123 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
124 .base_params = &iwl5000_base_params,
125 .ht_params = &iwl5000_ht_params,
126 .led_mode = IWL_LED_BLINK,
127 .internal_wimax_coex = true,
128 };
129
130 #define IWL_DEVICE_5150 \
131 .fw_name_pre = IWL5150_FW_PRE, \
132 .ucode_api_max = IWL5150_UCODE_API_MAX, \
133 .ucode_api_min = IWL5150_UCODE_API_MIN, \
134 .device_family = IWL_DEVICE_FAMILY_5150, \
135 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
136 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
137 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
138 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
139 .base_params = &iwl5000_base_params, \
140 .no_xtal_calib = true, \
141 .led_mode = IWL_LED_BLINK, \
142 .internal_wimax_coex = true
143
144 const struct iwl_cfg iwl5150_agn_cfg = {
145 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
146 IWL_DEVICE_5150,
147 .ht_params = &iwl5000_ht_params,
148
149 };
150
151 const struct iwl_cfg iwl5150_abg_cfg = {
152 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
153 IWL_DEVICE_5150,
154 };
155
156 MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
157 MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
This page took 0.033406 seconds and 5 git commands to generate.