aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/Makefile3
-rw-r--r--drivers/net/wireless/iwlwifi/Kconfig169
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-debug.h6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-io.h34
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h20
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-debug.h6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-io.h34
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c38
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c92
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h60
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c72
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c168
13 files changed, 368 insertions, 336 deletions
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 6f32b53ee12..d48f7d19745 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -52,7 +52,8 @@ obj-$(CONFIG_RTL8187) += rtl8187.o
52 52
53obj-$(CONFIG_ADM8211) += adm8211.o 53obj-$(CONFIG_ADM8211) += adm8211.o
54 54
55obj-$(CONFIG_IWLWIFI) += iwlwifi/ 55obj-$(CONFIG_IWL3945) += iwlwifi/
56obj-$(CONFIG_IWL4965) += iwlwifi/
56obj-$(CONFIG_RT2X00) += rt2x00/ 57obj-$(CONFIG_RT2X00) += rt2x00/
57 58
58obj-$(CONFIG_P54_COMMON) += p54common.o 59obj-$(CONFIG_P54_COMMON) += p54common.o
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index 8d52a26c248..74243fe9dca 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -1,107 +1,95 @@
1config IWLWIFI 1config IWL4965
2 bool "Intel Wireless WiFi Link Drivers" 2 tristate "Intel Wireless WiFi 4965AGN"
3 depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL 3 depends on m && PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
4 select FW_LOADER 4 select FW_LOADER
5 default n 5 default m
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
15config IWLWIFI_DEBUG
16 bool "Enable full debugging output in iwlwifi drivers"
17 depends on IWLWIFI
18 default y
19 ---help--- 6 ---help---
20 This option will enable debug tracing output for the iwlwifi 7 Select to build the driver supporting the:
21 drivers.
22 8
23 This will result in the kernel module being ~100k larger. You can 9 Intel Wireless WiFi Link 4965AGN
24 control which debug output is sent to the kernel log by setting the
25 value in
26 10
27 /sys/bus/pci/drivers/${DRIVER}/debug_level 11 This driver uses the kernel's mac80211 subsystem.
28 12
29 This entry will only exist if this option is enabled. 13 See <file:Documentation/networking/README.iwlwifi> for
14 information on the capabilities currently enabled in this
15 driver and for tips for debugging any issues or problems.
30 16
31 To set a value, simply echo an 8-byte hex value to the same file: 17 In order to use this driver, you will need a microcode (uCode)
18 image for it. You can obtain the microcode from:
32 19
33 % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level 20 <http://intellinuxwireless.org/>.
34 21
35 You can find the list of debug mask values in: 22 See the above referenced README.iwlwifi for information on where
36 drivers/net/wireless/mac80211/iwlwifi/iwl-debug.h 23 to install the microcode images.
37 24
38 If this is your first time using this driver, you should say Y here 25 If you want to compile the driver as a module ( = code which can be
39 as the debug information can assist others in helping you resolve 26 inserted in and remvoed from the running kernel whenever you want),
40 any problems you may encounter. 27 say M here and read <file:Documentation/kbuild/modules.txt>. The
28 module will be called iwl4965.ko.
41 29
42config IWLWIFI_SENSITIVITY 30config IWL4965_QOS
43 bool "Enable Sensitivity Calibration in iwlwifi drivers" 31 bool "Enable Wireless QoS in iwl4965 driver"
44 depends on IWLWIFI 32 depends on IWL4965
45 default y 33 default y
46 ---help--- 34 ---help---
47 This option will enable sensitivity calibration for the iwlwifi 35 This option will enable wireless quality of service (QoS) for the
48 drivers. 36 iw4965 driver.
49 37
50config IWLWIFI_SPECTRUM_MEASUREMENT 38config IWL4965_SPECTRUM_MEASUREMENT
51 bool "Enable Spectrum Measurement in iwlwifi drivers" 39 bool "Enable Spectrum Measurement in iw4965 driver"
52 depends on IWLWIFI 40 depends on IWL4965
53 default y 41 default y
54 ---help--- 42 ---help---
55 This option will enable spectrum measurement for the iwlwifi drivers. 43 This option will enable spectrum measurement for the iwl4965 driver.
56 44
57config IWLWIFI_QOS 45config IWL4965_SENSITIVITY
58 bool "Enable Wireless QoS in iwlwifi drivers" 46 bool "Enable Sensitivity Calibration in iwl4965 driver"
59 depends on IWLWIFI 47 depends on IWL4965
60 default y 48 default y
61 ---help--- 49 ---help---
62 This option will enable wireless quality of service (QoS) for the 50 This option will enable sensitivity calibration for the iwl4965
63 iwlwifi drivers. 51 driver.
64 52
65config IWLWIFI_HT 53config IWL4965_HT
66 bool "Enable 802.11n HT features in iwlwifi drivers" 54 bool "Enable 802.11n HT features in iwl4965 driver"
67 depends on EXPERIMENTAL 55 depends on EXPERIMENTAL
68 depends on IWLWIFI && MAC80211_HT 56 depends on IWL4965 && MAC80211_HT
69 default n 57 default n
70 ---help--- 58 ---help---
71 This option enables IEEE 802.11n High Throughput features 59 This option enables IEEE 802.11n High Throughput features
72 for the iwlwifi drivers. 60 for the iwl4965 driver.
73 61
74config IWL4965 62config IWL4965_DEBUG
75 tristate "Intel Wireless WiFi 4965AGN" 63 bool "Enable full debugging output in iwl4965 driver"
76 depends on m && IWLWIFI && EXPERIMENTAL 64 depends on IWL4965
77 default m 65 default y
78 ---help--- 66 ---help---
79 Select to build the driver supporting the: 67 This option will enable debug tracing output for the iwl4965
68 driver.
80 69
81 Intel Wireless WiFi Link 4965AGN 70 This will result in the kernel module being ~100k larger. You can
71 control which debug output is sent to the kernel log by setting the
72 value in
82 73
83 This driver uses the kernel's mac80211 subsystem. 74 /sys/bus/pci/drivers/${DRIVER}/debug_level
84 75
85 See <file:Documentation/networking/README.iwlwifi> for 76 This entry will only exist if this option is enabled.
86 information on the capabilities currently enabled in this
87 driver and for tips for debugging any issues or problems.
88 77
89 In order to use this driver, you will need a microcode (uCode) 78 To set a value, simply echo an 8-byte hex value to the same file:
90 image for it. You can obtain the microcode from:
91 79
92 <http://intellinuxwireless.org/>. 80 % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level
93 81
94 See the above referenced README.iwlwifi for information on where 82 You can find the list of debug mask values in:
95 to install the microcode images. 83 drivers/net/wireless/iwlwifi/iwl-4965-debug.h
96 84
97 If you want to compile the driver as a module ( = code which can be 85 If this is your first time using this driver, you should say Y here
98 inserted in and remvoed from the running kernel whenever you want), 86 as the debug information can assist others in helping you resolve
99 say M here and read <file:Documentation/kbuild/modules.txt>. The 87 any problems you may encounter.
100 module will be called iwl4965.ko.
101 88
102config IWL3945 89config IWL3945
103 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection" 90 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
104 depends on m && IWLWIFI && EXPERIMENTAL 91 depends on m && PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
92 select FW_LOADER
105 default m 93 default m
106 ---help--- 94 ---help---
107 Select to build the driver supporting the: 95 Select to build the driver supporting the:
@@ -126,3 +114,46 @@ config IWL3945
126 inserted in and remvoed from the running kernel whenever you want), 114 inserted in and remvoed from the running kernel whenever you want),
127 say M here and read <file:Documentation/kbuild/modules.txt>. The 115 say M here and read <file:Documentation/kbuild/modules.txt>. The
128 module will be called iwl3945.ko. 116 module will be called iwl3945.ko.
117
118config IWL3945_QOS
119 bool "Enable Wireless QoS in iwl3945 driver"
120 depends on IWL3945
121 default y
122 ---help---
123 This option will enable wireless quality of service (QoS) for the
124 iwl3945 driver.
125
126config IWL3945_SPECTRUM_MEASUREMENT
127 bool "Enable Spectrum Measurement in iwl3945 drivers"
128 depends on IWL3945
129 default y
130 ---help---
131 This option will enable spectrum measurement for the iwl3945 driver.
132
133config IWL3945_DEBUG
134 bool "Enable full debugging output in iwl3945 driver"
135 depends on IWL3945
136 default y
137 ---help---
138 This option will enable debug tracing output for the iwl3945
139 driver.
140
141 This will result in the kernel module being ~100k larger. You can
142 control which debug output is sent to the kernel log by setting the
143 value in
144
145 /sys/bus/pci/drivers/${DRIVER}/debug_level
146
147 This entry will only exist if this option is enabled.
148
149 To set a value, simply echo an 8-byte hex value to the same file:
150
151 % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level
152
153 You can find the list of debug mask values in:
154 drivers/net/wireless/iwlwifi/iwl-3945-debug.h
155
156 If this is your first time using this driver, you should say Y here
157 as the debug information can assist others in helping you resolve
158 any problems you may encounter.
159
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-debug.h b/drivers/net/wireless/iwlwifi/iwl-3945-debug.h
index 72318d78957..d0ea83404e0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-debug.h
@@ -29,7 +29,7 @@
29#ifndef __iwl_debug_h__ 29#ifndef __iwl_debug_h__
30#define __iwl_debug_h__ 30#define __iwl_debug_h__
31 31
32#ifdef CONFIG_IWLWIFI_DEBUG 32#ifdef CONFIG_IWL3945_DEBUG
33extern u32 iwl_debug_level; 33extern u32 iwl_debug_level;
34#define IWL_DEBUG(level, fmt, args...) \ 34#define IWL_DEBUG(level, fmt, args...) \
35do { if (iwl_debug_level & (level)) \ 35do { if (iwl_debug_level & (level)) \
@@ -47,7 +47,7 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)
47static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) 47static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
48{ 48{
49} 49}
50#endif /* CONFIG_IWLWIFI_DEBUG */ 50#endif /* CONFIG_IWL3945_DEBUG */
51 51
52/* 52/*
53 * To use the debug system; 53 * To use the debug system;
@@ -71,7 +71,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
71 * you simply need to add your entry to the iwl_debug_levels array. 71 * you simply need to add your entry to the iwl_debug_levels array.
72 * 72 *
73 * If you do not see debug_level in /proc/net/iwl then you do not have 73 * If you do not see debug_level in /proc/net/iwl then you do not have
74 * CONFIG_IWLWIFI_DEBUG defined in your kernel configuration 74 * CONFIG_IWL3945_DEBUG defined in your kernel configuration
75 * 75 *
76 */ 76 */
77 77
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-io.h b/drivers/net/wireless/iwlwifi/iwl-3945-io.h
index 89253e13353..74a51798c23 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-io.h
@@ -60,7 +60,7 @@
60 */ 60 */
61 61
62#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) 62#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs))
63#ifdef CONFIG_IWLWIFI_DEBUG 63#ifdef CONFIG_IWL3945_DEBUG
64static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, 64static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
65 u32 ofs, u32 val) 65 u32 ofs, u32 val)
66{ 66{
@@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
74#endif 74#endif
75 75
76#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs)) 76#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs))
77#ifdef CONFIG_IWLWIFI_DEBUG 77#ifdef CONFIG_IWL3945_DEBUG
78static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs) 78static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs)
79{ 79{
80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l); 80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
@@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
99 99
100 return -ETIMEDOUT; 100 return -ETIMEDOUT;
101} 101}
102#ifdef CONFIG_IWLWIFI_DEBUG 102#ifdef CONFIG_IWL3945_DEBUG
103static inline int __iwl_poll_bit(const char *f, u32 l, 103static inline int __iwl_poll_bit(const char *f, u32 l,
104 struct iwl_priv *priv, u32 addr, 104 struct iwl_priv *priv, u32 addr,
105 u32 bits, u32 mask, int timeout) 105 u32 bits, u32 mask, int timeout)
@@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask)
125{ 125{
126 _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask); 126 _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask);
127} 127}
128#ifdef CONFIG_IWLWIFI_DEBUG 128#ifdef CONFIG_IWL3945_DEBUG
129static inline void __iwl_set_bit(const char *f, u32 l, 129static inline void __iwl_set_bit(const char *f, u32 l,
130 struct iwl_priv *priv, u32 reg, u32 mask) 130 struct iwl_priv *priv, u32 reg, u32 mask)
131{ 131{
@@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask)
142{ 142{
143 _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask); 143 _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask);
144} 144}
145#ifdef CONFIG_IWLWIFI_DEBUG 145#ifdef CONFIG_IWL3945_DEBUG
146static inline void __iwl_clear_bit(const char *f, u32 l, 146static inline void __iwl_clear_bit(const char *f, u32 l,
147 struct iwl_priv *priv, u32 reg, u32 mask) 147 struct iwl_priv *priv, u32 reg, u32 mask)
148{ 148{
@@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
160 int ret; 160 int ret;
161 u32 gp_ctl; 161 u32 gp_ctl;
162 162
163#ifdef CONFIG_IWLWIFI_DEBUG 163#ifdef CONFIG_IWL3945_DEBUG
164 if (atomic_read(&priv->restrict_refcnt)) 164 if (atomic_read(&priv->restrict_refcnt))
165 return 0; 165 return 0;
166#endif 166#endif
@@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
191 return -EIO; 191 return -EIO;
192 } 192 }
193 193
194#ifdef CONFIG_IWLWIFI_DEBUG 194#ifdef CONFIG_IWL3945_DEBUG
195 atomic_inc(&priv->restrict_refcnt); 195 atomic_inc(&priv->restrict_refcnt);
196#endif 196#endif
197 return 0; 197 return 0;
198} 198}
199 199
200#ifdef CONFIG_IWLWIFI_DEBUG 200#ifdef CONFIG_IWL3945_DEBUG
201static inline int __iwl_grab_nic_access(const char *f, u32 l, 201static inline int __iwl_grab_nic_access(const char *f, u32 l,
202 struct iwl_priv *priv) 202 struct iwl_priv *priv)
203{ 203{
@@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l,
217 217
218static inline void _iwl_release_nic_access(struct iwl_priv *priv) 218static inline void _iwl_release_nic_access(struct iwl_priv *priv)
219{ 219{
220#ifdef CONFIG_IWLWIFI_DEBUG 220#ifdef CONFIG_IWL3945_DEBUG
221 if (atomic_dec_and_test(&priv->restrict_refcnt)) 221 if (atomic_dec_and_test(&priv->restrict_refcnt))
222#endif 222#endif
223 _iwl_clear_bit(priv, CSR_GP_CNTRL, 223 _iwl_clear_bit(priv, CSR_GP_CNTRL,
224 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 224 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
225} 225}
226#ifdef CONFIG_IWLWIFI_DEBUG 226#ifdef CONFIG_IWL3945_DEBUG
227static inline void __iwl_release_nic_access(const char *f, u32 l, 227static inline void __iwl_release_nic_access(const char *f, u32 l,
228 struct iwl_priv *priv) 228 struct iwl_priv *priv)
229{ 229{
@@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg)
244{ 244{
245 return _iwl_read32(priv, reg); 245 return _iwl_read32(priv, reg);
246} 246}
247#ifdef CONFIG_IWLWIFI_DEBUG 247#ifdef CONFIG_IWL3945_DEBUG
248static inline u32 __iwl_read_direct32(const char *f, u32 l, 248static inline u32 __iwl_read_direct32(const char *f, u32 l,
249 struct iwl_priv *priv, u32 reg) 249 struct iwl_priv *priv, u32 reg)
250{ 250{
@@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv,
266{ 266{
267 _iwl_write32(priv, reg, value); 267 _iwl_write32(priv, reg, value);
268} 268}
269#ifdef CONFIG_IWLWIFI_DEBUG 269#ifdef CONFIG_IWL3945_DEBUG
270static void __iwl_write_direct32(u32 line, 270static void __iwl_write_direct32(u32 line,
271 struct iwl_priv *priv, u32 reg, u32 value) 271 struct iwl_priv *priv, u32 reg, u32 value)
272{ 272{
@@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
306 return -ETIMEDOUT; 306 return -ETIMEDOUT;
307} 307}
308 308
309#ifdef CONFIG_IWLWIFI_DEBUG 309#ifdef CONFIG_IWL3945_DEBUG
310static inline int __iwl_poll_direct_bit(const char *f, u32 l, 310static inline int __iwl_poll_direct_bit(const char *f, u32 l,
311 struct iwl_priv *priv, 311 struct iwl_priv *priv,
312 u32 addr, u32 mask, int timeout) 312 u32 addr, u32 mask, int timeout)
@@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg)
332 _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); 332 _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
333 return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT); 333 return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
334} 334}
335#ifdef CONFIG_IWLWIFI_DEBUG 335#ifdef CONFIG_IWL3945_DEBUG
336static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg) 336static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg)
337{ 337{
338 if (!atomic_read(&priv->restrict_refcnt)) 338 if (!atomic_read(&priv->restrict_refcnt))
@@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv,
353 ((addr & 0x0000FFFF) | (3 << 24))); 353 ((addr & 0x0000FFFF) | (3 << 24)));
354 _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); 354 _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
355} 355}
356#ifdef CONFIG_IWLWIFI_DEBUG 356#ifdef CONFIG_IWL3945_DEBUG
357static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, 357static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
358 u32 addr, u32 val) 358 u32 addr, u32 val)
359{ 359{
@@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
370 370
371#define _iwl_set_bits_prph(priv, reg, mask) \ 371#define _iwl_set_bits_prph(priv, reg, mask) \
372 _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) 372 _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask))
373#ifdef CONFIG_IWLWIFI_DEBUG 373#ifdef CONFIG_IWL3945_DEBUG
374static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, 374static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
375 u32 reg, u32 mask) 375 u32 reg, u32 mask)
376{ 376{
@@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
388#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \ 388#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \
389 _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) 389 _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits))
390 390
391#ifdef CONFIG_IWLWIFI_DEBUG 391#ifdef CONFIG_IWL3945_DEBUG
392static inline void __iwl_set_bits_mask_prph(u32 line, 392static inline void __iwl_set_bits_mask_prph(u32 line,
393 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask) 393 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
394{ 394{
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 53fe9c1c174..39e7b07248c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -371,7 +371,7 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
371 371
372 network_packet = iwl_is_network_packet(priv, header); 372 network_packet = iwl_is_network_packet(priv, header);
373 373
374#ifdef CONFIG_IWLWIFI_DEBUG 374#ifdef CONFIG_IWL3945_DEBUG
375 if (iwl_debug_level & IWL_DL_STATS && net_ratelimit()) 375 if (iwl_debug_level & IWL_DL_STATS && net_ratelimit())
376 IWL_DEBUG_STATS 376 IWL_DEBUG_STATS
377 ("[%c] %d RSSI: %d Signal: %u, Noise: %u, Rate: %u\n", 377 ("[%c] %d RSSI: %d Signal: %u, Noise: %u, Rate: %u\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index ab8412270f6..d1616bf9bc8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -445,7 +445,7 @@ union iwl_ht_rate_supp {
445 }; 445 };
446}; 446};
447 447
448#ifdef CONFIG_IWLWIFI_HT 448#ifdef CONFIG_IWL3945_HT
449#define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3) 449#define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3)
450#define HT_IE_MAX_AMSDU_SIZE_4K (0) 450#define HT_IE_MAX_AMSDU_SIZE_4K (0)
451#define CFG_HT_MPDU_DENSITY_2USEC (0x5) 451#define CFG_HT_MPDU_DENSITY_2USEC (0x5)
@@ -468,9 +468,9 @@ struct sta_ht_info {
468 u8 tx_chan_width; 468 u8 tx_chan_width;
469 u8 chan_width_cap; 469 u8 chan_width_cap;
470}; 470};
471#endif /*CONFIG_IWLWIFI_HT */ 471#endif /*CONFIG_IWL3945_HT */
472 472
473#ifdef CONFIG_IWLWIFI_QOS 473#ifdef CONFIG_IWL3945_QOS
474 474
475union iwl_qos_capabity { 475union iwl_qos_capabity {
476 struct { 476 struct {
@@ -499,7 +499,7 @@ struct iwl_qos_info {
499 union iwl_qos_capabity qos_cap; 499 union iwl_qos_capabity qos_cap;
500 struct iwl_qosparam_cmd def_qos_parm; 500 struct iwl_qosparam_cmd def_qos_parm;
501}; 501};
502#endif /*CONFIG_IWLWIFI_QOS */ 502#endif /*CONFIG_IWL3945_QOS */
503 503
504#define STA_PS_STATUS_WAKE 0 504#define STA_PS_STATUS_WAKE 0
505#define STA_PS_STATUS_SLEEP 1 505#define STA_PS_STATUS_SLEEP 1
@@ -598,7 +598,7 @@ extern int iwl_is_network_packet(struct iwl_priv *priv,
598 struct ieee80211_hdr *header); 598 struct ieee80211_hdr *header);
599extern int iwl_power_init_handle(struct iwl_priv *priv); 599extern int iwl_power_init_handle(struct iwl_priv *priv);
600extern int iwl_eeprom_init(struct iwl_priv *priv); 600extern int iwl_eeprom_init(struct iwl_priv *priv);
601#ifdef CONFIG_IWLWIFI_DEBUG 601#ifdef CONFIG_IWL3945_DEBUG
602extern void iwl_report_frame(struct iwl_priv *priv, 602extern void iwl_report_frame(struct iwl_priv *priv,
603 struct iwl_rx_packet *pkt, 603 struct iwl_rx_packet *pkt,
604 struct ieee80211_hdr *header, int group100); 604 struct ieee80211_hdr *header, int group100);
@@ -717,7 +717,7 @@ extern u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id,
717 u16 tx_rate, u8 flags); 717 u16 tx_rate, u8 flags);
718 718
719 719
720#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 720#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
721 721
722enum { 722enum {
723 MEASUREMENT_READY = (1 << 0), 723 MEASUREMENT_READY = (1 << 0),
@@ -745,7 +745,7 @@ struct iwl_priv {
745 745
746 const struct ieee80211_hw_mode *modes; 746 const struct ieee80211_hw_mode *modes;
747 747
748#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 748#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
749 /* spectrum measurement report caching */ 749 /* spectrum measurement report caching */
750 struct iwl_spectrum_notification measure_report; 750 struct iwl_spectrum_notification measure_report;
751 u8 measurement_status; 751 u8 measurement_status;
@@ -904,9 +904,9 @@ struct iwl_priv {
904 u16 assoc_capability; 904 u16 assoc_capability;
905 u8 ps_mode; 905 u8 ps_mode;
906 906
907#ifdef CONFIG_IWLWIFI_QOS 907#ifdef CONFIG_IWL3945_QOS
908 struct iwl_qos_info qos_data; 908 struct iwl_qos_info qos_data;
909#endif /*CONFIG_IWLWIFI_QOS */ 909#endif /*CONFIG_IWL3945_QOS */
910 910
911 struct workqueue_struct *workqueue; 911 struct workqueue_struct *workqueue;
912 912
@@ -941,7 +941,7 @@ struct iwl_priv {
941 u32 pm_state[16]; 941 u32 pm_state[16];
942#endif 942#endif
943 943
944#ifdef CONFIG_IWLWIFI_DEBUG 944#ifdef CONFIG_IWL3945_DEBUG
945 /* debugging info */ 945 /* debugging info */
946 u32 framecnt_to_us; 946 u32 framecnt_to_us;
947 atomic_t restrict_refcnt; 947 atomic_t restrict_refcnt;
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-debug.h b/drivers/net/wireless/iwlwifi/iwl-4965-debug.h
index 72318d78957..0c74883d2f8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-debug.h
@@ -29,7 +29,7 @@
29#ifndef __iwl_debug_h__ 29#ifndef __iwl_debug_h__
30#define __iwl_debug_h__ 30#define __iwl_debug_h__
31 31
32#ifdef CONFIG_IWLWIFI_DEBUG 32#ifdef CONFIG_IWL4965_DEBUG
33extern u32 iwl_debug_level; 33extern u32 iwl_debug_level;
34#define IWL_DEBUG(level, fmt, args...) \ 34#define IWL_DEBUG(level, fmt, args...) \
35do { if (iwl_debug_level & (level)) \ 35do { if (iwl_debug_level & (level)) \
@@ -47,7 +47,7 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)
47static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) 47static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
48{ 48{
49} 49}
50#endif /* CONFIG_IWLWIFI_DEBUG */ 50#endif /* CONFIG_IWL4965_DEBUG */
51 51
52/* 52/*
53 * To use the debug system; 53 * To use the debug system;
@@ -71,7 +71,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
71 * you simply need to add your entry to the iwl_debug_levels array. 71 * you simply need to add your entry to the iwl_debug_levels array.
72 * 72 *
73 * If you do not see debug_level in /proc/net/iwl then you do not have 73 * If you do not see debug_level in /proc/net/iwl then you do not have
74 * CONFIG_IWLWIFI_DEBUG defined in your kernel configuration 74 * CONFIG_IWL4965_DEBUG defined in your kernel configuration
75 * 75 *
76 */ 76 */
77 77
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-io.h b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
index 1ffa8f1e17c..5c497e4beea 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
@@ -60,7 +60,7 @@
60 */ 60 */
61 61
62#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) 62#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs))
63#ifdef CONFIG_IWLWIFI_DEBUG 63#ifdef CONFIG_IWL4965_DEBUG
64static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, 64static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
65 u32 ofs, u32 val) 65 u32 ofs, u32 val)
66{ 66{
@@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
74#endif 74#endif
75 75
76#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs)) 76#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs))
77#ifdef CONFIG_IWLWIFI_DEBUG 77#ifdef CONFIG_IWL4965_DEBUG
78static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs) 78static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs)
79{ 79{
80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l); 80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
@@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
99 99
100 return -ETIMEDOUT; 100 return -ETIMEDOUT;
101} 101}
102#ifdef CONFIG_IWLWIFI_DEBUG 102#ifdef CONFIG_IWL4965_DEBUG
103static inline int __iwl_poll_bit(const char *f, u32 l, 103static inline int __iwl_poll_bit(const char *f, u32 l,
104 struct iwl_priv *priv, u32 addr, 104 struct iwl_priv *priv, u32 addr,
105 u32 bits, u32 mask, int timeout) 105 u32 bits, u32 mask, int timeout)
@@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask)
125{ 125{
126 _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask); 126 _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask);
127} 127}
128#ifdef CONFIG_IWLWIFI_DEBUG 128#ifdef CONFIG_IWL4965_DEBUG
129static inline void __iwl_set_bit(const char *f, u32 l, 129static inline void __iwl_set_bit(const char *f, u32 l,
130 struct iwl_priv *priv, u32 reg, u32 mask) 130 struct iwl_priv *priv, u32 reg, u32 mask)
131{ 131{
@@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask)
142{ 142{
143 _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask); 143 _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask);
144} 144}
145#ifdef CONFIG_IWLWIFI_DEBUG 145#ifdef CONFIG_IWL4965_DEBUG
146static inline void __iwl_clear_bit(const char *f, u32 l, 146static inline void __iwl_clear_bit(const char *f, u32 l,
147 struct iwl_priv *priv, u32 reg, u32 mask) 147 struct iwl_priv *priv, u32 reg, u32 mask)
148{ 148{
@@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
160 int ret; 160 int ret;
161 u32 gp_ctl; 161 u32 gp_ctl;
162 162
163#ifdef CONFIG_IWLWIFI_DEBUG 163#ifdef CONFIG_IWL4965_DEBUG
164 if (atomic_read(&priv->restrict_refcnt)) 164 if (atomic_read(&priv->restrict_refcnt))
165 return 0; 165 return 0;
166#endif 166#endif
@@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
191 return -EIO; 191 return -EIO;
192 } 192 }
193 193
194#ifdef CONFIG_IWLWIFI_DEBUG 194#ifdef CONFIG_IWL4965_DEBUG
195 atomic_inc(&priv->restrict_refcnt); 195 atomic_inc(&priv->restrict_refcnt);
196#endif 196#endif
197 return 0; 197 return 0;
198} 198}
199 199
200#ifdef CONFIG_IWLWIFI_DEBUG 200#ifdef CONFIG_IWL4965_DEBUG
201static inline int __iwl_grab_nic_access(const char *f, u32 l, 201static inline int __iwl_grab_nic_access(const char *f, u32 l,
202 struct iwl_priv *priv) 202 struct iwl_priv *priv)
203{ 203{
@@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l,
217 217
218static inline void _iwl_release_nic_access(struct iwl_priv *priv) 218static inline void _iwl_release_nic_access(struct iwl_priv *priv)
219{ 219{
220#ifdef CONFIG_IWLWIFI_DEBUG 220#ifdef CONFIG_IWL4965_DEBUG
221 if (atomic_dec_and_test(&priv->restrict_refcnt)) 221 if (atomic_dec_and_test(&priv->restrict_refcnt))
222#endif 222#endif
223 _iwl_clear_bit(priv, CSR_GP_CNTRL, 223 _iwl_clear_bit(priv, CSR_GP_CNTRL,
224 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 224 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
225} 225}
226#ifdef CONFIG_IWLWIFI_DEBUG 226#ifdef CONFIG_IWL4965_DEBUG
227static inline void __iwl_release_nic_access(const char *f, u32 l, 227static inline void __iwl_release_nic_access(const char *f, u32 l,
228 struct iwl_priv *priv) 228 struct iwl_priv *priv)
229{ 229{
@@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg)
244{ 244{
245 return _iwl_read32(priv, reg); 245 return _iwl_read32(priv, reg);
246} 246}
247#ifdef CONFIG_IWLWIFI_DEBUG 247#ifdef CONFIG_IWL4965_DEBUG
248static inline u32 __iwl_read_direct32(const char *f, u32 l, 248static inline u32 __iwl_read_direct32(const char *f, u32 l,
249 struct iwl_priv *priv, u32 reg) 249 struct iwl_priv *priv, u32 reg)
250{ 250{
@@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv,
266{ 266{
267 _iwl_write32(priv, reg, value); 267 _iwl_write32(priv, reg, value);
268} 268}
269#ifdef CONFIG_IWLWIFI_DEBUG 269#ifdef CONFIG_IWL4965_DEBUG
270static void __iwl_write_direct32(u32 line, 270static void __iwl_write_direct32(u32 line,
271 struct iwl_priv *priv, u32 reg, u32 value) 271 struct iwl_priv *priv, u32 reg, u32 value)
272{ 272{
@@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
306 return -ETIMEDOUT; 306 return -ETIMEDOUT;
307} 307}
308 308
309#ifdef CONFIG_IWLWIFI_DEBUG 309#ifdef CONFIG_IWL4965_DEBUG
310static inline int __iwl_poll_direct_bit(const char *f, u32 l, 310static inline int __iwl_poll_direct_bit(const char *f, u32 l,
311 struct iwl_priv *priv, 311 struct iwl_priv *priv,
312 u32 addr, u32 mask, int timeout) 312 u32 addr, u32 mask, int timeout)
@@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg)
332 _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); 332 _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
333 return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT); 333 return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
334} 334}
335#ifdef CONFIG_IWLWIFI_DEBUG 335#ifdef CONFIG_IWL4965_DEBUG
336static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg) 336static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg)
337{ 337{
338 if (!atomic_read(&priv->restrict_refcnt)) 338 if (!atomic_read(&priv->restrict_refcnt))
@@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv,
353 ((addr & 0x0000FFFF) | (3 << 24))); 353 ((addr & 0x0000FFFF) | (3 << 24)));
354 _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); 354 _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
355} 355}
356#ifdef CONFIG_IWLWIFI_DEBUG 356#ifdef CONFIG_IWL4965_DEBUG
357static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, 357static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
358 u32 addr, u32 val) 358 u32 addr, u32 val)
359{ 359{
@@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
370 370
371#define _iwl_set_bits_prph(priv, reg, mask) \ 371#define _iwl_set_bits_prph(priv, reg, mask) \
372 _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) 372 _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask))
373#ifdef CONFIG_IWLWIFI_DEBUG 373#ifdef CONFIG_IWL4965_DEBUG
374static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, 374static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
375 u32 reg, u32 mask) 375 u32 reg, u32 mask)
376{ 376{
@@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
388#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \ 388#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \
389 _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) 389 _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits))
390 390
391#ifdef CONFIG_IWLWIFI_DEBUG 391#ifdef CONFIG_IWL4965_DEBUG
392static inline void __iwl_set_bits_mask_prph(u32 line, 392static inline void __iwl_set_bits_mask_prph(u32 line,
393 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask) 393 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
394{ 394{
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 0e384e60648..8f6e9f8395c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -197,7 +197,7 @@ static inline u8 iwl_rate_get_rate(u32 rate_n_flags)
197static int rs_send_lq_cmd(struct iwl_priv *priv, 197static int rs_send_lq_cmd(struct iwl_priv *priv,
198 struct iwl_link_quality_cmd *lq, u8 flags) 198 struct iwl_link_quality_cmd *lq, u8 flags)
199{ 199{
200#ifdef CONFIG_IWLWIFI_DEBUG 200#ifdef CONFIG_IWL4965_DEBUG
201 int i; 201 int i;
202#endif 202#endif
203 struct iwl_host_cmd cmd = { 203 struct iwl_host_cmd cmd = {
@@ -218,7 +218,7 @@ static int rs_send_lq_cmd(struct iwl_priv *priv,
218 IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n", 218 IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n",
219 lq->general_params.single_stream_ant_msk, 219 lq->general_params.single_stream_ant_msk,
220 lq->general_params.dual_stream_ant_msk); 220 lq->general_params.dual_stream_ant_msk);
221#ifdef CONFIG_IWLWIFI_DEBUG 221#ifdef CONFIG_IWL4965_DEBUG
222 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) 222 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++)
223 IWL_DEBUG_RATE("lq index %d 0x%X\n", 223 IWL_DEBUG_RATE("lq index %d 0x%X\n",
224 i, lq->rs_table[i].rate_n_flags); 224 i, lq->rs_table[i].rate_n_flags);
@@ -442,13 +442,13 @@ static inline void rs_toggle_antenna(struct iwl_rate *new_rate,
442 442
443static inline u8 rs_use_green(struct iwl_priv *priv) 443static inline u8 rs_use_green(struct iwl_priv *priv)
444{ 444{
445#ifdef CONFIG_IWLWIFI_HT 445#ifdef CONFIG_IWL4965_HT
446 if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht) 446 if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht)
447 return 0; 447 return 0;
448 448
449 return ((priv->current_assoc_ht.is_green_field) && 449 return ((priv->current_assoc_ht.is_green_field) &&
450 !(priv->current_assoc_ht.operating_mode & 0x4)); 450 !(priv->current_assoc_ht.operating_mode & 0x4));
451#endif /*CONFIG_IWLWIFI_HT */ 451#endif /*CONFIG_IWL4965_HT */
452 return 0; 452 return 0;
453} 453}
454 454
@@ -826,7 +826,7 @@ static void rs_get_expected_tpt_table(struct iwl_rate_scale_priv *lq_data,
826 tbl->expected_tpt = expected_tpt_G; 826 tbl->expected_tpt = expected_tpt_G;
827} 827}
828 828
829#ifdef CONFIG_IWLWIFI_HT 829#ifdef CONFIG_IWL4965_HT
830static s32 rs_get_best_rate(struct iwl_priv *priv, 830static s32 rs_get_best_rate(struct iwl_priv *priv,
831 struct iwl_rate_scale_priv *lq_data, 831 struct iwl_rate_scale_priv *lq_data,
832 struct iwl_scale_tbl_info *tbl, 832 struct iwl_scale_tbl_info *tbl,
@@ -879,7 +879,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv,
879 879
880 return new_rate; 880 return new_rate;
881} 881}
882#endif /* CONFIG_IWLWIFI_HT */ 882#endif /* CONFIG_IWL4965_HT */
883 883
884static inline u8 rs_is_both_ant_supp(u8 valid_antenna) 884static inline u8 rs_is_both_ant_supp(u8 valid_antenna)
885{ 885{
@@ -890,7 +890,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,
890 struct iwl_rate_scale_priv *lq_data, 890 struct iwl_rate_scale_priv *lq_data,
891 struct iwl_scale_tbl_info *tbl, int index) 891 struct iwl_scale_tbl_info *tbl, int index)
892{ 892{
893#ifdef CONFIG_IWLWIFI_HT 893#ifdef CONFIG_IWL4965_HT
894 u16 rate_mask; 894 u16 rate_mask;
895 s32 rate; 895 s32 rate;
896 s8 is_green = lq_data->is_green; 896 s8 is_green = lq_data->is_green;
@@ -938,7 +938,7 @@ static int rs_switch_to_mimo(struct iwl_priv *priv,
938 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", 938 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n",
939 tbl->current_rate.rate_n_flags, is_green); 939 tbl->current_rate.rate_n_flags, is_green);
940 940
941#endif /*CONFIG_IWLWIFI_HT */ 941#endif /*CONFIG_IWL4965_HT */
942 return 0; 942 return 0;
943} 943}
944 944
@@ -946,7 +946,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
946 struct iwl_rate_scale_priv *lq_data, 946 struct iwl_rate_scale_priv *lq_data,
947 struct iwl_scale_tbl_info *tbl, int index) 947 struct iwl_scale_tbl_info *tbl, int index)
948{ 948{
949#ifdef CONFIG_IWLWIFI_HT 949#ifdef CONFIG_IWL4965_HT
950 u16 rate_mask; 950 u16 rate_mask;
951 u8 is_green = lq_data->is_green; 951 u8 is_green = lq_data->is_green;
952 s32 rate; 952 s32 rate;
@@ -992,7 +992,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
992 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n", 992 IWL_DEBUG_HT("LQ: Switch to new mcs %X index is green %X\n",
993 tbl->current_rate.rate_n_flags, is_green); 993 tbl->current_rate.rate_n_flags, is_green);
994 994
995#endif /*CONFIG_IWLWIFI_HT */ 995#endif /*CONFIG_IWL4965_HT */
996 return 0; 996 return 0;
997} 997}
998 998
@@ -1568,7 +1568,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1568 tbl1 = &(lq_data->lq_info[lq_data->active_tbl]); 1568 tbl1 = &(lq_data->lq_info[lq_data->active_tbl]);
1569 1569
1570 if (is_legacy(tbl1->lq_type) && 1570 if (is_legacy(tbl1->lq_type) &&
1571#ifdef CONFIG_IWLWIFI_HT 1571#ifdef CONFIG_IWL4965_HT
1572 !priv->current_assoc_ht.is_ht && 1572 !priv->current_assoc_ht.is_ht &&
1573#endif 1573#endif
1574 (lq_data->action_counter >= 1)) { 1574 (lq_data->action_counter >= 1)) {
@@ -1579,14 +1579,14 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
1579 1579
1580 if (lq_data->enable_counter && 1580 if (lq_data->enable_counter &&
1581 (lq_data->action_counter >= IWL_ACTION_LIMIT)) { 1581 (lq_data->action_counter >= IWL_ACTION_LIMIT)) {
1582#ifdef CONFIG_IWLWIFI_HT_AGG 1582#ifdef CONFIG_IWL4965_HT_AGG
1583 if ((lq_data->last_tpt > TID_AGG_TPT_THREHOLD) && 1583 if ((lq_data->last_tpt > TID_AGG_TPT_THREHOLD) &&
1584 (priv->lq_mngr.agg_ctrl.auto_agg)) { 1584 (priv->lq_mngr.agg_ctrl.auto_agg)) {
1585 priv->lq_mngr.agg_ctrl.tid_retry = 1585 priv->lq_mngr.agg_ctrl.tid_retry =
1586 TID_ALL_SPECIFIED; 1586 TID_ALL_SPECIFIED;
1587 schedule_work(&priv->agg_work); 1587 schedule_work(&priv->agg_work);
1588 } 1588 }
1589#endif /*CONFIG_IWLWIFI_HT_AGG */ 1589#endif /*CONFIG_IWL4965_HT_AGG */
1590 lq_data->action_counter = 0; 1590 lq_data->action_counter = 0;
1591 rs_set_stay_in_table(0, lq_data); 1591 rs_set_stay_in_table(0, lq_data);
1592 } 1592 }
@@ -1806,7 +1806,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
1806 crl->active_rate &= ~(0x1000); 1806 crl->active_rate &= ~(0x1000);
1807 crl->active_rate_basic = priv->active_rate_basic; 1807 crl->active_rate_basic = priv->active_rate_basic;
1808 crl->phymode = priv->phymode; 1808 crl->phymode = priv->phymode;
1809#ifdef CONFIG_IWLWIFI_HT 1809#ifdef CONFIG_IWL4965_HT
1810 crl->active_siso_rate = (priv->current_assoc_ht.supp_rates[0] << 1); 1810 crl->active_siso_rate = (priv->current_assoc_ht.supp_rates[0] << 1);
1811 crl->active_siso_rate |= (priv->current_assoc_ht.supp_rates[0] & 0x1); 1811 crl->active_siso_rate |= (priv->current_assoc_ht.supp_rates[0] & 0x1);
1812 crl->active_siso_rate &= ~((u16)0x2); 1812 crl->active_siso_rate &= ~((u16)0x2);
@@ -1818,7 +1818,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
1818 crl->active_mimo_rate = crl->active_mimo_rate << IWL_FIRST_OFDM_RATE; 1818 crl->active_mimo_rate = crl->active_mimo_rate << IWL_FIRST_OFDM_RATE;
1819 IWL_DEBUG_HT("MIMO RATE 0x%X SISO MASK 0x%X\n", crl->active_siso_rate, 1819 IWL_DEBUG_HT("MIMO RATE 0x%X SISO MASK 0x%X\n", crl->active_siso_rate,
1820 crl->active_mimo_rate); 1820 crl->active_mimo_rate);
1821#endif /*CONFIG_IWLWIFI_HT*/ 1821#endif /*CONFIG_IWL4965_HT*/
1822#ifdef CONFIG_MAC80211_DEBUGFS 1822#ifdef CONFIG_MAC80211_DEBUGFS
1823 crl->drv = priv; 1823 crl->drv = priv;
1824#endif 1824#endif
@@ -1937,12 +1937,12 @@ static void rs_clear(void *priv_rate)
1937 IWL_DEBUG_RATE("enter\n"); 1937 IWL_DEBUG_RATE("enter\n");
1938 1938
1939 priv->lq_mngr.lq_ready = 0; 1939 priv->lq_mngr.lq_ready = 0;
1940#ifdef CONFIG_IWLWIFI_HT 1940#ifdef CONFIG_IWL4965_HT
1941#ifdef CONFIG_IWLWIFI_HT_AGG 1941#ifdef CONFIG_IWL4965_HT_AGG
1942 if (priv->lq_mngr.agg_ctrl.granted_ba) 1942 if (priv->lq_mngr.agg_ctrl.granted_ba)
1943 iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED); 1943 iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED);
1944#endif /*CONFIG_IWLWIFI_HT_AGG */ 1944#endif /*CONFIG_IWL4965_HT_AGG */
1945#endif /* CONFIG_IWLWIFI_HT */ 1945#endif /* CONFIG_IWL4965_HT */
1946 1946
1947 IWL_DEBUG_RATE("leave\n"); 1947 IWL_DEBUG_RATE("leave\n");
1948} 1948}
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index f8f77fe4128..fed2357b7ef 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -86,14 +86,14 @@ static int is_fat_channel(__le32 rxon_flags)
86 86
87static u8 is_single_stream(struct iwl_priv *priv) 87static u8 is_single_stream(struct iwl_priv *priv)
88{ 88{
89#ifdef CONFIG_IWLWIFI_HT 89#ifdef CONFIG_IWL4965_HT
90 if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht || 90 if (!priv->is_ht_enabled || !priv->current_assoc_ht.is_ht ||
91 (priv->active_rate_ht[1] == 0) || 91 (priv->active_rate_ht[1] == 0) ||
92 (priv->ps_mode == IWL_MIMO_PS_STATIC)) 92 (priv->ps_mode == IWL_MIMO_PS_STATIC))
93 return 1; 93 return 1;
94#else 94#else
95 return 1; 95 return 1;
96#endif /*CONFIG_IWLWIFI_HT */ 96#endif /*CONFIG_IWL4965_HT */
97 return 0; 97 return 0;
98} 98}
99 99
@@ -743,7 +743,7 @@ void iwl4965_rf_kill_ct_config(struct iwl_priv *priv)
743 IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded\n"); 743 IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded\n");
744} 744}
745 745
746#ifdef CONFIG_IWLWIFI_SENSITIVITY 746#ifdef CONFIG_IWL4965_SENSITIVITY
747 747
748/* "false alarms" are signals that our DSP tries to lock onto, 748/* "false alarms" are signals that our DSP tries to lock onto,
749 * but then determines that they are either noise, or transmissions 749 * but then determines that they are either noise, or transmissions
@@ -1546,7 +1546,7 @@ static void iwl4965_bg_sensitivity_work(struct work_struct *work)
1546 mutex_unlock(&priv->mutex); 1546 mutex_unlock(&priv->mutex);
1547 return; 1547 return;
1548} 1548}
1549#endif /*CONFIG_IWLWIFI_SENSITIVITY*/ 1549#endif /*CONFIG_IWL4965_SENSITIVITY*/
1550 1550
1551static void iwl4965_bg_txpower_work(struct work_struct *work) 1551static void iwl4965_bg_txpower_work(struct work_struct *work)
1552{ 1552{
@@ -1638,7 +1638,7 @@ int iwl4965_alive_notify(struct iwl_priv *priv)
1638 1638
1639 spin_lock_irqsave(&priv->lock, flags); 1639 spin_lock_irqsave(&priv->lock, flags);
1640 1640
1641#ifdef CONFIG_IWLWIFI_SENSITIVITY 1641#ifdef CONFIG_IWL4965_SENSITIVITY
1642 memset(&(priv->sensitivity_data), 0, 1642 memset(&(priv->sensitivity_data), 0,
1643 sizeof(struct iwl_sensitivity_data)); 1643 sizeof(struct iwl_sensitivity_data));
1644 memset(&(priv->chain_noise_data), 0, 1644 memset(&(priv->chain_noise_data), 0,
@@ -1646,7 +1646,7 @@ int iwl4965_alive_notify(struct iwl_priv *priv)
1646 for (i = 0; i < NUM_RX_CHAINS; i++) 1646 for (i = 0; i < NUM_RX_CHAINS; i++)
1647 priv->chain_noise_data.delta_gain_code[i] = 1647 priv->chain_noise_data.delta_gain_code[i] =
1648 CHAIN_NOISE_DELTA_GAIN_INIT_VAL; 1648 CHAIN_NOISE_DELTA_GAIN_INIT_VAL;
1649#endif /* CONFIG_IWLWIFI_SENSITIVITY*/ 1649#endif /* CONFIG_IWL4965_SENSITIVITY*/
1650 rc = iwl_grab_nic_access(priv); 1650 rc = iwl_grab_nic_access(priv);
1651 if (rc) { 1651 if (rc) {
1652 spin_unlock_irqrestore(&priv->lock, flags); 1652 spin_unlock_irqrestore(&priv->lock, flags);
@@ -2814,8 +2814,8 @@ void iwl4965_set_rxon_chain(struct iwl_priv *priv)
2814 IWL_DEBUG_ASSOC("rx chain %X\n", priv->staging_rxon.rx_chain); 2814 IWL_DEBUG_ASSOC("rx chain %X\n", priv->staging_rxon.rx_chain);
2815} 2815}
2816 2816
2817#ifdef CONFIG_IWLWIFI_HT 2817#ifdef CONFIG_IWL4965_HT
2818#ifdef CONFIG_IWLWIFI_HT_AGG 2818#ifdef CONFIG_IWL4965_HT_AGG
2819/* 2819/*
2820 get the traffic load value for tid 2820 get the traffic load value for tid
2821*/ 2821*/
@@ -3149,8 +3149,8 @@ static void iwl4965_bg_agg_work(struct work_struct *work)
3149 spin_unlock_irqrestore(&priv->lq_mngr.lock, flags); 3149 spin_unlock_irqrestore(&priv->lq_mngr.lock, flags);
3150 return; 3150 return;
3151} 3151}
3152#endif /*CONFIG_IWLWIFI_HT_AGG */ 3152#endif /*CONFIG_IWL4965_HT_AGG */
3153#endif /* CONFIG_IWLWIFI_HT */ 3153#endif /* CONFIG_IWL4965_HT */
3154 3154
3155int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd, 3155int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd,
3156 u8 sta_id, dma_addr_t txcmd_phys, 3156 u8 sta_id, dma_addr_t txcmd_phys,
@@ -3165,11 +3165,11 @@ int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd,
3165 u16 fc; 3165 u16 fc;
3166 u16 rate_flags; 3166 u16 rate_flags;
3167 int rate_index = min(ctrl->tx_rate & 0xffff, IWL_RATE_COUNT - 1); 3167 int rate_index = min(ctrl->tx_rate & 0xffff, IWL_RATE_COUNT - 1);
3168#ifdef CONFIG_IWLWIFI_HT 3168#ifdef CONFIG_IWL4965_HT
3169#ifdef CONFIG_IWLWIFI_HT_AGG 3169#ifdef CONFIG_IWL4965_HT_AGG
3170 __le16 *qc; 3170 __le16 *qc;
3171#endif /*CONFIG_IWLWIFI_HT_AGG */ 3171#endif /*CONFIG_IWL4965_HT_AGG */
3172#endif /* CONFIG_IWLWIFI_HT */ 3172#endif /* CONFIG_IWL4965_HT */
3173 3173
3174 unicast = !is_multicast_ether_addr(hdr->addr1); 3174 unicast = !is_multicast_ether_addr(hdr->addr1);
3175 3175
@@ -3230,8 +3230,8 @@ int iwl4965_tx_cmd(struct iwl_priv *priv, struct iwl_cmd *out_cmd,
3230 if (ieee80211_is_back_request(fc)) 3230 if (ieee80211_is_back_request(fc))
3231 tx->tx_flags |= TX_CMD_FLG_ACK_MSK | 3231 tx->tx_flags |= TX_CMD_FLG_ACK_MSK |
3232 TX_CMD_FLG_IMM_BA_RSP_MASK; 3232 TX_CMD_FLG_IMM_BA_RSP_MASK;
3233#ifdef CONFIG_IWLWIFI_HT 3233#ifdef CONFIG_IWL4965_HT
3234#ifdef CONFIG_IWLWIFI_HT_AGG 3234#ifdef CONFIG_IWL4965_HT_AGG
3235 qc = ieee80211_get_qos_ctrl(hdr); 3235 qc = ieee80211_get_qos_ctrl(hdr);
3236 if (qc && 3236 if (qc &&
3237 (priv->iw_mode != IEEE80211_IF_TYPE_IBSS)) { 3237 (priv->iw_mode != IEEE80211_IF_TYPE_IBSS)) {
@@ -3443,7 +3443,7 @@ void iwl_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
3443 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) && 3443 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) &&
3444 (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) { 3444 (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) {
3445 iwl4965_rx_calc_noise(priv); 3445 iwl4965_rx_calc_noise(priv);
3446#ifdef CONFIG_IWLWIFI_SENSITIVITY 3446#ifdef CONFIG_IWL4965_SENSITIVITY
3447 queue_work(priv->workqueue, &priv->sensitivity_work); 3447 queue_work(priv->workqueue, &priv->sensitivity_work);
3448#endif 3448#endif
3449 } 3449 }
@@ -3596,7 +3596,7 @@ static int iwl4965_calc_rssi(struct iwl4965_rx_phy_res *rx_resp)
3596 return (max_rssi - agc - IWL_RSSI_OFFSET); 3596 return (max_rssi - agc - IWL_RSSI_OFFSET);
3597} 3597}
3598 3598
3599#ifdef CONFIG_IWLWIFI_HT 3599#ifdef CONFIG_IWL4965_HT
3600 3600
3601/* Parsed Information Elements */ 3601/* Parsed Information Elements */
3602struct ieee802_11_elems { 3602struct ieee802_11_elems {
@@ -3668,7 +3668,7 @@ static int parse_elems(u8 *start, size_t len, struct ieee802_11_elems *elems)
3668 3668
3669 return 0; 3669 return 0;
3670} 3670}
3671#endif /* CONFIG_IWLWIFI_HT */ 3671#endif /* CONFIG_IWL4965_HT */
3672 3672
3673static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id) 3673static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
3674{ 3674{
@@ -3728,9 +3728,9 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3728 .antenna = 0, 3728 .antenna = 0,
3729 .rate = iwl_hw_get_rate(rx_start->rate_n_flags), 3729 .rate = iwl_hw_get_rate(rx_start->rate_n_flags),
3730 .flag = 0, 3730 .flag = 0,
3731#ifdef CONFIG_IWLWIFI_HT_AGG 3731#ifdef CONFIG_IWL4965_HT_AGG
3732 .ordered = 0 3732 .ordered = 0
3733#endif /* CONFIG_IWLWIFI_HT_AGG */ 3733#endif /* CONFIG_IWL4965_HT_AGG */
3734 }; 3734 };
3735 u8 network_packet; 3735 u8 network_packet;
3736 3736
@@ -3802,7 +3802,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3802 if (!iwl_is_associated(priv)) 3802 if (!iwl_is_associated(priv))
3803 priv->last_rx_noise = IWL_NOISE_MEAS_NOT_AVAILABLE; 3803 priv->last_rx_noise = IWL_NOISE_MEAS_NOT_AVAILABLE;
3804 3804
3805#ifdef CONFIG_IWLWIFI_DEBUG 3805#ifdef CONFIG_IWL4965_DEBUG
3806 /* TODO: Parts of iwl_report_frame are broken for 4965 */ 3806 /* TODO: Parts of iwl_report_frame are broken for 4965 */
3807 if (iwl_debug_level & (IWL_DL_RX)) 3807 if (iwl_debug_level & (IWL_DL_RX))
3808 /* Set "1" to report good data frames in groups of 100 */ 3808 /* Set "1" to report good data frames in groups of 100 */
@@ -3866,10 +3866,10 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3866 case IEEE80211_STYPE_ASSOC_RESP: 3866 case IEEE80211_STYPE_ASSOC_RESP:
3867 case IEEE80211_STYPE_REASSOC_RESP: 3867 case IEEE80211_STYPE_REASSOC_RESP:
3868 if (network_packet) { 3868 if (network_packet) {
3869#ifdef CONFIG_IWLWIFI_HT 3869#ifdef CONFIG_IWL4965_HT
3870 u8 *pos = NULL; 3870 u8 *pos = NULL;
3871 struct ieee802_11_elems elems; 3871 struct ieee802_11_elems elems;
3872#endif /*CONFIG_IWLWIFI_HT */ 3872#endif /*CONFIG_IWL4965_HT */
3873 struct ieee80211_mgmt *mgnt = 3873 struct ieee80211_mgmt *mgnt =
3874 (struct ieee80211_mgmt *)header; 3874 (struct ieee80211_mgmt *)header;
3875 3875
@@ -3878,7 +3878,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3878 priv->assoc_capability = 3878 priv->assoc_capability =
3879 le16_to_cpu( 3879 le16_to_cpu(
3880 mgnt->u.assoc_resp.capab_info); 3880 mgnt->u.assoc_resp.capab_info);
3881#ifdef CONFIG_IWLWIFI_HT 3881#ifdef CONFIG_IWL4965_HT
3882 pos = mgnt->u.assoc_resp.variable; 3882 pos = mgnt->u.assoc_resp.variable;
3883 if (!parse_elems(pos, 3883 if (!parse_elems(pos,
3884 len - (pos - (u8 *) mgnt), 3884 len - (pos - (u8 *) mgnt),
@@ -3887,7 +3887,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3887 elems.ht_cap_param) 3887 elems.ht_cap_param)
3888 break; 3888 break;
3889 } 3889 }
3890#endif /*CONFIG_IWLWIFI_HT */ 3890#endif /*CONFIG_IWL4965_HT */
3891 /* assoc_id is 0 no association */ 3891 /* assoc_id is 0 no association */
3892 if (!priv->assoc_id) 3892 if (!priv->assoc_id)
3893 break; 3893 break;
@@ -3919,7 +3919,7 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3919 break; 3919 break;
3920 3920
3921 case IEEE80211_FTYPE_CTL: 3921 case IEEE80211_FTYPE_CTL:
3922#ifdef CONFIG_IWLWIFI_HT_AGG 3922#ifdef CONFIG_IWL4965_HT_AGG
3923 switch (fc & IEEE80211_FCTL_STYPE) { 3923 switch (fc & IEEE80211_FCTL_STYPE) {
3924 case IEEE80211_STYPE_BACK_REQ: 3924 case IEEE80211_STYPE_BACK_REQ:
3925 IWL_DEBUG_HT("IEEE80211_STYPE_BACK_REQ arrived\n"); 3925 IWL_DEBUG_HT("IEEE80211_STYPE_BACK_REQ arrived\n");
@@ -3979,7 +3979,7 @@ static void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv,
3979 struct iwl_rx_mem_buffer *rxb) 3979 struct iwl_rx_mem_buffer *rxb)
3980 3980
3981{ 3981{
3982#ifdef CONFIG_IWLWIFI_SENSITIVITY 3982#ifdef CONFIG_IWL4965_SENSITIVITY
3983 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3983 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3984 struct iwl_missed_beacon_notif *missed_beacon; 3984 struct iwl_missed_beacon_notif *missed_beacon;
3985 3985
@@ -3994,11 +3994,11 @@ static void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv,
3994 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status))) 3994 if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)))
3995 queue_work(priv->workqueue, &priv->sensitivity_work); 3995 queue_work(priv->workqueue, &priv->sensitivity_work);
3996 } 3996 }
3997#endif /*CONFIG_IWLWIFI_SENSITIVITY*/ 3997#endif /*CONFIG_IWL4965_SENSITIVITY*/
3998} 3998}
3999 3999
4000#ifdef CONFIG_IWLWIFI_HT 4000#ifdef CONFIG_IWL4965_HT
4001#ifdef CONFIG_IWLWIFI_HT_AGG 4001#ifdef CONFIG_IWL4965_HT_AGG
4002 4002
4003static void iwl4965_set_tx_status(struct iwl_priv *priv, int txq_id, int idx, 4003static void iwl4965_set_tx_status(struct iwl_priv *priv, int txq_id, int idx,
4004 u32 status, u32 retry_count, u32 rate) 4004 u32 status, u32 retry_count, u32 rate)
@@ -4267,8 +4267,8 @@ static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,
4267 return 0; 4267 return 0;
4268} 4268}
4269 4269
4270#endif/* CONFIG_IWLWIFI_HT_AGG */ 4270#endif/* CONFIG_IWL4965_HT_AGG */
4271#endif /* CONFIG_IWLWIFI_HT */ 4271#endif /* CONFIG_IWL4965_HT */
4272/* 4272/*
4273 * RATE SCALE CODE 4273 * RATE SCALE CODE
4274 */ 4274 */
@@ -4331,7 +4331,7 @@ void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
4331 &link_cmd); 4331 &link_cmd);
4332} 4332}
4333 4333
4334#ifdef CONFIG_IWLWIFI_HT 4334#ifdef CONFIG_IWL4965_HT
4335 4335
4336static u8 iwl_is_channel_extension(struct iwl_priv *priv, int phymode, 4336static u8 iwl_is_channel_extension(struct iwl_priv *priv, int phymode,
4337 u16 channel, u8 extension_chan_offset) 4337 u16 channel, u8 extension_chan_offset)
@@ -4468,7 +4468,7 @@ void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index)
4468 return; 4468 return;
4469} 4469}
4470 4470
4471#ifdef CONFIG_IWLWIFI_HT_AGG 4471#ifdef CONFIG_IWL4965_HT_AGG
4472 4472
4473static void iwl4965_sta_modify_add_ba_tid(struct iwl_priv *priv, 4473static void iwl4965_sta_modify_add_ba_tid(struct iwl_priv *priv,
4474 int sta_id, int tid, u16 ssn) 4474 int sta_id, int tid, u16 ssn)
@@ -4642,8 +4642,8 @@ int iwl_mac_ht_rx_agg_stop(struct ieee80211_hw *hw, u8 *da,
4642 return 0; 4642 return 0;
4643} 4643}
4644 4644
4645#endif /* CONFIG_IWLWIFI_HT_AGG */ 4645#endif /* CONFIG_IWL4965_HT_AGG */
4646#endif /* CONFIG_IWLWIFI_HT */ 4646#endif /* CONFIG_IWL4965_HT */
4647 4647
4648/* Set up 4965-specific Rx frame reply handlers */ 4648/* Set up 4965-specific Rx frame reply handlers */
4649void iwl_hw_rx_handler_setup(struct iwl_priv *priv) 4649void iwl_hw_rx_handler_setup(struct iwl_priv *priv)
@@ -4658,25 +4658,25 @@ void iwl_hw_rx_handler_setup(struct iwl_priv *priv)
4658 priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] = 4658 priv->rx_handlers[MISSED_BEACONS_NOTIFICATION] =
4659 iwl4965_rx_missed_beacon_notif; 4659 iwl4965_rx_missed_beacon_notif;
4660 4660
4661#ifdef CONFIG_IWLWIFI_HT 4661#ifdef CONFIG_IWL4965_HT
4662#ifdef CONFIG_IWLWIFI_HT_AGG 4662#ifdef CONFIG_IWL4965_HT_AGG
4663 priv->rx_handlers[REPLY_COMPRESSED_BA] = iwl4965_rx_reply_compressed_ba; 4663 priv->rx_handlers[REPLY_COMPRESSED_BA] = iwl4965_rx_reply_compressed_ba;
4664#endif /* CONFIG_IWLWIFI_AGG */ 4664#endif /* CONFIG_IWL4965_HT_AGG */
4665#endif /* CONFIG_IWLWIFI */ 4665#endif /* CONFIG_IWL4965_HT */
4666} 4666}
4667 4667
4668void iwl_hw_setup_deferred_work(struct iwl_priv *priv) 4668void iwl_hw_setup_deferred_work(struct iwl_priv *priv)
4669{ 4669{
4670 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work); 4670 INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work);
4671 INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work); 4671 INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work);
4672#ifdef CONFIG_IWLWIFI_SENSITIVITY 4672#ifdef CONFIG_IWL4965_SENSITIVITY
4673 INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work); 4673 INIT_WORK(&priv->sensitivity_work, iwl4965_bg_sensitivity_work);
4674#endif 4674#endif
4675#ifdef CONFIG_IWLWIFI_HT 4675#ifdef CONFIG_IWL4965_HT
4676#ifdef CONFIG_IWLWIFI_HT_AGG 4676#ifdef CONFIG_IWL4965_HT_AGG
4677 INIT_WORK(&priv->agg_work, iwl4965_bg_agg_work); 4677 INIT_WORK(&priv->agg_work, iwl4965_bg_agg_work);
4678#endif /* CONFIG_IWLWIFI_AGG */ 4678#endif /* CONFIG_IWL4965_AGG */
4679#endif /* CONFIG_IWLWIFI_HT */ 4679#endif /* CONFIG_IWL4965_HT */
4680 init_timer(&priv->statistics_periodic); 4680 init_timer(&priv->statistics_periodic);
4681 priv->statistics_periodic.data = (unsigned long)priv; 4681 priv->statistics_periodic.data = (unsigned long)priv;
4682 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic; 4682 priv->statistics_periodic.function = iwl4965_bg_statistics_periodic;
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index bf174d3b8fb..d61cf0e26e8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -434,8 +434,8 @@ struct iwl_rx_queue {
434#define IWL_INVALID_RATE 0xFF 434#define IWL_INVALID_RATE 0xFF
435#define IWL_INVALID_VALUE -1 435#define IWL_INVALID_VALUE -1
436 436
437#ifdef CONFIG_IWLWIFI_HT 437#ifdef CONFIG_IWL4965_HT
438#ifdef CONFIG_IWLWIFI_HT_AGG 438#ifdef CONFIG_IWL4965_HT_AGG
439struct iwl_ht_agg { 439struct iwl_ht_agg {
440 u16 txq_id; 440 u16 txq_id;
441 u16 frame_count; 441 u16 frame_count;
@@ -445,16 +445,16 @@ struct iwl_ht_agg {
445 u32 bitmap1; 445 u32 bitmap1;
446 u32 rate_n_flags; 446 u32 rate_n_flags;
447}; 447};
448#endif /* CONFIG_IWLWIFI_HT_AGG */ 448#endif /* CONFIG_IWL4965_HT_AGG */
449#endif /* CONFIG_IWLWIFI_HT */ 449#endif /* CONFIG_IWL4965_HT */
450 450
451struct iwl_tid_data { 451struct iwl_tid_data {
452 u16 seq_number; 452 u16 seq_number;
453#ifdef CONFIG_IWLWIFI_HT 453#ifdef CONFIG_IWL4965_HT
454#ifdef CONFIG_IWLWIFI_HT_AGG 454#ifdef CONFIG_IWL4965_HT_AGG
455 struct iwl_ht_agg agg; 455 struct iwl_ht_agg agg;
456#endif /* CONFIG_IWLWIFI_HT_AGG */ 456#endif /* CONFIG_IWL4965_HT_AGG */
457#endif /* CONFIG_IWLWIFI_HT */ 457#endif /* CONFIG_IWL4965_HT */
458}; 458};
459 459
460struct iwl_hw_key { 460struct iwl_hw_key {
@@ -471,7 +471,7 @@ union iwl_ht_rate_supp {
471 }; 471 };
472}; 472};
473 473
474#ifdef CONFIG_IWLWIFI_HT 474#ifdef CONFIG_IWL4965_HT
475#define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3) 475#define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3)
476#define HT_IE_MAX_AMSDU_SIZE_4K (0) 476#define HT_IE_MAX_AMSDU_SIZE_4K (0)
477#define CFG_HT_MPDU_DENSITY_2USEC (0x5) 477#define CFG_HT_MPDU_DENSITY_2USEC (0x5)
@@ -494,9 +494,9 @@ struct sta_ht_info {
494 u8 tx_chan_width; 494 u8 tx_chan_width;
495 u8 chan_width_cap; 495 u8 chan_width_cap;
496}; 496};
497#endif /*CONFIG_IWLWIFI_HT */ 497#endif /*CONFIG_IWL4965_HT */
498 498
499#ifdef CONFIG_IWLWIFI_QOS 499#ifdef CONFIG_IWL4965_QOS
500 500
501union iwl_qos_capabity { 501union iwl_qos_capabity {
502 struct { 502 struct {
@@ -525,7 +525,7 @@ struct iwl_qos_info {
525 union iwl_qos_capabity qos_cap; 525 union iwl_qos_capabity qos_cap;
526 struct iwl_qosparam_cmd def_qos_parm; 526 struct iwl_qosparam_cmd def_qos_parm;
527}; 527};
528#endif /*CONFIG_IWLWIFI_QOS */ 528#endif /*CONFIG_IWL4965_QOS */
529 529
530#define STA_PS_STATUS_WAKE 0 530#define STA_PS_STATUS_WAKE 0
531#define STA_PS_STATUS_SLEEP 1 531#define STA_PS_STATUS_SLEEP 1
@@ -617,7 +617,7 @@ extern int iwl_is_network_packet(struct iwl_priv *priv,
617 struct ieee80211_hdr *header); 617 struct ieee80211_hdr *header);
618extern int iwl_power_init_handle(struct iwl_priv *priv); 618extern int iwl_power_init_handle(struct iwl_priv *priv);
619extern int iwl_eeprom_init(struct iwl_priv *priv); 619extern int iwl_eeprom_init(struct iwl_priv *priv);
620#ifdef CONFIG_IWLWIFI_DEBUG 620#ifdef CONFIG_IWL4965_DEBUG
621extern void iwl_report_frame(struct iwl_priv *priv, 621extern void iwl_report_frame(struct iwl_priv *priv,
622 struct iwl_rx_packet *pkt, 622 struct iwl_rx_packet *pkt,
623 struct ieee80211_hdr *header, int group100); 623 struct ieee80211_hdr *header, int group100);
@@ -764,8 +764,8 @@ extern int iwl4965_set_fat_chan_info(struct iwl_priv *priv, int phymode,
764 u8 fat_extension_channel); 764 u8 fat_extension_channel);
765extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv); 765extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
766 766
767#ifdef CONFIG_IWLWIFI_HT 767#ifdef CONFIG_IWL4965_HT
768#ifdef CONFIG_IWLWIFI_HT_AGG 768#ifdef CONFIG_IWL4965_HT_AGG
769extern int iwl_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da, 769extern int iwl_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da,
770 u16 tid, u16 *start_seq_num); 770 u16 tid, u16 *start_seq_num);
771extern int iwl_mac_ht_rx_agg_start(struct ieee80211_hw *hw, u8 *da, 771extern int iwl_mac_ht_rx_agg_start(struct ieee80211_hw *hw, u8 *da,
@@ -775,8 +775,8 @@ extern int iwl_mac_ht_rx_agg_stop(struct ieee80211_hw *hw, u8 *da,
775extern int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, 775extern int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da,
776 u16 tid, int generator); 776 u16 tid, int generator);
777extern void iwl4965_turn_off_agg(struct iwl_priv *priv, u8 tid); 777extern void iwl4965_turn_off_agg(struct iwl_priv *priv, u8 tid);
778#endif /* CONFIG_IWLWIFI_HT_AGG */ 778#endif /* CONFIG_IWL4965_HT_AGG */
779#endif /*CONFIG_IWLWIFI_HT */ 779#endif /*CONFIG_IWL4965_HT */
780/* Structures, enum, and defines specific to the 4965 */ 780/* Structures, enum, and defines specific to the 4965 */
781 781
782#define IWL4965_KW_SIZE 0x1000 /*4k */ 782#define IWL4965_KW_SIZE 0x1000 /*4k */
@@ -843,7 +843,7 @@ struct iwl_traffic_load {
843 u32 total; 843 u32 total;
844}; 844};
845 845
846#ifdef CONFIG_IWLWIFI_HT_AGG 846#ifdef CONFIG_IWL4965_HT_AGG
847struct iwl_agg_control { 847struct iwl_agg_control {
848 unsigned long next_retry; 848 unsigned long next_retry;
849 u32 wait_for_agg_status; 849 u32 wait_for_agg_status;
@@ -855,10 +855,10 @@ struct iwl_agg_control {
855 u32 ba_timeout; 855 u32 ba_timeout;
856 struct iwl_traffic_load traffic_load[TID_MAX_LOAD_COUNT]; 856 struct iwl_traffic_load traffic_load[TID_MAX_LOAD_COUNT];
857}; 857};
858#endif /*CONFIG_IWLWIFI_HT_AGG */ 858#endif /*CONFIG_IWL4965_HT_AGG */
859 859
860struct iwl_lq_mngr { 860struct iwl_lq_mngr {
861#ifdef CONFIG_IWLWIFI_HT_AGG 861#ifdef CONFIG_IWL4965_HT_AGG
862 struct iwl_agg_control agg_ctrl; 862 struct iwl_agg_control agg_ctrl;
863#endif 863#endif
864 spinlock_t lock; 864 spinlock_t lock;
@@ -1040,7 +1040,7 @@ struct iwl_chain_noise_data {
1040#define EEPROM_SEM_RETRY_LIMIT 1000 1040#define EEPROM_SEM_RETRY_LIMIT 1000
1041 1041
1042 1042
1043#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 1043#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
1044 1044
1045enum { 1045enum {
1046 MEASUREMENT_READY = (1 << 0), 1046 MEASUREMENT_READY = (1 << 0),
@@ -1068,7 +1068,7 @@ struct iwl_priv {
1068 1068
1069 const struct ieee80211_hw_mode *modes; 1069 const struct ieee80211_hw_mode *modes;
1070 1070
1071#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 1071#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
1072 /* spectrum measurement report caching */ 1072 /* spectrum measurement report caching */
1073 struct iwl_spectrum_notification measure_report; 1073 struct iwl_spectrum_notification measure_report;
1074 u8 measurement_status; 1074 u8 measurement_status;
@@ -1157,14 +1157,14 @@ struct iwl_priv {
1157 u8 channel_width; /* 0=20MHZ, 1=40MHZ */ 1157 u8 channel_width; /* 0=20MHZ, 1=40MHZ */
1158 u8 current_channel_width; 1158 u8 current_channel_width;
1159 u8 valid_antenna; /* Bit mask of antennas actually connected */ 1159 u8 valid_antenna; /* Bit mask of antennas actually connected */
1160#ifdef CONFIG_IWLWIFI_SENSITIVITY 1160#ifdef CONFIG_IWL4965_SENSITIVITY
1161 struct iwl_sensitivity_data sensitivity_data; 1161 struct iwl_sensitivity_data sensitivity_data;
1162 struct iwl_chain_noise_data chain_noise_data; 1162 struct iwl_chain_noise_data chain_noise_data;
1163 u8 start_calib; 1163 u8 start_calib;
1164 __le16 sensitivity_tbl[HD_TABLE_SIZE]; 1164 __le16 sensitivity_tbl[HD_TABLE_SIZE];
1165#endif /*CONFIG_IWLWIFI_SENSITIVITY*/ 1165#endif /*CONFIG_IWL4965_SENSITIVITY*/
1166 1166
1167#ifdef CONFIG_IWLWIFI_HT 1167#ifdef CONFIG_IWL4965_HT
1168 struct sta_ht_info current_assoc_ht; 1168 struct sta_ht_info current_assoc_ht;
1169#endif 1169#endif
1170 u8 active_rate_ht[2]; 1170 u8 active_rate_ht[2];
@@ -1253,9 +1253,9 @@ struct iwl_priv {
1253 u16 assoc_capability; 1253 u16 assoc_capability;
1254 u8 ps_mode; 1254 u8 ps_mode;
1255 1255
1256#ifdef CONFIG_IWLWIFI_QOS 1256#ifdef CONFIG_IWL4965_QOS
1257 struct iwl_qos_info qos_data; 1257 struct iwl_qos_info qos_data;
1258#endif /*CONFIG_IWLWIFI_QOS */ 1258#endif /*CONFIG_IWL4965_QOS */
1259 1259
1260 struct workqueue_struct *workqueue; 1260 struct workqueue_struct *workqueue;
1261 1261
@@ -1290,20 +1290,20 @@ struct iwl_priv {
1290 u32 pm_state[16]; 1290 u32 pm_state[16];
1291#endif 1291#endif
1292 1292
1293#ifdef CONFIG_IWLWIFI_DEBUG 1293#ifdef CONFIG_IWL4965_DEBUG
1294 /* debugging info */ 1294 /* debugging info */
1295 u32 framecnt_to_us; 1295 u32 framecnt_to_us;
1296 atomic_t restrict_refcnt; 1296 atomic_t restrict_refcnt;
1297#endif 1297#endif
1298 1298
1299 struct work_struct txpower_work; 1299 struct work_struct txpower_work;
1300#ifdef CONFIG_IWLWIFI_SENSITIVITY 1300#ifdef CONFIG_IWL4965_SENSITIVITY
1301 struct work_struct sensitivity_work; 1301 struct work_struct sensitivity_work;
1302#endif 1302#endif
1303 struct work_struct statistics_work; 1303 struct work_struct statistics_work;
1304 struct timer_list statistics_periodic; 1304 struct timer_list statistics_periodic;
1305 1305
1306#ifdef CONFIG_IWLWIFI_HT_AGG 1306#ifdef CONFIG_IWL4965_HT_AGG
1307 struct work_struct agg_work; 1307 struct work_struct agg_work;
1308#endif 1308#endif
1309}; /*iwl_priv */ 1309}; /*iwl_priv */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index b9b67e617ff..691d64e0393 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -59,7 +59,7 @@
59#include "iwl-3945.h" 59#include "iwl-3945.h"
60#include "iwl-helpers.h" 60#include "iwl-helpers.h"
61 61
62#ifdef CONFIG_IWLWIFI_DEBUG 62#ifdef CONFIG_IWL3945_DEBUG
63u32 iwl_debug_level; 63u32 iwl_debug_level;
64#endif 64#endif
65 65
@@ -89,13 +89,13 @@ int iwl_param_queues_num = IWL_MAX_NUM_QUEUES;
89#define DRV_DESCRIPTION \ 89#define DRV_DESCRIPTION \
90"Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux" 90"Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux"
91 91
92#ifdef CONFIG_IWLWIFI_DEBUG 92#ifdef CONFIG_IWL3945_DEBUG
93#define VD "d" 93#define VD "d"
94#else 94#else
95#define VD 95#define VD
96#endif 96#endif
97 97
98#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 98#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
99#define VS "s" 99#define VS "s"
100#else 100#else
101#define VS 101#define VS
@@ -180,7 +180,7 @@ static const char *iwl_escape_essid(const char *essid, u8 essid_len)
180 180
181static void iwl_print_hex_dump(int level, void *p, u32 len) 181static void iwl_print_hex_dump(int level, void *p, u32 len)
182{ 182{
183#ifdef CONFIG_IWLWIFI_DEBUG 183#ifdef CONFIG_IWL3945_DEBUG
184 if (!(iwl_debug_level & level)) 184 if (!(iwl_debug_level & level))
185 return; 185 return;
186 186
@@ -1584,7 +1584,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
1584 * Misc. internal state and helper functions 1584 * Misc. internal state and helper functions
1585 * 1585 *
1586 ******************************************************************************/ 1586 ******************************************************************************/
1587#ifdef CONFIG_IWLWIFI_DEBUG 1587#ifdef CONFIG_IWL3945_DEBUG
1588 1588
1589/** 1589/**
1590 * iwl_report_frame - dump frame to syslog during debug sessions 1590 * iwl_report_frame - dump frame to syslog during debug sessions
@@ -1864,7 +1864,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1864/* 1864/*
1865 * QoS support 1865 * QoS support
1866*/ 1866*/
1867#ifdef CONFIG_IWLWIFI_QOS 1867#ifdef CONFIG_IWL3945_QOS
1868static int iwl_send_qos_params_command(struct iwl_priv *priv, 1868static int iwl_send_qos_params_command(struct iwl_priv *priv,
1869 struct iwl_qosparam_cmd *qos) 1869 struct iwl_qosparam_cmd *qos)
1870{ 1870{
@@ -1993,7 +1993,7 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
1993 } 1993 }
1994} 1994}
1995 1995
1996#endif /* CONFIG_IWLWIFI_QOS */ 1996#endif /* CONFIG_IWL3945_QOS */
1997/* 1997/*
1998 * Power management (not Tx power!) functions 1998 * Power management (not Tx power!) functions
1999 */ 1999 */
@@ -2747,7 +2747,7 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2747 2747
2748 fc = le16_to_cpu(hdr->frame_control); 2748 fc = le16_to_cpu(hdr->frame_control);
2749 2749
2750#ifdef CONFIG_IWLWIFI_DEBUG 2750#ifdef CONFIG_IWL3945_DEBUG
2751 if (ieee80211_is_auth(fc)) 2751 if (ieee80211_is_auth(fc))
2752 IWL_DEBUG_TX("Sending AUTH frame\n"); 2752 IWL_DEBUG_TX("Sending AUTH frame\n");
2753 else if (ieee80211_is_assoc_request(fc)) 2753 else if (ieee80211_is_assoc_request(fc))
@@ -3196,7 +3196,7 @@ int is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)
3196 return 1; 3196 return 1;
3197} 3197}
3198 3198
3199#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 3199#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
3200 3200
3201#include "iwl-spectrum.h" 3201#include "iwl-spectrum.h"
3202 3202
@@ -3522,7 +3522,7 @@ static void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
3522static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv, 3522static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
3523 struct iwl_rx_mem_buffer *rxb) 3523 struct iwl_rx_mem_buffer *rxb)
3524{ 3524{
3525#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 3525#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
3526 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3526 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3527 struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif); 3527 struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif);
3528 3528
@@ -3540,7 +3540,7 @@ static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
3540static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv, 3540static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
3541 struct iwl_rx_mem_buffer *rxb) 3541 struct iwl_rx_mem_buffer *rxb)
3542{ 3542{
3543#ifdef CONFIG_IWLWIFI_DEBUG 3543#ifdef CONFIG_IWL3945_DEBUG
3544 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3544 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3545 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); 3545 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
3546 IWL_DEBUG_RX("sleep mode: %d, src: %d\n", 3546 IWL_DEBUG_RX("sleep mode: %d, src: %d\n",
@@ -3586,7 +3586,7 @@ static void iwl_bg_beacon_update(struct work_struct *work)
3586static void iwl_rx_beacon_notif(struct iwl_priv *priv, 3586static void iwl_rx_beacon_notif(struct iwl_priv *priv,
3587 struct iwl_rx_mem_buffer *rxb) 3587 struct iwl_rx_mem_buffer *rxb)
3588{ 3588{
3589#ifdef CONFIG_IWLWIFI_DEBUG 3589#ifdef CONFIG_IWL3945_DEBUG
3590 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3590 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3591 struct iwl_beacon_notif *beacon = &(pkt->u.beacon_status); 3591 struct iwl_beacon_notif *beacon = &(pkt->u.beacon_status);
3592 u8 rate = beacon->beacon_notify_hdr.rate; 3592 u8 rate = beacon->beacon_notify_hdr.rate;
@@ -3609,7 +3609,7 @@ static void iwl_rx_beacon_notif(struct iwl_priv *priv,
3609static void iwl_rx_reply_scan(struct iwl_priv *priv, 3609static void iwl_rx_reply_scan(struct iwl_priv *priv,
3610 struct iwl_rx_mem_buffer *rxb) 3610 struct iwl_rx_mem_buffer *rxb)
3611{ 3611{
3612#ifdef CONFIG_IWLWIFI_DEBUG 3612#ifdef CONFIG_IWL3945_DEBUG
3613 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3613 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3614 struct iwl_scanreq_notification *notif = 3614 struct iwl_scanreq_notification *notif =
3615 (struct iwl_scanreq_notification *)pkt->u.raw; 3615 (struct iwl_scanreq_notification *)pkt->u.raw;
@@ -4370,7 +4370,7 @@ static int iwl_tx_queue_update_write_ptr(struct iwl_priv *priv,
4370 return rc; 4370 return rc;
4371} 4371}
4372 4372
4373#ifdef CONFIG_IWLWIFI_DEBUG 4373#ifdef CONFIG_IWL3945_DEBUG
4374static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon) 4374static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4375{ 4375{
4376 DECLARE_MAC_BUF(mac); 4376 DECLARE_MAC_BUF(mac);
@@ -4602,7 +4602,7 @@ static void iwl_irq_handle_error(struct iwl_priv *priv)
4602 /* Cancel currently queued command. */ 4602 /* Cancel currently queued command. */
4603 clear_bit(STATUS_HCMD_ACTIVE, &priv->status); 4603 clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
4604 4604
4605#ifdef CONFIG_IWLWIFI_DEBUG 4605#ifdef CONFIG_IWL3945_DEBUG
4606 if (iwl_debug_level & IWL_DL_FW_ERRORS) { 4606 if (iwl_debug_level & IWL_DL_FW_ERRORS) {
4607 iwl_dump_nic_error_log(priv); 4607 iwl_dump_nic_error_log(priv);
4608 iwl_dump_nic_event_log(priv); 4608 iwl_dump_nic_event_log(priv);
@@ -4651,7 +4651,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4651 u32 inta, handled = 0; 4651 u32 inta, handled = 0;
4652 u32 inta_fh; 4652 u32 inta_fh;
4653 unsigned long flags; 4653 unsigned long flags;
4654#ifdef CONFIG_IWLWIFI_DEBUG 4654#ifdef CONFIG_IWL3945_DEBUG
4655 u32 inta_mask; 4655 u32 inta_mask;
4656#endif 4656#endif
4657 4657
@@ -4669,7 +4669,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4669 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); 4669 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
4670 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); 4670 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh);
4671 4671
4672#ifdef CONFIG_IWLWIFI_DEBUG 4672#ifdef CONFIG_IWL3945_DEBUG
4673 if (iwl_debug_level & IWL_DL_ISR) { 4673 if (iwl_debug_level & IWL_DL_ISR) {
4674 inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */ 4674 inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */
4675 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 4675 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
@@ -4702,7 +4702,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4702 return; 4702 return;
4703 } 4703 }
4704 4704
4705#ifdef CONFIG_IWLWIFI_DEBUG 4705#ifdef CONFIG_IWL3945_DEBUG
4706 if (iwl_debug_level & (IWL_DL_ISR)) { 4706 if (iwl_debug_level & (IWL_DL_ISR)) {
4707 /* NIC fires this, but we don't use it, redundant with WAKEUP */ 4707 /* NIC fires this, but we don't use it, redundant with WAKEUP */
4708 if (inta & CSR_INT_BIT_MAC_CLK_ACTV) 4708 if (inta & CSR_INT_BIT_MAC_CLK_ACTV)
@@ -4800,7 +4800,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4800 /* Re-enable all interrupts */ 4800 /* Re-enable all interrupts */
4801 iwl_enable_interrupts(priv); 4801 iwl_enable_interrupts(priv);
4802 4802
4803#ifdef CONFIG_IWLWIFI_DEBUG 4803#ifdef CONFIG_IWL3945_DEBUG
4804 if (iwl_debug_level & (IWL_DL_ISR)) { 4804 if (iwl_debug_level & (IWL_DL_ISR)) {
4805 inta = iwl_read32(priv, CSR_INT); 4805 inta = iwl_read32(priv, CSR_INT);
4806 inta_mask = iwl_read32(priv, CSR_INT_MASK); 4806 inta_mask = iwl_read32(priv, CSR_INT_MASK);
@@ -6813,9 +6813,9 @@ static void iwl_bg_post_associate(struct work_struct *data)
6813 6813
6814 iwl_sequence_reset(priv); 6814 iwl_sequence_reset(priv);
6815 6815
6816#ifdef CONFIG_IWLWIFI_QOS 6816#ifdef CONFIG_IWL3945_QOS
6817 iwl_activate_qos(priv, 0); 6817 iwl_activate_qos(priv, 0);
6818#endif /* CONFIG_IWLWIFI_QOS */ 6818#endif /* CONFIG_IWL3945_QOS */
6819 mutex_unlock(&priv->mutex); 6819 mutex_unlock(&priv->mutex);
6820} 6820}
6821 6821
@@ -7367,7 +7367,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7367 const struct ieee80211_tx_queue_params *params) 7367 const struct ieee80211_tx_queue_params *params)
7368{ 7368{
7369 struct iwl_priv *priv = hw->priv; 7369 struct iwl_priv *priv = hw->priv;
7370#ifdef CONFIG_IWLWIFI_QOS 7370#ifdef CONFIG_IWL3945_QOS
7371 unsigned long flags; 7371 unsigned long flags;
7372 int q; 7372 int q;
7373#endif /* CONFIG_IWL_QOS */ 7373#endif /* CONFIG_IWL_QOS */
@@ -7384,7 +7384,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7384 return 0; 7384 return 0;
7385 } 7385 }
7386 7386
7387#ifdef CONFIG_IWLWIFI_QOS 7387#ifdef CONFIG_IWL3945_QOS
7388 if (!priv->qos_data.qos_enable) { 7388 if (!priv->qos_data.qos_enable) {
7389 priv->qos_data.qos_active = 0; 7389 priv->qos_data.qos_active = 0;
7390 IWL_DEBUG_MAC80211("leave - qos not enabled\n"); 7390 IWL_DEBUG_MAC80211("leave - qos not enabled\n");
@@ -7413,7 +7413,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7413 7413
7414 mutex_unlock(&priv->mutex); 7414 mutex_unlock(&priv->mutex);
7415 7415
7416#endif /*CONFIG_IWLWIFI_QOS */ 7416#endif /*CONFIG_IWL3945_QOS */
7417 7417
7418 IWL_DEBUG_MAC80211("leave\n"); 7418 IWL_DEBUG_MAC80211("leave\n");
7419 return 0; 7419 return 0;
@@ -7479,7 +7479,7 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
7479 mutex_lock(&priv->mutex); 7479 mutex_lock(&priv->mutex);
7480 IWL_DEBUG_MAC80211("enter\n"); 7480 IWL_DEBUG_MAC80211("enter\n");
7481 7481
7482#ifdef CONFIG_IWLWIFI_QOS 7482#ifdef CONFIG_IWL3945_QOS
7483 iwl_reset_qos(priv); 7483 iwl_reset_qos(priv);
7484#endif 7484#endif
7485 cancel_delayed_work(&priv->post_associate); 7485 cancel_delayed_work(&priv->post_associate);
@@ -7569,7 +7569,7 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
7569 IWL_DEBUG_MAC80211("leave\n"); 7569 IWL_DEBUG_MAC80211("leave\n");
7570 spin_unlock_irqrestore(&priv->lock, flags); 7570 spin_unlock_irqrestore(&priv->lock, flags);
7571 7571
7572#ifdef CONFIG_IWLWIFI_QOS 7572#ifdef CONFIG_IWL3945_QOS
7573 iwl_reset_qos(priv); 7573 iwl_reset_qos(priv);
7574#endif 7574#endif
7575 7575
@@ -7586,7 +7586,7 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
7586 * 7586 *
7587 *****************************************************************************/ 7587 *****************************************************************************/
7588 7588
7589#ifdef CONFIG_IWLWIFI_DEBUG 7589#ifdef CONFIG_IWL3945_DEBUG
7590 7590
7591/* 7591/*
7592 * The following adds a new attribute to the sysfs representation 7592 * The following adds a new attribute to the sysfs representation
@@ -7619,7 +7619,7 @@ static ssize_t store_debug_level(struct device_driver *d,
7619static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, 7619static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
7620 show_debug_level, store_debug_level); 7620 show_debug_level, store_debug_level);
7621 7621
7622#endif /* CONFIG_IWLWIFI_DEBUG */ 7622#endif /* CONFIG_IWL3945_DEBUG */
7623 7623
7624static ssize_t show_rf_kill(struct device *d, 7624static ssize_t show_rf_kill(struct device *d,
7625 struct device_attribute *attr, char *buf) 7625 struct device_attribute *attr, char *buf)
@@ -7831,7 +7831,7 @@ static ssize_t store_tune(struct device *d,
7831 7831
7832static DEVICE_ATTR(tune, S_IWUSR | S_IRUGO, show_tune, store_tune); 7832static DEVICE_ATTR(tune, S_IWUSR | S_IRUGO, show_tune, store_tune);
7833 7833
7834#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 7834#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
7835 7835
7836static ssize_t show_measurement(struct device *d, 7836static ssize_t show_measurement(struct device *d,
7837 struct device_attribute *attr, char *buf) 7837 struct device_attribute *attr, char *buf)
@@ -7902,7 +7902,7 @@ static ssize_t store_measurement(struct device *d,
7902 7902
7903static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR, 7903static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR,
7904 show_measurement, store_measurement); 7904 show_measurement, store_measurement);
7905#endif /* CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT */ 7905#endif /* CONFIG_IWL3945_SPECTRUM_MEASUREMENT */
7906 7906
7907static ssize_t show_rate(struct device *d, 7907static ssize_t show_rate(struct device *d,
7908 struct device_attribute *attr, char *buf) 7908 struct device_attribute *attr, char *buf)
@@ -8280,7 +8280,7 @@ static struct attribute *iwl_sysfs_entries[] = {
8280 &dev_attr_dump_events.attr, 8280 &dev_attr_dump_events.attr,
8281 &dev_attr_flags.attr, 8281 &dev_attr_flags.attr,
8282 &dev_attr_filter_flags.attr, 8282 &dev_attr_filter_flags.attr,
8283#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 8283#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
8284 &dev_attr_measurement.attr, 8284 &dev_attr_measurement.attr,
8285#endif 8285#endif
8286 &dev_attr_power_level.attr, 8286 &dev_attr_power_level.attr,
@@ -8360,7 +8360,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8360 8360
8361 priv->pci_dev = pdev; 8361 priv->pci_dev = pdev;
8362 priv->antenna = (enum iwl_antenna)iwl_param_antenna; 8362 priv->antenna = (enum iwl_antenna)iwl_param_antenna;
8363#ifdef CONFIG_IWLWIFI_DEBUG 8363#ifdef CONFIG_IWL3945_DEBUG
8364 iwl_debug_level = iwl_param_debug; 8364 iwl_debug_level = iwl_param_debug;
8365 atomic_set(&priv->restrict_refcnt, 0); 8365 atomic_set(&priv->restrict_refcnt, 0);
8366#endif 8366#endif
@@ -8475,7 +8475,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8475 goto out_iounmap; 8475 goto out_iounmap;
8476 } 8476 }
8477 8477
8478#ifdef CONFIG_IWLWIFI_QOS 8478#ifdef CONFIG_IWL3945_QOS
8479 if (iwl_param_qos_enable) 8479 if (iwl_param_qos_enable)
8480 priv->qos_data.qos_enable = 1; 8480 priv->qos_data.qos_enable = 1;
8481 8481
@@ -8483,7 +8483,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8483 8483
8484 priv->qos_data.qos_active = 0; 8484 priv->qos_data.qos_active = 0;
8485 priv->qos_data.qos_cap.val = 0; 8485 priv->qos_data.qos_cap.val = 0;
8486#endif /* CONFIG_IWLWIFI_QOS */ 8486#endif /* CONFIG_IWL3945_QOS */
8487 8487
8488 iwl_set_rxon_channel(priv, MODE_IEEE80211G, 6); 8488 iwl_set_rxon_channel(priv, MODE_IEEE80211G, 6);
8489 iwl_setup_deferred_work(priv); 8489 iwl_setup_deferred_work(priv);
@@ -8743,7 +8743,7 @@ static int __init iwl_init(void)
8743 IWL_ERROR("Unable to initialize PCI module\n"); 8743 IWL_ERROR("Unable to initialize PCI module\n");
8744 return ret; 8744 return ret;
8745 } 8745 }
8746#ifdef CONFIG_IWLWIFI_DEBUG 8746#ifdef CONFIG_IWL3945_DEBUG
8747 ret = driver_create_file(&iwl_driver.driver, &driver_attr_debug_level); 8747 ret = driver_create_file(&iwl_driver.driver, &driver_attr_debug_level);
8748 if (ret) { 8748 if (ret) {
8749 IWL_ERROR("Unable to create driver sysfs file\n"); 8749 IWL_ERROR("Unable to create driver sysfs file\n");
@@ -8757,7 +8757,7 @@ static int __init iwl_init(void)
8757 8757
8758static void __exit iwl_exit(void) 8758static void __exit iwl_exit(void)
8759{ 8759{
8760#ifdef CONFIG_IWLWIFI_DEBUG 8760#ifdef CONFIG_IWL3945_DEBUG
8761 driver_remove_file(&iwl_driver.driver, &driver_attr_debug_level); 8761 driver_remove_file(&iwl_driver.driver, &driver_attr_debug_level);
8762#endif 8762#endif
8763 pci_unregister_driver(&iwl_driver); 8763 pci_unregister_driver(&iwl_driver);
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 1e7b589ac86..6fb49b0738a 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -59,7 +59,7 @@
59#include "iwl-4965.h" 59#include "iwl-4965.h"
60#include "iwl-helpers.h" 60#include "iwl-helpers.h"
61 61
62#ifdef CONFIG_IWLWIFI_DEBUG 62#ifdef CONFIG_IWL4965_DEBUG
63u32 iwl_debug_level; 63u32 iwl_debug_level;
64#endif 64#endif
65 65
@@ -88,13 +88,13 @@ int iwl_param_queues_num = IWL_MAX_NUM_QUEUES;
88 88
89#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link 4965AGN driver for Linux" 89#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link 4965AGN driver for Linux"
90 90
91#ifdef CONFIG_IWLWIFI_DEBUG 91#ifdef CONFIG_IWL4965_DEBUG
92#define VD "d" 92#define VD "d"
93#else 93#else
94#define VD 94#define VD
95#endif 95#endif
96 96
97#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 97#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
98#define VS "s" 98#define VS "s"
99#else 99#else
100#define VS 100#define VS
@@ -179,7 +179,7 @@ static const char *iwl_escape_essid(const char *essid, u8 essid_len)
179 179
180static void iwl_print_hex_dump(int level, void *p, u32 len) 180static void iwl_print_hex_dump(int level, void *p, u32 len)
181{ 181{
182#ifdef CONFIG_IWLWIFI_DEBUG 182#ifdef CONFIG_IWL4965_DEBUG
183 if (!(iwl_debug_level & level)) 183 if (!(iwl_debug_level & level))
184 return; 184 return;
185 185
@@ -507,12 +507,12 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
507 station->sta.sta.sta_id = index; 507 station->sta.sta.sta_id = index;
508 station->sta.station_flags = 0; 508 station->sta.station_flags = 0;
509 509
510#ifdef CONFIG_IWLWIFI_HT 510#ifdef CONFIG_IWL4965_HT
511 /* BCAST station and IBSS stations do not work in HT mode */ 511 /* BCAST station and IBSS stations do not work in HT mode */
512 if (index != priv->hw_setting.bcast_sta_id && 512 if (index != priv->hw_setting.bcast_sta_id &&
513 priv->iw_mode != IEEE80211_IF_TYPE_IBSS) 513 priv->iw_mode != IEEE80211_IF_TYPE_IBSS)
514 iwl4965_set_ht_add_station(priv, index); 514 iwl4965_set_ht_add_station(priv, index);
515#endif /*CONFIG_IWLWIFI_HT*/ 515#endif /*CONFIG_IWL4965_HT*/
516 516
517 spin_unlock_irqrestore(&priv->sta_lock, flags_spin); 517 spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
518 iwl_send_add_station(priv, &station->sta, flags); 518 iwl_send_add_station(priv, &station->sta, flags);
@@ -1112,13 +1112,13 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1112 /* station table will be cleared */ 1112 /* station table will be cleared */
1113 priv->assoc_station_added = 0; 1113 priv->assoc_station_added = 0;
1114 1114
1115#ifdef CONFIG_IWLWIFI_SENSITIVITY 1115#ifdef CONFIG_IWL4965_SENSITIVITY
1116 priv->sensitivity_data.state = IWL_SENS_CALIB_NEED_REINIT; 1116 priv->sensitivity_data.state = IWL_SENS_CALIB_NEED_REINIT;
1117 if (!priv->error_recovering) 1117 if (!priv->error_recovering)
1118 priv->start_calib = 0; 1118 priv->start_calib = 0;
1119 1119
1120 iwl4965_init_sensitivity(priv, CMD_ASYNC, 1); 1120 iwl4965_init_sensitivity(priv, CMD_ASYNC, 1);
1121#endif /* CONFIG_IWLWIFI_SENSITIVITY */ 1121#endif /* CONFIG_IWL4965_SENSITIVITY */
1122 1122
1123 /* If we are currently associated and the new config requires 1123 /* If we are currently associated and the new config requires
1124 * an RXON_ASSOC and the new config wants the associated mask enabled, 1124 * an RXON_ASSOC and the new config wants the associated mask enabled,
@@ -1162,13 +1162,13 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1162 1162
1163 iwl_clear_stations_table(priv); 1163 iwl_clear_stations_table(priv);
1164 1164
1165#ifdef CONFIG_IWLWIFI_SENSITIVITY 1165#ifdef CONFIG_IWL4965_SENSITIVITY
1166 if (!priv->error_recovering) 1166 if (!priv->error_recovering)
1167 priv->start_calib = 0; 1167 priv->start_calib = 0;
1168 1168
1169 priv->sensitivity_data.state = IWL_SENS_CALIB_NEED_REINIT; 1169 priv->sensitivity_data.state = IWL_SENS_CALIB_NEED_REINIT;
1170 iwl4965_init_sensitivity(priv, CMD_ASYNC, 1); 1170 iwl4965_init_sensitivity(priv, CMD_ASYNC, 1);
1171#endif /* CONFIG_IWLWIFI_SENSITIVITY */ 1171#endif /* CONFIG_IWL4965_SENSITIVITY */
1172 1172
1173 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); 1173 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
1174 1174
@@ -1635,7 +1635,7 @@ done:
1635 * Misc. internal state and helper functions 1635 * Misc. internal state and helper functions
1636 * 1636 *
1637 ******************************************************************************/ 1637 ******************************************************************************/
1638#ifdef CONFIG_IWLWIFI_DEBUG 1638#ifdef CONFIG_IWL4965_DEBUG
1639 1639
1640/** 1640/**
1641 * iwl_report_frame - dump frame to syslog during debug sessions 1641 * iwl_report_frame - dump frame to syslog during debug sessions
@@ -1818,7 +1818,7 @@ static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate,
1818 return ret_rates; 1818 return ret_rates;
1819} 1819}
1820 1820
1821#ifdef CONFIG_IWLWIFI_HT 1821#ifdef CONFIG_IWL4965_HT
1822void static iwl_set_ht_capab(struct ieee80211_hw *hw, 1822void static iwl_set_ht_capab(struct ieee80211_hw *hw,
1823 struct ieee80211_ht_capability *ht_cap, 1823 struct ieee80211_ht_capability *ht_cap,
1824 u8 use_wide_chan); 1824 u8 use_wide_chan);
@@ -1916,7 +1916,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1916 if (*pos > 0) 1916 if (*pos > 0)
1917 len += 2 + *pos; 1917 len += 2 + *pos;
1918 1918
1919#ifdef CONFIG_IWLWIFI_HT 1919#ifdef CONFIG_IWL4965_HT
1920 if (is_direct && priv->is_ht_enabled) { 1920 if (is_direct && priv->is_ht_enabled) {
1921 u8 use_wide_chan = 1; 1921 u8 use_wide_chan = 1;
1922 1922
@@ -1929,7 +1929,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1929 use_wide_chan); 1929 use_wide_chan);
1930 len += 2 + sizeof(struct ieee80211_ht_capability); 1930 len += 2 + sizeof(struct ieee80211_ht_capability);
1931 } 1931 }
1932#endif /*CONFIG_IWLWIFI_HT */ 1932#endif /*CONFIG_IWL4965_HT */
1933 1933
1934 fill_end: 1934 fill_end:
1935 return (u16)len; 1935 return (u16)len;
@@ -1938,7 +1938,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv,
1938/* 1938/*
1939 * QoS support 1939 * QoS support
1940*/ 1940*/
1941#ifdef CONFIG_IWLWIFI_QOS 1941#ifdef CONFIG_IWL4965_QOS
1942static int iwl_send_qos_params_command(struct iwl_priv *priv, 1942static int iwl_send_qos_params_command(struct iwl_priv *priv,
1943 struct iwl_qosparam_cmd *qos) 1943 struct iwl_qosparam_cmd *qos)
1944{ 1944{
@@ -2055,10 +2055,10 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
2055 priv->qos_data.def_qos_parm.qos_flags |= 2055 priv->qos_data.def_qos_parm.qos_flags |=
2056 QOS_PARAM_FLG_UPDATE_EDCA_MSK; 2056 QOS_PARAM_FLG_UPDATE_EDCA_MSK;
2057 2057
2058#ifdef CONFIG_IWLWIFI_HT 2058#ifdef CONFIG_IWL4965_HT
2059 if (priv->is_ht_enabled && priv->current_assoc_ht.is_ht) 2059 if (priv->is_ht_enabled && priv->current_assoc_ht.is_ht)
2060 priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; 2060 priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
2061#endif /* CONFIG_IWLWIFI_HT */ 2061#endif /* CONFIG_IWL4965_HT */
2062 2062
2063 spin_unlock_irqrestore(&priv->lock, flags); 2063 spin_unlock_irqrestore(&priv->lock, flags);
2064 2064
@@ -2072,7 +2072,7 @@ static void iwl_activate_qos(struct iwl_priv *priv, u8 force)
2072 } 2072 }
2073} 2073}
2074 2074
2075#endif /* CONFIG_IWLWIFI_QOS */ 2075#endif /* CONFIG_IWL4965_QOS */
2076/* 2076/*
2077 * Power management (not Tx power!) functions 2077 * Power management (not Tx power!) functions
2078 */ 2078 */
@@ -2835,7 +2835,7 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2835 2835
2836 fc = le16_to_cpu(hdr->frame_control); 2836 fc = le16_to_cpu(hdr->frame_control);
2837 2837
2838#ifdef CONFIG_IWLWIFI_DEBUG 2838#ifdef CONFIG_IWL4965_DEBUG
2839 if (ieee80211_is_auth(fc)) 2839 if (ieee80211_is_auth(fc))
2840 IWL_DEBUG_TX("Sending AUTH frame\n"); 2840 IWL_DEBUG_TX("Sending AUTH frame\n");
2841 else if (ieee80211_is_assoc_request(fc)) 2841 else if (ieee80211_is_assoc_request(fc))
@@ -2873,13 +2873,13 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2873 (hdr->seq_ctrl & 2873 (hdr->seq_ctrl &
2874 __constant_cpu_to_le16(IEEE80211_SCTL_FRAG)); 2874 __constant_cpu_to_le16(IEEE80211_SCTL_FRAG));
2875 seq_number += 0x10; 2875 seq_number += 0x10;
2876#ifdef CONFIG_IWLWIFI_HT 2876#ifdef CONFIG_IWL4965_HT
2877#ifdef CONFIG_IWLWIFI_HT_AGG 2877#ifdef CONFIG_IWL4965_HT_AGG
2878 /* aggregation is on for this <sta,tid> */ 2878 /* aggregation is on for this <sta,tid> */
2879 if (ctl->flags & IEEE80211_TXCTL_HT_MPDU_AGG) 2879 if (ctl->flags & IEEE80211_TXCTL_HT_MPDU_AGG)
2880 txq_id = priv->stations[sta_id].tid[tid].agg.txq_id; 2880 txq_id = priv->stations[sta_id].tid[tid].agg.txq_id;
2881#endif /* CONFIG_IWLWIFI_HT_AGG */ 2881#endif /* CONFIG_IWL4965_HT_AGG */
2882#endif /* CONFIG_IWLWIFI_HT */ 2882#endif /* CONFIG_IWL4965_HT */
2883 } 2883 }
2884 txq = &priv->txq[txq_id]; 2884 txq = &priv->txq[txq_id];
2885 q = &txq->q; 2885 q = &txq->q;
@@ -3289,7 +3289,7 @@ int is_duplicate_packet(struct iwl_priv *priv, struct ieee80211_hdr *header)
3289 return 1; 3289 return 1;
3290} 3290}
3291 3291
3292#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 3292#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
3293 3293
3294#include "iwl-spectrum.h" 3294#include "iwl-spectrum.h"
3295 3295
@@ -3497,8 +3497,8 @@ static int iwl_is_tx_success(u32 status)
3497 * Generic RX handler implementations 3497 * Generic RX handler implementations
3498 * 3498 *
3499 ******************************************************************************/ 3499 ******************************************************************************/
3500#ifdef CONFIG_IWLWIFI_HT 3500#ifdef CONFIG_IWL4965_HT
3501#ifdef CONFIG_IWLWIFI_HT_AGG 3501#ifdef CONFIG_IWL4965_HT_AGG
3502 3502
3503static inline int iwl_get_ra_sta_id(struct iwl_priv *priv, 3503static inline int iwl_get_ra_sta_id(struct iwl_priv *priv,
3504 struct ieee80211_hdr *hdr) 3504 struct ieee80211_hdr *hdr)
@@ -3654,8 +3654,8 @@ static void iwl_rx_reply_tx(struct iwl_priv *priv,
3654 struct ieee80211_tx_status *tx_status; 3654 struct ieee80211_tx_status *tx_status;
3655 struct iwl_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; 3655 struct iwl_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
3656 u32 status = le32_to_cpu(tx_resp->status); 3656 u32 status = le32_to_cpu(tx_resp->status);
3657#ifdef CONFIG_IWLWIFI_HT 3657#ifdef CONFIG_IWL4965_HT
3658#ifdef CONFIG_IWLWIFI_HT_AGG 3658#ifdef CONFIG_IWL4965_HT_AGG
3659 int tid, sta_id; 3659 int tid, sta_id;
3660#endif 3660#endif
3661#endif 3661#endif
@@ -3668,8 +3668,8 @@ static void iwl_rx_reply_tx(struct iwl_priv *priv,
3668 return; 3668 return;
3669 } 3669 }
3670 3670
3671#ifdef CONFIG_IWLWIFI_HT 3671#ifdef CONFIG_IWL4965_HT
3672#ifdef CONFIG_IWLWIFI_HT_AGG 3672#ifdef CONFIG_IWL4965_HT_AGG
3673 if (txq->sched_retry) { 3673 if (txq->sched_retry) {
3674 const u32 scd_ssn = iwl_get_scd_ssn(tx_resp); 3674 const u32 scd_ssn = iwl_get_scd_ssn(tx_resp);
3675 struct ieee80211_hdr *hdr = 3675 struct ieee80211_hdr *hdr =
@@ -3706,8 +3706,8 @@ static void iwl_rx_reply_tx(struct iwl_priv *priv,
3706 iwl_tx_queue_reclaim(priv, txq_id, index); 3706 iwl_tx_queue_reclaim(priv, txq_id, index);
3707 } 3707 }
3708 } else { 3708 } else {
3709#endif /* CONFIG_IWLWIFI_HT_AGG */ 3709#endif /* CONFIG_IWL4965_HT_AGG */
3710#endif /* CONFIG_IWLWIFI_HT */ 3710#endif /* CONFIG_IWL4965_HT */
3711 tx_status = &(txq->txb[txq->q.read_ptr].status); 3711 tx_status = &(txq->txb[txq->q.read_ptr].status);
3712 3712
3713 tx_status->retry_count = tx_resp->failure_frame; 3713 tx_status->retry_count = tx_resp->failure_frame;
@@ -3729,11 +3729,11 @@ static void iwl_rx_reply_tx(struct iwl_priv *priv,
3729 IWL_DEBUG_TX_REPLY("Tx queue reclaim %d\n", index); 3729 IWL_DEBUG_TX_REPLY("Tx queue reclaim %d\n", index);
3730 if (index != -1) 3730 if (index != -1)
3731 iwl_tx_queue_reclaim(priv, txq_id, index); 3731 iwl_tx_queue_reclaim(priv, txq_id, index);
3732#ifdef CONFIG_IWLWIFI_HT 3732#ifdef CONFIG_IWL4965_HT
3733#ifdef CONFIG_IWLWIFI_HT_AGG 3733#ifdef CONFIG_IWL4965_HT_AGG
3734 } 3734 }
3735#endif /* CONFIG_IWLWIFI_HT_AGG */ 3735#endif /* CONFIG_IWL4965_HT_AGG */
3736#endif /* CONFIG_IWLWIFI_HT */ 3736#endif /* CONFIG_IWL4965_HT */
3737 3737
3738 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) 3738 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
3739 IWL_ERROR("TODO: Implement Tx ABORT REQUIRED!!!\n"); 3739 IWL_ERROR("TODO: Implement Tx ABORT REQUIRED!!!\n");
@@ -3815,7 +3815,7 @@ static void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
3815static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv, 3815static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
3816 struct iwl_rx_mem_buffer *rxb) 3816 struct iwl_rx_mem_buffer *rxb)
3817{ 3817{
3818#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 3818#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
3819 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3819 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3820 struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif); 3820 struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif);
3821 3821
@@ -3833,7 +3833,7 @@ static void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
3833static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv, 3833static void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
3834 struct iwl_rx_mem_buffer *rxb) 3834 struct iwl_rx_mem_buffer *rxb)
3835{ 3835{
3836#ifdef CONFIG_IWLWIFI_DEBUG 3836#ifdef CONFIG_IWL4965_DEBUG
3837 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3837 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3838 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); 3838 struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif);
3839 IWL_DEBUG_RX("sleep mode: %d, src: %d\n", 3839 IWL_DEBUG_RX("sleep mode: %d, src: %d\n",
@@ -3879,7 +3879,7 @@ static void iwl_bg_beacon_update(struct work_struct *work)
3879static void iwl_rx_beacon_notif(struct iwl_priv *priv, 3879static void iwl_rx_beacon_notif(struct iwl_priv *priv,
3880 struct iwl_rx_mem_buffer *rxb) 3880 struct iwl_rx_mem_buffer *rxb)
3881{ 3881{
3882#ifdef CONFIG_IWLWIFI_DEBUG 3882#ifdef CONFIG_IWL4965_DEBUG
3883 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3883 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3884 struct iwl_beacon_notif *beacon = &(pkt->u.beacon_status); 3884 struct iwl_beacon_notif *beacon = &(pkt->u.beacon_status);
3885 u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); 3885 u8 rate = iwl_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags);
@@ -3902,7 +3902,7 @@ static void iwl_rx_beacon_notif(struct iwl_priv *priv,
3902static void iwl_rx_reply_scan(struct iwl_priv *priv, 3902static void iwl_rx_reply_scan(struct iwl_priv *priv,
3903 struct iwl_rx_mem_buffer *rxb) 3903 struct iwl_rx_mem_buffer *rxb)
3904{ 3904{
3905#ifdef CONFIG_IWLWIFI_DEBUG 3905#ifdef CONFIG_IWL4965_DEBUG
3906 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 3906 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
3907 struct iwl_scanreq_notification *notif = 3907 struct iwl_scanreq_notification *notif =
3908 (struct iwl_scanreq_notification *)pkt->u.raw; 3908 (struct iwl_scanreq_notification *)pkt->u.raw;
@@ -4700,7 +4700,7 @@ static int iwl_tx_queue_update_write_ptr(struct iwl_priv *priv,
4700 return rc; 4700 return rc;
4701} 4701}
4702 4702
4703#ifdef CONFIG_IWLWIFI_DEBUG 4703#ifdef CONFIG_IWL4965_DEBUG
4704static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon) 4704static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4705{ 4705{
4706 DECLARE_MAC_BUF(mac); 4706 DECLARE_MAC_BUF(mac);
@@ -4924,7 +4924,7 @@ static void iwl_irq_handle_error(struct iwl_priv *priv)
4924 /* Cancel currently queued command. */ 4924 /* Cancel currently queued command. */
4925 clear_bit(STATUS_HCMD_ACTIVE, &priv->status); 4925 clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
4926 4926
4927#ifdef CONFIG_IWLWIFI_DEBUG 4927#ifdef CONFIG_IWL4965_DEBUG
4928 if (iwl_debug_level & IWL_DL_FW_ERRORS) { 4928 if (iwl_debug_level & IWL_DL_FW_ERRORS) {
4929 iwl_dump_nic_error_log(priv); 4929 iwl_dump_nic_error_log(priv);
4930 iwl_dump_nic_event_log(priv); 4930 iwl_dump_nic_event_log(priv);
@@ -4973,7 +4973,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4973 u32 inta, handled = 0; 4973 u32 inta, handled = 0;
4974 u32 inta_fh; 4974 u32 inta_fh;
4975 unsigned long flags; 4975 unsigned long flags;
4976#ifdef CONFIG_IWLWIFI_DEBUG 4976#ifdef CONFIG_IWL4965_DEBUG
4977 u32 inta_mask; 4977 u32 inta_mask;
4978#endif 4978#endif
4979 4979
@@ -4991,7 +4991,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
4991 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); 4991 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
4992 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); 4992 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh);
4993 4993
4994#ifdef CONFIG_IWLWIFI_DEBUG 4994#ifdef CONFIG_IWL4965_DEBUG
4995 if (iwl_debug_level & IWL_DL_ISR) { 4995 if (iwl_debug_level & IWL_DL_ISR) {
4996 inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */ 4996 inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */
4997 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 4997 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
@@ -5024,7 +5024,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
5024 return; 5024 return;
5025 } 5025 }
5026 5026
5027#ifdef CONFIG_IWLWIFI_DEBUG 5027#ifdef CONFIG_IWL4965_DEBUG
5028 if (iwl_debug_level & (IWL_DL_ISR)) { 5028 if (iwl_debug_level & (IWL_DL_ISR)) {
5029 /* NIC fires this, but we don't use it, redundant with WAKEUP */ 5029 /* NIC fires this, but we don't use it, redundant with WAKEUP */
5030 if (inta & CSR_INT_BIT_MAC_CLK_ACTV) 5030 if (inta & CSR_INT_BIT_MAC_CLK_ACTV)
@@ -5114,7 +5114,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
5114 /* Re-enable all interrupts */ 5114 /* Re-enable all interrupts */
5115 iwl_enable_interrupts(priv); 5115 iwl_enable_interrupts(priv);
5116 5116
5117#ifdef CONFIG_IWLWIFI_DEBUG 5117#ifdef CONFIG_IWL4965_DEBUG
5118 if (iwl_debug_level & (IWL_DL_ISR)) { 5118 if (iwl_debug_level & (IWL_DL_ISR)) {
5119 inta = iwl_read32(priv, CSR_INT); 5119 inta = iwl_read32(priv, CSR_INT);
5120 inta_mask = iwl_read32(priv, CSR_INT_MASK); 5120 inta_mask = iwl_read32(priv, CSR_INT_MASK);
@@ -7148,7 +7148,7 @@ static void iwl_bg_post_associate(struct work_struct *data)
7148 7148
7149 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 7149 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
7150 7150
7151#ifdef CONFIG_IWLWIFI_HT 7151#ifdef CONFIG_IWL4965_HT
7152 if (priv->is_ht_enabled && priv->current_assoc_ht.is_ht) 7152 if (priv->is_ht_enabled && priv->current_assoc_ht.is_ht)
7153 iwl4965_set_rxon_ht(priv, &priv->current_assoc_ht); 7153 iwl4965_set_rxon_ht(priv, &priv->current_assoc_ht);
7154 else { 7154 else {
@@ -7156,7 +7156,7 @@ static void iwl_bg_post_associate(struct work_struct *data)
7156 priv->active_rate_ht[1] = 0; 7156 priv->active_rate_ht[1] = 0;
7157 priv->current_channel_width = IWL_CHANNEL_WIDTH_20MHZ; 7157 priv->current_channel_width = IWL_CHANNEL_WIDTH_20MHZ;
7158 } 7158 }
7159#endif /* CONFIG_IWLWIFI_HT*/ 7159#endif /* CONFIG_IWL4965_HT*/
7160 iwl4965_set_rxon_chain(priv); 7160 iwl4965_set_rxon_chain(priv);
7161 priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); 7161 priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
7162 7162
@@ -7206,18 +7206,18 @@ static void iwl_bg_post_associate(struct work_struct *data)
7206 7206
7207 iwl_sequence_reset(priv); 7207 iwl_sequence_reset(priv);
7208 7208
7209#ifdef CONFIG_IWLWIFI_SENSITIVITY 7209#ifdef CONFIG_IWL4965_SENSITIVITY
7210 /* Enable Rx differential gain and sensitivity calibrations */ 7210 /* Enable Rx differential gain and sensitivity calibrations */
7211 iwl4965_chain_noise_reset(priv); 7211 iwl4965_chain_noise_reset(priv);
7212 priv->start_calib = 1; 7212 priv->start_calib = 1;
7213#endif /* CONFIG_IWLWIFI_SENSITIVITY */ 7213#endif /* CONFIG_IWL4965_SENSITIVITY */
7214 7214
7215 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 7215 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
7216 priv->assoc_station_added = 1; 7216 priv->assoc_station_added = 1;
7217 7217
7218#ifdef CONFIG_IWLWIFI_QOS 7218#ifdef CONFIG_IWL4965_QOS
7219 iwl_activate_qos(priv, 0); 7219 iwl_activate_qos(priv, 0);
7220#endif /* CONFIG_IWLWIFI_QOS */ 7220#endif /* CONFIG_IWL4965_QOS */
7221 mutex_unlock(&priv->mutex); 7221 mutex_unlock(&priv->mutex);
7222} 7222}
7223 7223
@@ -7399,7 +7399,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
7399 return -EINVAL; 7399 return -EINVAL;
7400 } 7400 }
7401 7401
7402#ifdef CONFIG_IWLWIFI_HT 7402#ifdef CONFIG_IWL4965_HT
7403 /* if we are switching fron ht to 2.4 clear flags 7403 /* if we are switching fron ht to 2.4 clear flags
7404 * from any ht related info since 2.4 does not 7404 * from any ht related info since 2.4 does not
7405 * support ht */ 7405 * support ht */
@@ -7409,7 +7409,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
7409#endif 7409#endif
7410 ) 7410 )
7411 priv->staging_rxon.flags = 0; 7411 priv->staging_rxon.flags = 0;
7412#endif /* CONFIG_IWLWIFI_HT */ 7412#endif /* CONFIG_IWL4965_HT */
7413 7413
7414 iwl_set_rxon_channel(priv, conf->phymode, conf->channel); 7414 iwl_set_rxon_channel(priv, conf->phymode, conf->channel);
7415 7415
@@ -7509,7 +7509,7 @@ static void iwl_config_ap(struct iwl_priv *priv)
7509 /* restore RXON assoc */ 7509 /* restore RXON assoc */
7510 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 7510 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
7511 iwl_commit_rxon(priv); 7511 iwl_commit_rxon(priv);
7512#ifdef CONFIG_IWLWIFI_QOS 7512#ifdef CONFIG_IWL4965_QOS
7513 iwl_activate_qos(priv, 1); 7513 iwl_activate_qos(priv, 1);
7514#endif 7514#endif
7515 iwl_rxon_add_station(priv, BROADCAST_ADDR, 0); 7515 iwl_rxon_add_station(priv, BROADCAST_ADDR, 0);
@@ -7805,7 +7805,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7805 const struct ieee80211_tx_queue_params *params) 7805 const struct ieee80211_tx_queue_params *params)
7806{ 7806{
7807 struct iwl_priv *priv = hw->priv; 7807 struct iwl_priv *priv = hw->priv;
7808#ifdef CONFIG_IWLWIFI_QOS 7808#ifdef CONFIG_IWL4965_QOS
7809 unsigned long flags; 7809 unsigned long flags;
7810 int q; 7810 int q;
7811#endif /* CONFIG_IWL_QOS */ 7811#endif /* CONFIG_IWL_QOS */
@@ -7822,7 +7822,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7822 return 0; 7822 return 0;
7823 } 7823 }
7824 7824
7825#ifdef CONFIG_IWLWIFI_QOS 7825#ifdef CONFIG_IWL4965_QOS
7826 if (!priv->qos_data.qos_enable) { 7826 if (!priv->qos_data.qos_enable) {
7827 priv->qos_data.qos_active = 0; 7827 priv->qos_data.qos_active = 0;
7828 IWL_DEBUG_MAC80211("leave - qos not enabled\n"); 7828 IWL_DEBUG_MAC80211("leave - qos not enabled\n");
@@ -7851,7 +7851,7 @@ static int iwl_mac_conf_tx(struct ieee80211_hw *hw, int queue,
7851 7851
7852 mutex_unlock(&priv->mutex); 7852 mutex_unlock(&priv->mutex);
7853 7853
7854#endif /*CONFIG_IWLWIFI_QOS */ 7854#endif /*CONFIG_IWL4965_QOS */
7855 7855
7856 IWL_DEBUG_MAC80211("leave\n"); 7856 IWL_DEBUG_MAC80211("leave\n");
7857 return 0; 7857 return 0;
@@ -7918,11 +7918,11 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
7918 IWL_DEBUG_MAC80211("enter\n"); 7918 IWL_DEBUG_MAC80211("enter\n");
7919 7919
7920 priv->lq_mngr.lq_ready = 0; 7920 priv->lq_mngr.lq_ready = 0;
7921#ifdef CONFIG_IWLWIFI_HT 7921#ifdef CONFIG_IWL4965_HT
7922 spin_lock_irqsave(&priv->lock, flags); 7922 spin_lock_irqsave(&priv->lock, flags);
7923 memset(&priv->current_assoc_ht, 0, sizeof(struct sta_ht_info)); 7923 memset(&priv->current_assoc_ht, 0, sizeof(struct sta_ht_info));
7924 spin_unlock_irqrestore(&priv->lock, flags); 7924 spin_unlock_irqrestore(&priv->lock, flags);
7925#ifdef CONFIG_IWLWIFI_HT_AGG 7925#ifdef CONFIG_IWL4965_HT_AGG
7926/* if (priv->lq_mngr.agg_ctrl.granted_ba) 7926/* if (priv->lq_mngr.agg_ctrl.granted_ba)
7927 iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED);*/ 7927 iwl4965_turn_off_agg(priv, TID_ALL_SPECIFIED);*/
7928 7928
@@ -7933,10 +7933,10 @@ static void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
7933 7933
7934 if (priv->lq_mngr.agg_ctrl.auto_agg) 7934 if (priv->lq_mngr.agg_ctrl.auto_agg)
7935 priv->lq_mngr.agg_ctrl.requested_ba = TID_ALL_ENABLED; 7935 priv->lq_mngr.agg_ctrl.requested_ba = TID_ALL_ENABLED;
7936#endif /*CONFIG_IWLWIFI_HT_AGG */ 7936#endif /*CONFIG_IWL4965_HT_AGG */
7937#endif /* CONFIG_IWLWIFI_HT */ 7937#endif /* CONFIG_IWL4965_HT */
7938 7938
7939#ifdef CONFIG_IWLWIFI_QOS 7939#ifdef CONFIG_IWL4965_QOS
7940 iwl_reset_qos(priv); 7940 iwl_reset_qos(priv);
7941#endif 7941#endif
7942 7942
@@ -8028,7 +8028,7 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
8028 IWL_DEBUG_MAC80211("leave\n"); 8028 IWL_DEBUG_MAC80211("leave\n");
8029 spin_unlock_irqrestore(&priv->lock, flags); 8029 spin_unlock_irqrestore(&priv->lock, flags);
8030 8030
8031#ifdef CONFIG_IWLWIFI_QOS 8031#ifdef CONFIG_IWL4965_QOS
8032 iwl_reset_qos(priv); 8032 iwl_reset_qos(priv);
8033#endif 8033#endif
8034 8034
@@ -8039,7 +8039,7 @@ static int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
8039 return 0; 8039 return 0;
8040} 8040}
8041 8041
8042#ifdef CONFIG_IWLWIFI_HT 8042#ifdef CONFIG_IWL4965_HT
8043union ht_cap_info { 8043union ht_cap_info {
8044 struct { 8044 struct {
8045 u16 advanced_coding_cap :1; 8045 u16 advanced_coding_cap :1;
@@ -8231,7 +8231,7 @@ static void iwl_mac_get_ht_capab(struct ieee80211_hw *hw,
8231 iwl_set_ht_capab(hw, ht_cap, use_wide_channel); 8231 iwl_set_ht_capab(hw, ht_cap, use_wide_channel);
8232 IWL_DEBUG_MAC80211("leave: \n"); 8232 IWL_DEBUG_MAC80211("leave: \n");
8233} 8233}
8234#endif /*CONFIG_IWLWIFI_HT*/ 8234#endif /*CONFIG_IWL4965_HT*/
8235 8235
8236/***************************************************************************** 8236/*****************************************************************************
8237 * 8237 *
@@ -8239,7 +8239,7 @@ static void iwl_mac_get_ht_capab(struct ieee80211_hw *hw,
8239 * 8239 *
8240 *****************************************************************************/ 8240 *****************************************************************************/
8241 8241
8242#ifdef CONFIG_IWLWIFI_DEBUG 8242#ifdef CONFIG_IWL4965_DEBUG
8243 8243
8244/* 8244/*
8245 * The following adds a new attribute to the sysfs representation 8245 * The following adds a new attribute to the sysfs representation
@@ -8272,7 +8272,7 @@ static ssize_t store_debug_level(struct device_driver *d,
8272static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, 8272static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
8273 show_debug_level, store_debug_level); 8273 show_debug_level, store_debug_level);
8274 8274
8275#endif /* CONFIG_IWLWIFI_DEBUG */ 8275#endif /* CONFIG_IWL4965_DEBUG */
8276 8276
8277static ssize_t show_rf_kill(struct device *d, 8277static ssize_t show_rf_kill(struct device *d,
8278 struct device_attribute *attr, char *buf) 8278 struct device_attribute *attr, char *buf)
@@ -8484,7 +8484,7 @@ static ssize_t store_tune(struct device *d,
8484 8484
8485static DEVICE_ATTR(tune, S_IWUSR | S_IRUGO, show_tune, store_tune); 8485static DEVICE_ATTR(tune, S_IWUSR | S_IRUGO, show_tune, store_tune);
8486 8486
8487#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 8487#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
8488 8488
8489static ssize_t show_measurement(struct device *d, 8489static ssize_t show_measurement(struct device *d,
8490 struct device_attribute *attr, char *buf) 8490 struct device_attribute *attr, char *buf)
@@ -8555,7 +8555,7 @@ static ssize_t store_measurement(struct device *d,
8555 8555
8556static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR, 8556static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR,
8557 show_measurement, store_measurement); 8557 show_measurement, store_measurement);
8558#endif /* CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT */ 8558#endif /* CONFIG_IWL4965_SPECTRUM_MEASUREMENT */
8559 8559
8560static ssize_t store_retry_rate(struct device *d, 8560static ssize_t store_retry_rate(struct device *d,
8561 struct device_attribute *attr, 8561 struct device_attribute *attr,
@@ -8908,7 +8908,7 @@ static struct attribute *iwl_sysfs_entries[] = {
8908 &dev_attr_dump_events.attr, 8908 &dev_attr_dump_events.attr,
8909 &dev_attr_flags.attr, 8909 &dev_attr_flags.attr,
8910 &dev_attr_filter_flags.attr, 8910 &dev_attr_filter_flags.attr,
8911#ifdef CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT 8911#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
8912 &dev_attr_measurement.attr, 8912 &dev_attr_measurement.attr,
8913#endif 8913#endif
8914 &dev_attr_power_level.attr, 8914 &dev_attr_power_level.attr,
@@ -8946,16 +8946,16 @@ static struct ieee80211_ops iwl_hw_ops = {
8946 .reset_tsf = iwl_mac_reset_tsf, 8946 .reset_tsf = iwl_mac_reset_tsf,
8947 .beacon_update = iwl_mac_beacon_update, 8947 .beacon_update = iwl_mac_beacon_update,
8948 .erp_ie_changed = iwl_mac_erp_ie_changed, 8948 .erp_ie_changed = iwl_mac_erp_ie_changed,
8949#ifdef CONFIG_IWLWIFI_HT 8949#ifdef CONFIG_IWL4965_HT
8950 .conf_ht = iwl_mac_conf_ht, 8950 .conf_ht = iwl_mac_conf_ht,
8951 .get_ht_capab = iwl_mac_get_ht_capab, 8951 .get_ht_capab = iwl_mac_get_ht_capab,
8952#ifdef CONFIG_IWLWIFI_HT_AGG 8952#ifdef CONFIG_IWL4965_HT_AGG
8953 .ht_tx_agg_start = iwl_mac_ht_tx_agg_start, 8953 .ht_tx_agg_start = iwl_mac_ht_tx_agg_start,
8954 .ht_tx_agg_stop = iwl_mac_ht_tx_agg_stop, 8954 .ht_tx_agg_stop = iwl_mac_ht_tx_agg_stop,
8955 .ht_rx_agg_start = iwl_mac_ht_rx_agg_start, 8955 .ht_rx_agg_start = iwl_mac_ht_rx_agg_start,
8956 .ht_rx_agg_stop = iwl_mac_ht_rx_agg_stop, 8956 .ht_rx_agg_stop = iwl_mac_ht_rx_agg_stop,
8957#endif /* CONFIG_IWLWIFI_HT_AGG */ 8957#endif /* CONFIG_IWL4965_HT_AGG */
8958#endif /* CONFIG_IWLWIFI_HT */ 8958#endif /* CONFIG_IWL4965_HT */
8959 .hw_scan = iwl_mac_hw_scan 8959 .hw_scan = iwl_mac_hw_scan
8960}; 8960};
8961 8961
@@ -8997,7 +8997,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8997 8997
8998 priv->pci_dev = pdev; 8998 priv->pci_dev = pdev;
8999 priv->antenna = (enum iwl_antenna)iwl_param_antenna; 8999 priv->antenna = (enum iwl_antenna)iwl_param_antenna;
9000#ifdef CONFIG_IWLWIFI_DEBUG 9000#ifdef CONFIG_IWL4965_DEBUG
9001 iwl_debug_level = iwl_param_debug; 9001 iwl_debug_level = iwl_param_debug;
9002 atomic_set(&priv->restrict_refcnt, 0); 9002 atomic_set(&priv->restrict_refcnt, 0);
9003#endif 9003#endif
@@ -9018,11 +9018,11 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
9018 hw->flags = IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE; 9018 hw->flags = IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE;
9019 9019
9020 hw->queues = 4; 9020 hw->queues = 4;
9021#ifdef CONFIG_IWLWIFI_HT 9021#ifdef CONFIG_IWL4965_HT
9022#ifdef CONFIG_IWLWIFI_HT_AGG 9022#ifdef CONFIG_IWL4965_HT_AGG
9023 hw->queues = 16; 9023 hw->queues = 16;
9024#endif /* CONFIG_IWLWIFI_HT_AGG */ 9024#endif /* CONFIG_IWL4965_HT_AGG */
9025#endif /* CONFIG_IWLWIFI_HT */ 9025#endif /* CONFIG_IWL4965_HT */
9026 9026
9027 spin_lock_init(&priv->lock); 9027 spin_lock_init(&priv->lock);
9028 spin_lock_init(&priv->power_data.lock); 9028 spin_lock_init(&priv->power_data.lock);
@@ -9103,7 +9103,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
9103 goto out_iounmap; 9103 goto out_iounmap;
9104 } 9104 }
9105 9105
9106#ifdef CONFIG_IWLWIFI_QOS 9106#ifdef CONFIG_IWL4965_QOS
9107 if (iwl_param_qos_enable) 9107 if (iwl_param_qos_enable)
9108 priv->qos_data.qos_enable = 1; 9108 priv->qos_data.qos_enable = 1;
9109 9109
@@ -9111,7 +9111,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
9111 9111
9112 priv->qos_data.qos_active = 0; 9112 priv->qos_data.qos_active = 0;
9113 priv->qos_data.qos_cap.val = 0; 9113 priv->qos_data.qos_cap.val = 0;
9114#endif /* CONFIG_IWLWIFI_QOS */ 9114#endif /* CONFIG_IWL4965_QOS */
9115 9115
9116 iwl_set_rxon_channel(priv, MODE_IEEE80211G, 6); 9116 iwl_set_rxon_channel(priv, MODE_IEEE80211G, 6);
9117 iwl_setup_deferred_work(priv); 9117 iwl_setup_deferred_work(priv);
@@ -9371,7 +9371,7 @@ static int __init iwl_init(void)
9371 IWL_ERROR("Unable to initialize PCI module\n"); 9371 IWL_ERROR("Unable to initialize PCI module\n");
9372 return ret; 9372 return ret;
9373 } 9373 }
9374#ifdef CONFIG_IWLWIFI_DEBUG 9374#ifdef CONFIG_IWL4965_DEBUG
9375 ret = driver_create_file(&iwl_driver.driver, &driver_attr_debug_level); 9375 ret = driver_create_file(&iwl_driver.driver, &driver_attr_debug_level);
9376 if (ret) { 9376 if (ret) {
9377 IWL_ERROR("Unable to create driver sysfs file\n"); 9377 IWL_ERROR("Unable to create driver sysfs file\n");
@@ -9385,7 +9385,7 @@ static int __init iwl_init(void)
9385 9385
9386static void __exit iwl_exit(void) 9386static void __exit iwl_exit(void)
9387{ 9387{
9388#ifdef CONFIG_IWLWIFI_DEBUG 9388#ifdef CONFIG_IWL4965_DEBUG
9389 driver_remove_file(&iwl_driver.driver, &driver_attr_debug_level); 9389 driver_remove_file(&iwl_driver.driver, &driver_attr_debug_level);
9390#endif 9390#endif
9391 pci_unregister_driver(&iwl_driver); 9391 pci_unregister_driver(&iwl_driver);