diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-04-24 14:55:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:22 -0400 |
commit | 5a6a256e195380c062100dffad15f984656772c2 (patch) | |
tree | adce1700e958b2e638a31fd64db5f9a200d30560 /drivers | |
parent | 694cc56dbb818fe689f721fb53452eb5ad3f8e9a (diff) |
iwlwifi-5000: adding initial recognition for the 5000 family
This patch adds initial support for recognizing the iwl 5000 family of NICs
ID
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/Makefile | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000-hw.h | 79 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 93 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 5 |
6 files changed, 193 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index a5fdd0f21a7a..2bc7a9bfc56e 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -112,6 +112,14 @@ config IWLWIFI_DEBUG | |||
112 | as the debug information can assist others in helping you resolve | 112 | as the debug information can assist others in helping you resolve |
113 | any problems you may encounter. | 113 | any problems you may encounter. |
114 | 114 | ||
115 | config IWL5000 | ||
116 | bool "Intel Wireless WiFi 5000AGN" | ||
117 | depends on IWL4965 | ||
118 | ---help--- | ||
119 | This option enables support for Intel Wireless WiFi Link 5000AGN Family | ||
120 | Dependency on 4965 is temporary | ||
121 | |||
122 | |||
115 | config IWLWIFI_DEBUGFS | 123 | config IWLWIFI_DEBUGFS |
116 | bool "Iwlwifi debugfs support" | 124 | bool "Iwlwifi debugfs support" |
117 | depends on IWLCORE && IWLWIFI_DEBUG && MAC80211_DEBUGFS | 125 | depends on IWLCORE && IWLWIFI_DEBUG && MAC80211_DEBUGFS |
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index e2c05f5346ef..b0b2b5ebfa61 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -12,3 +12,8 @@ iwl3945-$(CONFIG_IWL3945_LEDS) += iwl-3945-led.o | |||
12 | obj-$(CONFIG_IWL4965) += iwl4965.o | 12 | obj-$(CONFIG_IWL4965) += iwl4965.o |
13 | iwl4965-objs := iwl4965-base.o iwl-4965.o iwl-4965-rs.o iwl-sta.o | 13 | iwl4965-objs := iwl4965-base.o iwl-4965.o iwl-4965-rs.o iwl-sta.o |
14 | 14 | ||
15 | ifeq ($(CONFIG_IWL5000),y) | ||
16 | iwl4965-objs += iwl-5000.o | ||
17 | endif | ||
18 | |||
19 | |||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index 7b7c6207c936..78fe8b731695 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -48,6 +48,9 @@ | |||
48 | 48 | ||
49 | /* configuration for the iwl4965 */ | 49 | /* configuration for the iwl4965 */ |
50 | extern struct iwl_cfg iwl4965_agn_cfg; | 50 | extern struct iwl_cfg iwl4965_agn_cfg; |
51 | extern struct iwl_cfg iwl5300_agn_cfg; | ||
52 | extern struct iwl_cfg iwl5100_agn_cfg; | ||
53 | extern struct iwl_cfg iwl5350_agn_cfg; | ||
51 | 54 | ||
52 | /* Change firmware file name, using "-" and incrementing number, | 55 | /* Change firmware file name, using "-" and incrementing number, |
53 | * *only* when uCode interface or architecture changes so that it | 56 | * *only* when uCode interface or architecture changes so that it |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000-hw.h b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h new file mode 100644 index 000000000000..72a266581aef --- /dev/null +++ b/drivers/net/wireless/iwlwifi/iwl-5000-hw.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * This file is provided under a dual BSD/GPLv2 license. When using or | ||
4 | * redistributing this file, you may do so under either license. | ||
5 | * | ||
6 | * GPL LICENSE SUMMARY | ||
7 | * | ||
8 | * Copyright(c) 2007 - 2008 Intel Corporation. All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of version 2 of the GNU General Public License as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, | ||
22 | * USA | ||
23 | * | ||
24 | * The full GNU General Public License is included in this distribution | ||
25 | * in the file called LICENSE.GPL. | ||
26 | * | ||
27 | * Contact Information: | ||
28 | * James P. Ketrenos <ipw2100-admin@linux.intel.com> | ||
29 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
30 | * | ||
31 | * BSD LICENSE | ||
32 | * | ||
33 | * Copyright(c) 2005 - 2008 Intel Corporation. All rights reserved. | ||
34 | * All rights reserved. | ||
35 | * | ||
36 | * Redistribution and use in source and binary forms, with or without | ||
37 | * modification, are permitted provided that the following conditions | ||
38 | * are met: | ||
39 | * | ||
40 | * * Redistributions of source code must retain the above copyright | ||
41 | * notice, this list of conditions and the following disclaimer. | ||
42 | * * Redistributions in binary form must reproduce the above copyright | ||
43 | * notice, this list of conditions and the following disclaimer in | ||
44 | * the documentation and/or other materials provided with the | ||
45 | * distribution. | ||
46 | * * Neither the name Intel Corporation nor the names of its | ||
47 | * contributors may be used to endorse or promote products derived | ||
48 | * from this software without specific prior written permission. | ||
49 | * | ||
50 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
51 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
52 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
53 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
54 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
56 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
57 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
58 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
59 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
61 | * | ||
62 | *****************************************************************************/ | ||
63 | /* | ||
64 | * Please use this file (iwl-5000-hw.h) only for hardware-related definitions. | ||
65 | * Use iwl-5000-commands.h for uCode API definitions. | ||
66 | */ | ||
67 | |||
68 | #ifndef __iwl_5000_hw_h__ | ||
69 | #define __iwl_5000_hw_h__ | ||
70 | |||
71 | |||
72 | #define IWL50_MAX_WIN_SIZE 64 | ||
73 | #define IWL50_QUEUE_SIZE 256 | ||
74 | #define IWL50_CMD_FIFO_NUM 7 | ||
75 | #define IWL50_NUM_QUEUES 20 | ||
76 | #define IWL50_BACK_QUEUE_FIRST_ID 10 | ||
77 | |||
78 | #endif /* __iwl_5000_hw_h__ */ | ||
79 | |||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c new file mode 100644 index 000000000000..2314e31fc78a --- /dev/null +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -0,0 +1,93 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Copyright(c) 2007-2008 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 Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
23 | * | ||
24 | *****************************************************************************/ | ||
25 | |||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/version.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-4965.h" | ||
42 | #include "iwl-core.h" | ||
43 | #include "iwl-io.h" | ||
44 | #include "iwl-helpers.h" | ||
45 | #include "iwl-5000-hw.h" | ||
46 | |||
47 | #define IWL5000_UCODE_API "-1" | ||
48 | |||
49 | static struct iwl_mod_params iwl50_mod_params = { | ||
50 | .num_of_queues = IWL50_NUM_QUEUES, | ||
51 | .enable_qos = 1, | ||
52 | .amsdu_size_8K = 1, | ||
53 | /* the rest are 0 by default */ | ||
54 | }; | ||
55 | |||
56 | |||
57 | struct iwl_cfg iwl5300_agn_cfg = { | ||
58 | .name = "5300AGN", | ||
59 | .fw_name = "iwlwifi-5000" IWL5000_UCODE_API ".ucode", | ||
60 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
61 | .mod_params = &iwl50_mod_params, | ||
62 | }; | ||
63 | |||
64 | struct iwl_cfg iwl5100_agn_cfg = { | ||
65 | .name = "5100AGN", | ||
66 | .fw_name = "iwlwifi-5000" IWL5000_UCODE_API ".ucode", | ||
67 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
68 | .mod_params = &iwl50_mod_params, | ||
69 | }; | ||
70 | |||
71 | struct iwl_cfg iwl5350_agn_cfg = { | ||
72 | .name = "5350AGN", | ||
73 | .fw_name = "iwlwifi-5000" IWL5000_UCODE_API ".ucode", | ||
74 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
75 | .mod_params = &iwl50_mod_params, | ||
76 | }; | ||
77 | |||
78 | module_param_named(disable50, iwl50_mod_params.disable, int, 0444); | ||
79 | MODULE_PARM_DESC(disable50, | ||
80 | "manually disable the 50XX radio (default 0 [radio on])"); | ||
81 | module_param_named(swcrypto50, iwl50_mod_params.sw_crypto, bool, 0444); | ||
82 | MODULE_PARM_DESC(swcrypto50, | ||
83 | "using software crypto engine (default 0 [hardware])\n"); | ||
84 | module_param_named(debug50, iwl50_mod_params.debug, int, 0444); | ||
85 | MODULE_PARM_DESC(debug50, "50XX debug output mask"); | ||
86 | module_param_named(queues_num50, iwl50_mod_params.num_of_queues, int, 0444); | ||
87 | MODULE_PARM_DESC(queues_num50, "number of hw queues in 50xx series"); | ||
88 | module_param_named(qos_enable50, iwl50_mod_params.enable_qos, int, 0444); | ||
89 | MODULE_PARM_DESC(qos_enable50, "enable all 50XX QoS functionality"); | ||
90 | module_param_named(amsdu_size_8K50, iwl50_mod_params.amsdu_size_8K, int, 0444); | ||
91 | MODULE_PARM_DESC(amsdu_size_8K50, "enable 8K amsdu size in 50XX series"); | ||
92 | |||
93 | |||
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index fbd82d80cad0..ea8b9756643b 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -7389,6 +7389,11 @@ static int iwl4965_pci_resume(struct pci_dev *pdev) | |||
7389 | static struct pci_device_id iwl_hw_card_ids[] = { | 7389 | static struct pci_device_id iwl_hw_card_ids[] = { |
7390 | {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)}, | 7390 | {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)}, |
7391 | {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)}, | 7391 | {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)}, |
7392 | #ifdef CONFIG_IWL5000 | ||
7393 | {IWL_PCI_DEVICE(0x4235, PCI_ANY_ID, iwl5300_agn_cfg)}, | ||
7394 | {IWL_PCI_DEVICE(0x4232, PCI_ANY_ID, iwl5100_agn_cfg)}, | ||
7395 | {IWL_PCI_DEVICE(0x423A, PCI_ANY_ID, iwl5350_agn_cfg)}, | ||
7396 | #endif /* CONFIG_IWL5000 */ | ||
7392 | {0} | 7397 | {0} |
7393 | }; | 7398 | }; |
7394 | MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); | 7399 | MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); |