Skip to content

Commit b481de9

Browse files
Zhu YiDavid S. Miller
authored andcommitted
[IWLWIFI]: add iwlwifi wireless drivers
This patch adds the mac80211 based wireless drivers for the Intel PRO/Wireless 3945ABG/BG Network Connection and Intel Wireless WiFi Link AGN (4965) adapters. [ Move driver into it's own directory -DaveM ] Signed-off-by: Zhu Yi <[email protected]> Signed-off-by: John W. Linville <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 75388ac commit b481de9

28 files changed

+34833
-0
lines changed

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,6 +2080,15 @@ L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel
20802080
W: http://ipw2200.sourceforge.net
20812081
S: Supported
20822082

2083+
INTEL WIRELESS WIFI LINK (iwlwifi)
2084+
P: Zhu Yi
2085+
2086+
2087+
2088+
W: http://intellinuxwireless.org
2089+
T: git git://intellinuxwireless.org/repos/iwlwifi
2090+
S: Supported
2091+
20832092
IOC3 ETHERNET DRIVER
20842093
P: Ralf Baechle
20852094

drivers/net/wireless/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ config ADM8211
577577

578578
Thanks to Infineon-ADMtek for their support of this driver.
579579

580+
source "drivers/net/wireless/iwlwifi/Kconfig"
580581
source "drivers/net/wireless/hostap/Kconfig"
581582
source "drivers/net/wireless/bcm43xx/Kconfig"
582583
source "drivers/net/wireless/b43/Kconfig"

drivers/net/wireless/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o
5151
obj-$(CONFIG_RTL8187) += rtl8187.o
5252

5353
obj-$(CONFIG_ADM8211) += adm8211.o
54+
55+
obj-$(CONFIG_IWLWIFI) += iwlwifi/
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
config IWLWIFI
2+
bool "Intel Wireless WiFi Link Drivers"
3+
depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
4+
select FW_LOADER
5+
default n
6+
---help---
7+
Select to enable drivers based on the iwlwifi project. This
8+
project provides a common foundation for Intel's wireless
9+
drivers designed to use the mac80211 subsystem.
10+
11+
See <file:Documentation/networking/README.iwlwifi> for
12+
information on the capabilities currently enabled in this
13+
driver and for tips for debugging issues and problems.
14+
15+
config IWLWIFI_DEBUG
16+
bool "Enable full debugging output in iwlwifi drivers"
17+
depends on IWLWIFI
18+
default y
19+
---help---
20+
This option will enable debug tracing output for the iwlwifi
21+
drivers.
22+
23+
This will result in the kernel module being ~100k larger. You can
24+
control which debug output is sent to the kernel log by setting the
25+
value in
26+
27+
/sys/bus/pci/drivers/${DRIVER}/debug_level
28+
29+
This entry will only exist if this option is enabled.
30+
31+
To set a value, simply echo an 8-byte hex value to the same file:
32+
33+
% echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level
34+
35+
You can find the list of debug mask values in:
36+
drivers/net/wireless/mac80211/iwlwifi/iwl-debug.h
37+
38+
If this is your first time using this driver, you should say Y here
39+
as the debug information can assist others in helping you resolve
40+
any problems you may encounter.
41+
42+
config IWLWIFI_SENSITIVITY
43+
bool "Enable Sensitivity Calibration in iwlwifi drivers"
44+
depends on IWLWIFI
45+
default y
46+
---help---
47+
This option will enable sensitivity calibration for the iwlwifi
48+
drivers.
49+
50+
config IWLWIFI_SPECTRUM_MEASUREMENT
51+
bool "Enable Spectrum Measurement in iwlwifi drivers"
52+
depends on IWLWIFI
53+
default y
54+
---help---
55+
This option will enable spectrum measurement for the iwlwifi drivers.
56+
57+
config IWLWIFI_QOS
58+
bool "Enable Wireless QoS in iwlwifi drivers"
59+
depends on IWLWIFI
60+
default y
61+
---help---
62+
This option will enable wireless quality of service (QoS) for the
63+
iwlwifi drivers.
64+
65+
config IWLWIFI_HT
66+
bool "Enable 802.11n HT features in iwlwifi drivers"
67+
depends on EXPERIMENTAL
68+
depends on IWLWIFI && MAC80211_HT
69+
default n
70+
---help---
71+
This option enables IEEE 802.11n High Throughput features
72+
for the iwlwifi drivers.
73+
74+
config IWL4965
75+
tristate "Intel Wireless WiFi 4965AGN"
76+
depends on m && IWLWIFI && EXPERIMENTAL
77+
default m
78+
---help---
79+
Select to build the driver supporting the:
80+
81+
Intel Wireless WiFi Link 4965AGN
82+
83+
This driver uses the kernel's mac80211 subsystem.
84+
85+
See <file:Documentation/networking/README.iwlwifi> for
86+
information on the capabilities currently enabled in this
87+
driver and for tips for debugging any issues or problems.
88+
89+
In order to use this driver, you will need a microcode (uCode)
90+
image for it. You can obtain the microcode from:
91+
92+
<http://intellinuxwireless.org/>.
93+
94+
See the above referenced README.iwlwifi for information on where
95+
to install the microcode images.
96+
97+
If you want to compile the driver as a module ( = code which can be
98+
inserted in and remvoed from the running kernel whenever you want),
99+
say M here and read <file:Documentation/modules.txt>. The module
100+
will be called iwl4965.ko.
101+
102+
config IWL3945
103+
tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
104+
depends on m && IWLWIFI && EXPERIMENTAL
105+
default m
106+
---help---
107+
Select to build the driver supporting the:
108+
109+
Intel PRO/Wireless 3945ABG/BG Network Connection
110+
111+
This driver uses the kernel's mac80211 subsystem.
112+
113+
See <file:Documentation/networking/README.iwlwifi> for
114+
information on the capabilities currently enabled in this
115+
driver and for tips for debugging any issues or problems.
116+
117+
In order to use this driver, you will need a microcode (uCode)
118+
image for it. You can obtain the microcode from:
119+
120+
<http://intellinuxwireless.org/>.
121+
122+
See the above referenced README.iwlwifi for information on where
123+
to install the microcode images.
124+
125+
If you want to compile the driver as a module ( = code which can be
126+
inserted in and remvoed from the running kernel whenever you want),
127+
say M here and read <file:Documentation/modules.txt>. The module
128+
will be called iwl3945.ko.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
obj-$(CONFIG_IWL3945) += iwl3945.o
2+
iwl3945-objs = iwl3945-base.o iwl-3945.o iwl-3945-rs.o
3+
CFLAGS_iwl3945-base.o = -DIWL=3945
4+
CFLAGS_iwl-3945.o = -DIWL=3945
5+
CFLAGS_iwl-3945-rs.o = -DIWL=3945
6+
7+
obj-$(CONFIG_IWL4965) += iwl4965.o
8+
iwl4965-objs = iwl4965-base.o iwl-4965.o iwl-4965-rs.o
9+
CFLAGS_iwl4965-base.o = -DIWL=4965
10+
CFLAGS_iwl-4965.o = -DIWL=4965
11+
CFLAGS_iwl-4965-rs.o = -DIWL=4965
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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) 2005 - 2007 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 Geeral 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 <[email protected]>
29+
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
30+
*
31+
* BSD LICENSE
32+
*
33+
* Copyright(c) 2005 - 2007 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+
#ifndef __iwl_3945_hw__
65+
#define __iwl_3945_hw__
66+
67+
#define IWL_RX_BUF_SIZE 3000
68+
/* card static random access memory (SRAM) for processor data and instructs */
69+
#define ALM_RTC_INST_UPPER_BOUND (0x014000)
70+
#define ALM_RTC_DATA_UPPER_BOUND (0x808000)
71+
72+
#define ALM_RTC_INST_SIZE (ALM_RTC_INST_UPPER_BOUND - RTC_INST_LOWER_BOUND)
73+
#define ALM_RTC_DATA_SIZE (ALM_RTC_DATA_UPPER_BOUND - RTC_DATA_LOWER_BOUND)
74+
75+
#define IWL_MAX_BSM_SIZE ALM_RTC_INST_SIZE
76+
#define IWL_MAX_INST_SIZE ALM_RTC_INST_SIZE
77+
#define IWL_MAX_DATA_SIZE ALM_RTC_DATA_SIZE
78+
#define IWL_MAX_NUM_QUEUES 8
79+
80+
static inline int iwl_hw_valid_rtc_data_addr(u32 addr)
81+
{
82+
return (addr >= RTC_DATA_LOWER_BOUND) &&
83+
(addr < ALM_RTC_DATA_UPPER_BOUND);
84+
}
85+
86+
/* Base physical address of iwl_shared is provided to FH_TSSR_CBB_BASE
87+
* and &iwl_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */
88+
struct iwl_shared {
89+
__le32 tx_base_ptr[8];
90+
__le32 rx_read_ptr[3];
91+
} __attribute__ ((packed));
92+
93+
struct iwl_tfd_frame_data {
94+
__le32 addr;
95+
__le32 len;
96+
} __attribute__ ((packed));
97+
98+
struct iwl_tfd_frame {
99+
__le32 control_flags;
100+
struct iwl_tfd_frame_data pa[4];
101+
u8 reserved[28];
102+
} __attribute__ ((packed));
103+
104+
static inline u8 iwl_hw_get_rate(__le16 rate_n_flags)
105+
{
106+
return le16_to_cpu(rate_n_flags) & 0xFF;
107+
}
108+
109+
static inline u16 iwl_hw_get_rate_n_flags(__le16 rate_n_flags)
110+
{
111+
return le16_to_cpu(rate_n_flags);
112+
}
113+
114+
static inline __le16 iwl_hw_set_rate_n_flags(u8 rate, u16 flags)
115+
{
116+
return cpu_to_le16((u16)rate|flags);
117+
}
118+
#endif

0 commit comments

Comments
 (0)