Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-5000.c
CommitLineData
5a6a256e
TW
1/******************************************************************************
2 *
4e318262 3 * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved.
5a6a256e
TW
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:
3d2b162e 22 * Intel Linux Wireless <ilw@linux.intel.com>
5a6a256e
TW
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
5a6a256e 27#include <linux/module.h>
8fcbd4dc 28#include <linux/stringify.h>
e9676695 29#include "iwl-config.h"
cebcbd75 30#include "iwl-cfg.h"
e9676695 31#include "iwl-dev.h" /* still needed */
5a6a256e 32
a0987a8d 33/* Highest firmware API version supported */
41504cce 34#define IWL5000_UCODE_API_MAX 5
39e6d225 35#define IWL5150_UCODE_API_MAX 2
5a6a256e 36
a0987a8d
RC
37/* Lowest firmware API version supported */
38#define IWL5000_UCODE_API_MIN 1
39#define IWL5150_UCODE_API_MIN 1
40
41#define IWL5000_FW_PRE "iwlwifi-5000-"
8fcbd4dc 42#define IWL5000_MODULE_FIRMWARE(api) IWL5000_FW_PRE __stringify(api) ".ucode"
a0987a8d
RC
43
44#define IWL5150_FW_PRE "iwlwifi-5150-"
8fcbd4dc 45#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE __stringify(api) ".ucode"
4e062f99 46
6794f3ee 47static const struct iwl_base_params iwl5000_base_params = {
19e6cda0 48 .eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
19e6cda0 49 .num_of_queues = IWLAGN_NUM_QUEUES,
fadb3582 50 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
f2d0d0e2 51 .led_compensation = 51,
3e4fb5fa 52 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
d4fe5ac9 53 .chain_noise_scale = 1000,
7c5ba4a8 54 .wd_timeout = IWL_WATCHHDOG_DISABLED,
678b385d 55 .max_event_log_size = 512,
f3529108 56 .no_idle_support = true,
5a6a256e 57};
6794f3ee
JB
58
59static const struct iwl_ht_params iwl5000_ht_params = {
7cb1b088 60 .ht_greenfield_support = true,
7cb1b088
WYG
61};
62
65af8dea
WYG
63#define IWL_DEVICE_5000 \
64 .fw_name_pre = IWL5000_FW_PRE, \
65 .ucode_api_max = IWL5000_UCODE_API_MAX, \
66 .ucode_api_min = IWL5000_UCODE_API_MIN, \
2d771cb6 67 .device_family = IWL_DEVICE_FAMILY_5000, \
dae66d0d
EG
68 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
69 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
65af8dea
WYG
70 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
71 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
65af8dea
WYG
72 .base_params = &iwl5000_base_params, \
73 .led_mode = IWL_LED_BLINK
74
706c4ff6 75const struct iwl_cfg iwl5300_agn_cfg = {
7cb1b088 76 .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
65af8dea 77 IWL_DEVICE_5000,
2845fd85
JB
78 /* at least EEPROM 0x11A has wrong info */
79 .valid_tx_ant = ANT_ABC, /* .cfg overwrite */
80 .valid_rx_ant = ANT_ABC, /* .cfg overwrite */
7cb1b088
WYG
81 .ht_params = &iwl5000_ht_params,
82};
5a6a256e 83
706c4ff6 84const struct iwl_cfg iwl5100_bgn_cfg = {
c11362c0 85 .name = "Intel(R) WiFi Link 5100 BGN",
65af8dea 86 IWL_DEVICE_5000,
dbbf1755
WYG
87 .valid_tx_ant = ANT_B, /* .cfg overwrite */
88 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
7cb1b088 89 .ht_params = &iwl5000_ht_params,
47408639
EK
90};
91
706c4ff6 92const struct iwl_cfg iwl5100_abg_cfg = {
c11362c0 93 .name = "Intel(R) WiFi Link 5100 ABG",
65af8dea 94 IWL_DEVICE_5000,
dbbf1755
WYG
95 .valid_tx_ant = ANT_B, /* .cfg overwrite */
96 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
47408639
EK
97};
98
706c4ff6 99const struct iwl_cfg iwl5100_agn_cfg = {
c11362c0 100 .name = "Intel(R) WiFi Link 5100 AGN",
65af8dea 101 IWL_DEVICE_5000,
dbbf1755
WYG
102 .valid_tx_ant = ANT_B, /* .cfg overwrite */
103 .valid_rx_ant = ANT_AB, /* .cfg overwrite */
7cb1b088 104 .ht_params = &iwl5000_ht_params,
5a6a256e
TW
105};
106
706c4ff6 107const struct iwl_cfg iwl5350_agn_cfg = {
c11362c0 108 .name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
a0987a8d
RC
109 .fw_name_pre = IWL5000_FW_PRE,
110 .ucode_api_max = IWL5000_UCODE_API_MAX,
111 .ucode_api_min = IWL5000_UCODE_API_MIN,
2d771cb6 112 .device_family = IWL_DEVICE_FAMILY_5000,
dae66d0d
EG
113 .max_inst_size = IWLAGN_RTC_INST_SIZE,
114 .max_data_size = IWLAGN_RTC_DATA_SIZE,
0ef2ca67
TW
115 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
116 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
7cb1b088
WYG
117 .base_params = &iwl5000_base_params,
118 .ht_params = &iwl5000_ht_params,
564b344c 119 .led_mode = IWL_LED_BLINK,
50619ac9 120 .internal_wimax_coex = true,
5a6a256e
TW
121};
122
65af8dea
WYG
123#define IWL_DEVICE_5150 \
124 .fw_name_pre = IWL5150_FW_PRE, \
125 .ucode_api_max = IWL5150_UCODE_API_MAX, \
126 .ucode_api_min = IWL5150_UCODE_API_MIN, \
2d771cb6 127 .device_family = IWL_DEVICE_FAMILY_5150, \
dae66d0d
EG
128 .max_inst_size = IWLAGN_RTC_INST_SIZE, \
129 .max_data_size = IWLAGN_RTC_DATA_SIZE, \
65af8dea
WYG
130 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
131 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
65af8dea 132 .base_params = &iwl5000_base_params, \
c27bdc84 133 .no_xtal_calib = true, \
65af8dea
WYG
134 .led_mode = IWL_LED_BLINK, \
135 .internal_wimax_coex = true
136
706c4ff6 137const struct iwl_cfg iwl5150_agn_cfg = {
c11362c0 138 .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
65af8dea 139 IWL_DEVICE_5150,
7cb1b088 140 .ht_params = &iwl5000_ht_params,
65af8dea 141
7100e924
TW
142};
143
706c4ff6 144const struct iwl_cfg iwl5150_abg_cfg = {
c11362c0 145 .name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
65af8dea 146 IWL_DEVICE_5150,
7100e924
TW
147};
148
a0987a8d
RC
149MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
150MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
This page took 0.614549 seconds and 5 git commands to generate.