iwlwifi: define structures and functions externally for customization
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-6000.c
CommitLineData
e1228374
JS
1/******************************************************************************
2 *
3 * Copyright(c) 2008-2009 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/kernel.h>
28#include <linux/module.h>
29#include <linux/init.h>
30#include <linux/pci.h>
31#include <linux/dma-mapping.h>
32#include <linux/delay.h>
33#include <linux/skbuff.h>
34#include <linux/netdevice.h>
35#include <linux/wireless.h>
36#include <net/mac80211.h>
37#include <linux/etherdevice.h>
38#include <asm/unaligned.h>
39
40#include "iwl-eeprom.h"
41#include "iwl-dev.h"
42#include "iwl-core.h"
43#include "iwl-io.h"
44#include "iwl-sta.h"
45#include "iwl-helpers.h"
46#include "iwl-5000-hw.h"
47
48/* Highest firmware API version supported */
76a2407a
JS
49#define IWL6000_UCODE_API_MAX 2
50#define IWL6050_UCODE_API_MAX 2
e1228374
JS
51
52/* Lowest firmware API version supported */
53#define IWL6000_UCODE_API_MIN 1
54#define IWL6050_UCODE_API_MIN 1
55
56#define IWL6000_FW_PRE "iwlwifi-6000-"
57#define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode"
58#define IWL6000_MODULE_FIRMWARE(api) _IWL6000_MODULE_FIRMWARE(api)
59
60#define IWL6050_FW_PRE "iwlwifi-6050-"
61#define _IWL6050_MODULE_FIRMWARE(api) IWL6050_FW_PRE #api ".ucode"
62#define IWL6050_MODULE_FIRMWARE(api) _IWL6050_MODULE_FIRMWARE(api)
63
64struct iwl_cfg iwl6000_2ag_cfg = {
65 .name = "6000 Series 2x2 AG",
66 .fw_name_pre = IWL6000_FW_PRE,
67 .ucode_api_max = IWL6000_UCODE_API_MAX,
68 .ucode_api_min = IWL6000_UCODE_API_MIN,
69 .sku = IWL_SKU_A|IWL_SKU_G,
70 .ops = &iwl5000_ops,
71 .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
72 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
73 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
74 .mod_params = &iwl50_mod_params,
c0bac76a
JS
75 .valid_tx_ant = ANT_BC,
76 .valid_rx_ant = ANT_BC,
050681b7 77 .need_pll_cfg = false,
e1228374
JS
78};
79
80struct iwl_cfg iwl6000_2agn_cfg = {
81 .name = "6000 Series 2x2 AGN",
82 .fw_name_pre = IWL6000_FW_PRE,
83 .ucode_api_max = IWL6000_UCODE_API_MAX,
84 .ucode_api_min = IWL6000_UCODE_API_MIN,
85 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
86 .ops = &iwl5000_ops,
87 .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
88 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
89 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
90 .mod_params = &iwl50_mod_params,
c0bac76a
JS
91 .valid_tx_ant = ANT_BC,
92 .valid_rx_ant = ANT_BC,
050681b7 93 .need_pll_cfg = false,
e1228374
JS
94};
95
96struct iwl_cfg iwl6050_2agn_cfg = {
97 .name = "6050 Series 2x2 AGN",
98 .fw_name_pre = IWL6050_FW_PRE,
99 .ucode_api_max = IWL6050_UCODE_API_MAX,
100 .ucode_api_min = IWL6050_UCODE_API_MIN,
101 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
102 .ops = &iwl5000_ops,
103 .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
104 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
105 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
106 .mod_params = &iwl50_mod_params,
c0bac76a
JS
107 .valid_tx_ant = ANT_BC,
108 .valid_rx_ant = ANT_BC,
050681b7 109 .need_pll_cfg = false,
e1228374
JS
110};
111
112struct iwl_cfg iwl6000_3agn_cfg = {
113 .name = "6000 Series 3x3 AGN",
114 .fw_name_pre = IWL6000_FW_PRE,
115 .ucode_api_max = IWL6000_UCODE_API_MAX,
116 .ucode_api_min = IWL6000_UCODE_API_MIN,
117 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
118 .ops = &iwl5000_ops,
119 .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
120 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
121 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
122 .mod_params = &iwl50_mod_params,
c0bac76a
JS
123 .valid_tx_ant = ANT_ABC,
124 .valid_rx_ant = ANT_ABC,
050681b7 125 .need_pll_cfg = false,
e1228374
JS
126};
127
128struct iwl_cfg iwl6050_3agn_cfg = {
129 .name = "6050 Series 3x3 AGN",
130 .fw_name_pre = IWL6050_FW_PRE,
131 .ucode_api_max = IWL6050_UCODE_API_MAX,
132 .ucode_api_min = IWL6050_UCODE_API_MIN,
133 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
134 .ops = &iwl5000_ops,
135 .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
136 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
137 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
138 .mod_params = &iwl50_mod_params,
c0bac76a
JS
139 .valid_tx_ant = ANT_ABC,
140 .valid_rx_ant = ANT_ABC,
050681b7 141 .need_pll_cfg = false,
e1228374
JS
142};
143
144MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
145MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
This page took 0.041699 seconds and 5 git commands to generate.