aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-12 19:58:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:46 -0400
commit0a6857e70d577237bb1cd1c991e68e7d3b6f7c90 (patch)
treeb0876013471917412ffe54b0b5badcc4de3fb18e /drivers
parent8236e183fc53be2b5d81a4f547f9c5b645e10fe0 (diff)
iwlwifi: rename iwl-4965-debug.h back to iwl-debug.h
This patch removes iwl-4965-debug.h to iwl-debug.h It will be used by more NICs Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/Kconfig2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-io.h36
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h (renamed from drivers/net/wireless/iwlwifi/iwl-4965-debug.h)24
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c56
9 files changed, 71 insertions, 71 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index 5b7c0160e1fa..acb807936131 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -50,7 +50,7 @@ config IWL4965_SENSITIVITY
50 This option will enable sensitivity calibration for the iwl4965 50 This option will enable sensitivity calibration for the iwl4965
51 driver. 51 driver.
52 52
53config IWL4965_DEBUG 53config IWLWIFI_DEBUG
54 bool "Enable full debugging output in iwl4965 driver" 54 bool "Enable full debugging output in iwl4965 driver"
55 depends on IWL4965 55 depends on IWL4965
56 ---help--- 56 ---help---
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-io.h b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
index 07fca8888f40..3accdfb33e56 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
@@ -31,7 +31,7 @@
31 31
32#include <linux/io.h> 32#include <linux/io.h>
33 33
34#include "iwl-4965-debug.h" 34#include "iwl-debug.h"
35 35
36/* 36/*
37 * IO, register, and NIC memory access functions 37 * IO, register, and NIC memory access functions
@@ -60,7 +60,7 @@
60 */ 60 */
61 61
62#define _iwl4965_write32(priv, ofs, val) writel((val), (priv)->hw_base + (ofs)) 62#define _iwl4965_write32(priv, ofs, val) writel((val), (priv)->hw_base + (ofs))
63#ifdef CONFIG_IWL4965_DEBUG 63#ifdef CONFIG_IWLWIFI_DEBUG
64static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *priv, 64static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *priv,
65 u32 ofs, u32 val) 65 u32 ofs, u32 val)
66{ 66{
@@ -74,7 +74,7 @@ static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *
74#endif 74#endif
75 75
76#define _iwl4965_read32(priv, ofs) readl((priv)->hw_base + (ofs)) 76#define _iwl4965_read32(priv, ofs) readl((priv)->hw_base + (ofs))
77#ifdef CONFIG_IWL4965_DEBUG 77#ifdef CONFIG_IWLWIFI_DEBUG
78static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, u32 ofs) 78static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, 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 _iwl4965_poll_bit(struct iwl4965_priv *priv, u32 addr,
99 99
100 return -ETIMEDOUT; 100 return -ETIMEDOUT;
101} 101}
102#ifdef CONFIG_IWL4965_DEBUG 102#ifdef CONFIG_IWLWIFI_DEBUG
103static inline int __iwl4965_poll_bit(const char *f, u32 l, 103static inline int __iwl4965_poll_bit(const char *f, u32 l,
104 struct iwl4965_priv *priv, u32 addr, 104 struct iwl4965_priv *priv, u32 addr,
105 u32 bits, u32 mask, int timeout) 105 u32 bits, u32 mask, int timeout)
@@ -120,7 +120,7 @@ static inline void _iwl4965_set_bit(struct iwl4965_priv *priv, u32 reg, u32 mask
120{ 120{
121 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) | mask); 121 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) | mask);
122} 122}
123#ifdef CONFIG_IWL4965_DEBUG 123#ifdef CONFIG_IWLWIFI_DEBUG
124static inline void __iwl4965_set_bit(const char *f, u32 l, 124static inline void __iwl4965_set_bit(const char *f, u32 l,
125 struct iwl4965_priv *priv, u32 reg, u32 mask) 125 struct iwl4965_priv *priv, u32 reg, u32 mask)
126{ 126{
@@ -137,7 +137,7 @@ static inline void _iwl4965_clear_bit(struct iwl4965_priv *priv, u32 reg, u32 ma
137{ 137{
138 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) & ~mask); 138 _iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) & ~mask);
139} 139}
140#ifdef CONFIG_IWL4965_DEBUG 140#ifdef CONFIG_IWLWIFI_DEBUG
141static inline void __iwl4965_clear_bit(const char *f, u32 l, 141static inline void __iwl4965_clear_bit(const char *f, u32 l,
142 struct iwl4965_priv *priv, u32 reg, u32 mask) 142 struct iwl4965_priv *priv, u32 reg, u32 mask)
143{ 143{
@@ -155,7 +155,7 @@ static inline int _iwl4965_grab_nic_access(struct iwl4965_priv *priv)
155 int ret; 155 int ret;
156 u32 gp_ctl; 156 u32 gp_ctl;
157 157
158#ifdef CONFIG_IWL4965_DEBUG 158#ifdef CONFIG_IWLWIFI_DEBUG
159 if (atomic_read(&priv->restrict_refcnt)) 159 if (atomic_read(&priv->restrict_refcnt))
160 return 0; 160 return 0;
161#endif 161#endif
@@ -186,13 +186,13 @@ static inline int _iwl4965_grab_nic_access(struct iwl4965_priv *priv)
186 return -EIO; 186 return -EIO;
187 } 187 }
188 188
189#ifdef CONFIG_IWL4965_DEBUG 189#ifdef CONFIG_IWLWIFI_DEBUG
190 atomic_inc(&priv->restrict_refcnt); 190 atomic_inc(&priv->restrict_refcnt);
191#endif 191#endif
192 return 0; 192 return 0;
193} 193}
194 194
195#ifdef CONFIG_IWL4965_DEBUG 195#ifdef CONFIG_IWLWIFI_DEBUG
196static inline int __iwl4965_grab_nic_access(const char *f, u32 l, 196static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
197 struct iwl4965_priv *priv) 197 struct iwl4965_priv *priv)
198{ 198{
@@ -212,13 +212,13 @@ static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
212 212
213static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv) 213static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv)
214{ 214{
215#ifdef CONFIG_IWL4965_DEBUG 215#ifdef CONFIG_IWLWIFI_DEBUG
216 if (atomic_dec_and_test(&priv->restrict_refcnt)) 216 if (atomic_dec_and_test(&priv->restrict_refcnt))
217#endif 217#endif
218 _iwl4965_clear_bit(priv, CSR_GP_CNTRL, 218 _iwl4965_clear_bit(priv, CSR_GP_CNTRL,
219 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 219 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
220} 220}
221#ifdef CONFIG_IWL4965_DEBUG 221#ifdef CONFIG_IWLWIFI_DEBUG
222static inline void __iwl4965_release_nic_access(const char *f, u32 l, 222static inline void __iwl4965_release_nic_access(const char *f, u32 l,
223 struct iwl4965_priv *priv) 223 struct iwl4965_priv *priv)
224{ 224{
@@ -239,7 +239,7 @@ static inline u32 _iwl4965_read_direct32(struct iwl4965_priv *priv, u32 reg)
239{ 239{
240 return _iwl4965_read32(priv, reg); 240 return _iwl4965_read32(priv, reg);
241} 241}
242#ifdef CONFIG_IWL4965_DEBUG 242#ifdef CONFIG_IWLWIFI_DEBUG
243static inline u32 __iwl4965_read_direct32(const char *f, u32 l, 243static inline u32 __iwl4965_read_direct32(const char *f, u32 l,
244 struct iwl4965_priv *priv, u32 reg) 244 struct iwl4965_priv *priv, u32 reg)
245{ 245{
@@ -261,7 +261,7 @@ static inline void _iwl4965_write_direct32(struct iwl4965_priv *priv,
261{ 261{
262 _iwl4965_write32(priv, reg, value); 262 _iwl4965_write32(priv, reg, value);
263} 263}
264#ifdef CONFIG_IWL4965_DEBUG 264#ifdef CONFIG_IWLWIFI_DEBUG
265static void __iwl4965_write_direct32(u32 line, 265static void __iwl4965_write_direct32(u32 line,
266 struct iwl4965_priv *priv, u32 reg, u32 value) 266 struct iwl4965_priv *priv, u32 reg, u32 value)
267{ 267{
@@ -301,7 +301,7 @@ static inline int _iwl4965_poll_direct_bit(struct iwl4965_priv *priv,
301 return -ETIMEDOUT; 301 return -ETIMEDOUT;
302} 302}
303 303
304#ifdef CONFIG_IWL4965_DEBUG 304#ifdef CONFIG_IWLWIFI_DEBUG
305static inline int __iwl4965_poll_direct_bit(const char *f, u32 l, 305static inline int __iwl4965_poll_direct_bit(const char *f, u32 l,
306 struct iwl4965_priv *priv, 306 struct iwl4965_priv *priv,
307 u32 addr, u32 mask, int timeout) 307 u32 addr, u32 mask, int timeout)
@@ -327,7 +327,7 @@ static inline u32 _iwl4965_read_prph(struct iwl4965_priv *priv, u32 reg)
327 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); 327 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
328 return _iwl4965_read_direct32(priv, HBUS_TARG_PRPH_RDAT); 328 return _iwl4965_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
329} 329}
330#ifdef CONFIG_IWL4965_DEBUG 330#ifdef CONFIG_IWLWIFI_DEBUG
331static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 reg) 331static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 reg)
332{ 332{
333 if (!atomic_read(&priv->restrict_refcnt)) 333 if (!atomic_read(&priv->restrict_refcnt))
@@ -348,7 +348,7 @@ static inline void _iwl4965_write_prph(struct iwl4965_priv *priv,
348 ((addr & 0x0000FFFF) | (3 << 24))); 348 ((addr & 0x0000FFFF) | (3 << 24)));
349 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); 349 _iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
350} 350}
351#ifdef CONFIG_IWL4965_DEBUG 351#ifdef CONFIG_IWLWIFI_DEBUG
352static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv, 352static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv,
353 u32 addr, u32 val) 353 u32 addr, u32 val)
354{ 354{
@@ -365,7 +365,7 @@ static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv,
365 365
366#define _iwl4965_set_bits_prph(priv, reg, mask) \ 366#define _iwl4965_set_bits_prph(priv, reg, mask) \
367 _iwl4965_write_prph(priv, reg, (_iwl4965_read_prph(priv, reg) | mask)) 367 _iwl4965_write_prph(priv, reg, (_iwl4965_read_prph(priv, reg) | mask))
368#ifdef CONFIG_IWL4965_DEBUG 368#ifdef CONFIG_IWLWIFI_DEBUG
369static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv, 369static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv,
370 u32 reg, u32 mask) 370 u32 reg, u32 mask)
371{ 371{
@@ -383,7 +383,7 @@ static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv,
383#define _iwl4965_set_bits_mask_prph(priv, reg, bits, mask) \ 383#define _iwl4965_set_bits_mask_prph(priv, reg, bits, mask) \
384 _iwl4965_write_prph(priv, reg, ((_iwl4965_read_prph(priv, reg) & mask) | bits)) 384 _iwl4965_write_prph(priv, reg, ((_iwl4965_read_prph(priv, reg) & mask) | bits))
385 385
386#ifdef CONFIG_IWL4965_DEBUG 386#ifdef CONFIG_IWLWIFI_DEBUG
387static inline void __iwl4965_set_bits_mask_prph(u32 line, 387static inline void __iwl4965_set_bits_mask_prph(u32 line,
388 struct iwl4965_priv *priv, u32 reg, u32 bits, u32 mask) 388 struct iwl4965_priv *priv, u32 reg, u32 bits, u32 mask)
389{ 389{
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index 4b46226ff350..7733b23d582c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -244,7 +244,7 @@ static inline u8 iwl4965_rate_get_rate(u32 rate_n_flags)
244static int rs_send_lq_cmd(struct iwl4965_priv *priv, 244static int rs_send_lq_cmd(struct iwl4965_priv *priv,
245 struct iwl4965_link_quality_cmd *lq, u8 flags) 245 struct iwl4965_link_quality_cmd *lq, u8 flags)
246{ 246{
247#ifdef CONFIG_IWL4965_DEBUG 247#ifdef CONFIG_IWLWIFI_DEBUG
248 int i; 248 int i;
249#endif 249#endif
250 struct iwl4965_host_cmd cmd = { 250 struct iwl4965_host_cmd cmd = {
@@ -265,7 +265,7 @@ static int rs_send_lq_cmd(struct iwl4965_priv *priv,
265 IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n", 265 IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n",
266 lq->general_params.single_stream_ant_msk, 266 lq->general_params.single_stream_ant_msk,
267 lq->general_params.dual_stream_ant_msk); 267 lq->general_params.dual_stream_ant_msk);
268#ifdef CONFIG_IWL4965_DEBUG 268#ifdef CONFIG_IWLWIFI_DEBUG
269 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) 269 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++)
270 IWL_DEBUG_RATE("lq index %d 0x%X\n", 270 IWL_DEBUG_RATE("lq index %d 0x%X\n",
271 i, lq->rs_table[i].rate_n_flags); 271 i, lq->rs_table[i].rate_n_flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 3401f2a30cc5..2896af28981a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3583,7 +3583,7 @@ static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *ad
3583 } 3583 }
3584 } 3584 }
3585} 3585}
3586#ifdef CONFIG_IWL4965_DEBUG 3586#ifdef CONFIG_IWLWIFI_DEBUG
3587 3587
3588/** 3588/**
3589 * iwl4965_dbg_report_frame - dump frame to syslog during debug sessions 3589 * iwl4965_dbg_report_frame - dump frame to syslog during debug sessions
@@ -3623,7 +3623,7 @@ static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
3623 struct iwl4965_rx_frame_end *rx_end = IWL_RX_END(pkt); 3623 struct iwl4965_rx_frame_end *rx_end = IWL_RX_END(pkt);
3624 u8 *data = IWL_RX_DATA(pkt); 3624 u8 *data = IWL_RX_DATA(pkt);
3625 3625
3626 if (likely(!(iwl4965_debug_level & IWL_DL_RX))) 3626 if (likely(!(iwl_debug_level & IWL_DL_RX)))
3627 return; 3627 return;
3628 3628
3629 /* MAC header */ 3629 /* MAC header */
@@ -3726,7 +3726,7 @@ static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
3726 } 3726 }
3727 } 3727 }
3728 if (print_dump) 3728 if (print_dump)
3729 iwl4965_print_hex_dump(IWL_DL_RX, data, length); 3729 iwl_print_hex_dump(IWL_DL_RX, data, length);
3730} 3730}
3731#else 3731#else
3732static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv, 3732static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index f4e395fcb807..4426d0f85564 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -44,7 +44,7 @@ extern struct pci_device_id iwl4965_hw_card_ids[];
44#include "iwl-4965-hw.h" 44#include "iwl-4965-hw.h"
45#include "iwl-csr.h" 45#include "iwl-csr.h"
46#include "iwl-prph.h" 46#include "iwl-prph.h"
47#include "iwl-4965-debug.h" 47#include "iwl-debug.h"
48 48
49/* Change firmware file name, using "-" and incrementing number, 49/* Change firmware file name, using "-" and incrementing number,
50 * *only* when uCode interface or architecture changes so that it 50 * *only* when uCode interface or architecture changes so that it
@@ -1202,7 +1202,7 @@ struct iwl4965_priv {
1202 u32 pm_state[16]; 1202 u32 pm_state[16];
1203#endif 1203#endif
1204 1204
1205#ifdef CONFIG_IWL4965_DEBUG 1205#ifdef CONFIG_IWLWIFI_DEBUG
1206 /* debugging info */ 1206 /* debugging info */
1207 u32 framecnt_to_us; 1207 u32 framecnt_to_us;
1208 atomic_t restrict_refcnt; 1208 atomic_t restrict_refcnt;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 9ca539861db2..4645d194773e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -30,7 +30,7 @@
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/version.h> 31#include <linux/version.h>
32 32
33#include "iwl-4965-debug.h" 33#include "iwl-debug.h"
34#include "iwl-eeprom.h" 34#include "iwl-eeprom.h"
35#include "iwl-core.h" 35#include "iwl-core.h"
36 36
@@ -39,7 +39,7 @@ MODULE_VERSION(IWLWIFI_VERSION);
39MODULE_AUTHOR(DRV_COPYRIGHT); 39MODULE_AUTHOR(DRV_COPYRIGHT);
40MODULE_LICENSE("GPL/BSD"); 40MODULE_LICENSE("GPL/BSD");
41 41
42#ifdef CONFIG_IWL4965_DEBUG 42#ifdef CONFIG_IWLWIFI_DEBUG
43u32 iwl4965_debug_level; 43u32 iwl_debug_level;
44EXPORT_SYMBOL(iwl4965_debug_level); 44EXPORT_SYMBOL(iwl_debug_level);
45#endif 45#endif
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index df329481bb45..067700620e21 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -26,24 +26,24 @@
26 * 26 *
27 *****************************************************************************/ 27 *****************************************************************************/
28 28
29#ifndef __iwl4965_debug_h__ 29#ifndef __iwl_debug_h__
30#define __iwl4965_debug_h__ 30#define __iwl_debug_h__
31 31
32#ifdef CONFIG_IWL4965_DEBUG 32#ifdef CONFIG_IWLWIFI_DEBUG
33extern u32 iwl4965_debug_level; 33extern u32 iwl_debug_level;
34#define IWL_DEBUG(level, fmt, args...) \ 34#define IWL_DEBUG(level, fmt, args...) \
35do { if (iwl4965_debug_level & (level)) \ 35do { if (iwl_debug_level & (level)) \
36 printk(KERN_ERR DRV_NAME": %c %s " fmt, \ 36 printk(KERN_ERR DRV_NAME": %c %s " fmt, \
37 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) 37 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
38 38
39#define IWL_DEBUG_LIMIT(level, fmt, args...) \ 39#define IWL_DEBUG_LIMIT(level, fmt, args...) \
40do { if ((iwl4965_debug_level & (level)) && net_ratelimit()) \ 40do { if ((iwl_debug_level & (level)) && net_ratelimit()) \
41 printk(KERN_ERR DRV_NAME": %c %s " fmt, \ 41 printk(KERN_ERR DRV_NAME": %c %s " fmt, \
42 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) 42 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
43 43
44static inline void iwl4965_print_hex_dump(int level, void *p, u32 len) 44static inline void iwl_print_hex_dump(int level, void *p, u32 len)
45{ 45{
46 if (!(iwl4965_debug_level & level)) 46 if (!(iwl_debug_level & level))
47 return; 47 return;
48 48
49 print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1, 49 print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
@@ -57,10 +57,10 @@ static inline void IWL_DEBUG(int level, const char *fmt, ...)
57static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...) 57static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
58{ 58{
59} 59}
60static inline void iwl4965_print_hex_dump(int level, void *p, u32 len) 60static inline void iwl_print_hex_dump(int level, void *p, u32 len)
61{ 61{
62} 62}
63#endif /* CONFIG_IWL4965_DEBUG */ 63#endif /* CONFIG_IWLWIFI_DEBUG */
64 64
65 65
66 66
@@ -83,10 +83,10 @@ static inline void iwl4965_print_hex_dump(int level, void *p, u32 len)
83 * 83 *
84 * % cat /proc/net/iwl/debug_level 84 * % cat /proc/net/iwl/debug_level
85 * 85 *
86 * you simply need to add your entry to the iwl4965_debug_levels array. 86 * you simply need to add your entry to the iwl_debug_levels array.
87 * 87 *
88 * If you do not see debug_level in /proc/net/iwl then you do not have 88 * If you do not see debug_level in /proc/net/iwl then you do not have
89 * CONFIG_IWL4965_DEBUG defined in your kernel configuration 89 * CONFIG_IWLWIFI_DEBUG defined in your kernel configuration
90 * 90 *
91 */ 91 */
92 92
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index 0064387dea91..4fd1b362d2ed 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -71,7 +71,7 @@
71#include "iwl-4965-commands.h" 71#include "iwl-4965-commands.h"
72#include "iwl-4965.h" 72#include "iwl-4965.h"
73#include "iwl-core.h" 73#include "iwl-core.h"
74#include "iwl-4965-debug.h" 74#include "iwl-debug.h"
75#include "iwl-eeprom.h" 75#include "iwl-eeprom.h"
76#include "iwl-4965-io.h" 76#include "iwl-4965-io.h"
77 77
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index d0cb36b9efe3..e05bc902ee6e 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -76,7 +76,7 @@ int iwl4965_param_amsdu_size_8K; /* def: enable 8K amsdu size */
76 76
77#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link 4965AGN driver for Linux" 77#define DRV_DESCRIPTION "Intel(R) Wireless WiFi Link 4965AGN driver for Linux"
78 78
79#ifdef CONFIG_IWL4965_DEBUG 79#ifdef CONFIG_IWLWIFI_DEBUG
80#define VD "d" 80#define VD "d"
81#else 81#else
82#define VD 82#define VD
@@ -2578,7 +2578,7 @@ static int iwl4965_get_sta_id(struct iwl4965_priv *priv,
2578 IWL_DEBUG_DROP("Station %s not in station map. " 2578 IWL_DEBUG_DROP("Station %s not in station map. "
2579 "Defaulting to broadcast...\n", 2579 "Defaulting to broadcast...\n",
2580 print_mac(mac, hdr->addr1)); 2580 print_mac(mac, hdr->addr1));
2581 iwl4965_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 2581 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
2582 return priv->hw_setting.bcast_sta_id; 2582 return priv->hw_setting.bcast_sta_id;
2583 2583
2584 default: 2584 default:
@@ -2634,7 +2634,7 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv,
2634 2634
2635 fc = le16_to_cpu(hdr->frame_control); 2635 fc = le16_to_cpu(hdr->frame_control);
2636 2636
2637#ifdef CONFIG_IWL4965_DEBUG 2637#ifdef CONFIG_IWLWIFI_DEBUG
2638 if (ieee80211_is_auth(fc)) 2638 if (ieee80211_is_auth(fc))
2639 IWL_DEBUG_TX("Sending AUTH frame\n"); 2639 IWL_DEBUG_TX("Sending AUTH frame\n");
2640 else if (ieee80211_is_assoc_request(fc)) 2640 else if (ieee80211_is_assoc_request(fc))
@@ -2792,10 +2792,10 @@ static int iwl4965_tx_skb(struct iwl4965_priv *priv,
2792 txq->need_update = 0; 2792 txq->need_update = 0;
2793 } 2793 }
2794 2794
2795 iwl4965_print_hex_dump(IWL_DL_TX, out_cmd->cmd.payload, 2795 iwl_print_hex_dump(IWL_DL_TX, out_cmd->cmd.payload,
2796 sizeof(out_cmd->cmd.tx)); 2796 sizeof(out_cmd->cmd.tx));
2797 2797
2798 iwl4965_print_hex_dump(IWL_DL_TX, (u8 *)out_cmd->cmd.tx.hdr, 2798 iwl_print_hex_dump(IWL_DL_TX, (u8 *)out_cmd->cmd.tx.hdr,
2799 ieee80211_get_hdrlen(fc)); 2799 ieee80211_get_hdrlen(fc));
2800 2800
2801 /* Set up entry for this TFD in Tx byte-count array */ 2801 /* Set up entry for this TFD in Tx byte-count array */
@@ -3590,7 +3590,7 @@ static void iwl4965_rx_spectrum_measure_notif(struct iwl4965_priv *priv,
3590static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv, 3590static void iwl4965_rx_pm_sleep_notif(struct iwl4965_priv *priv,
3591 struct iwl4965_rx_mem_buffer *rxb) 3591 struct iwl4965_rx_mem_buffer *rxb)
3592{ 3592{
3593#ifdef CONFIG_IWL4965_DEBUG 3593#ifdef CONFIG_IWLWIFI_DEBUG
3594 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3594 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3595 struct iwl4965_sleep_notification *sleep = &(pkt->u.sleep_notif); 3595 struct iwl4965_sleep_notification *sleep = &(pkt->u.sleep_notif);
3596 IWL_DEBUG_RX("sleep mode: %d, src: %d\n", 3596 IWL_DEBUG_RX("sleep mode: %d, src: %d\n",
@@ -3605,7 +3605,7 @@ static void iwl4965_rx_pm_debug_statistics_notif(struct iwl4965_priv *priv,
3605 IWL_DEBUG_RADIO("Dumping %d bytes of unhandled " 3605 IWL_DEBUG_RADIO("Dumping %d bytes of unhandled "
3606 "notification for %s:\n", 3606 "notification for %s:\n",
3607 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); 3607 le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
3608 iwl4965_print_hex_dump(IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)); 3608 iwl_print_hex_dump(IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len));
3609} 3609}
3610 3610
3611static void iwl4965_bg_beacon_update(struct work_struct *work) 3611static void iwl4965_bg_beacon_update(struct work_struct *work)
@@ -3636,7 +3636,7 @@ static void iwl4965_bg_beacon_update(struct work_struct *work)
3636static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv, 3636static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv,
3637 struct iwl4965_rx_mem_buffer *rxb) 3637 struct iwl4965_rx_mem_buffer *rxb)
3638{ 3638{
3639#ifdef CONFIG_IWL4965_DEBUG 3639#ifdef CONFIG_IWLWIFI_DEBUG
3640 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3640 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3641 struct iwl4965_beacon_notif *beacon = &(pkt->u.beacon_status); 3641 struct iwl4965_beacon_notif *beacon = &(pkt->u.beacon_status);
3642 u8 rate = iwl4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags); 3642 u8 rate = iwl4965_hw_get_rate(beacon->beacon_notify_hdr.rate_n_flags);
@@ -3659,7 +3659,7 @@ static void iwl4965_rx_beacon_notif(struct iwl4965_priv *priv,
3659static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv, 3659static void iwl4965_rx_reply_scan(struct iwl4965_priv *priv,
3660 struct iwl4965_rx_mem_buffer *rxb) 3660 struct iwl4965_rx_mem_buffer *rxb)
3661{ 3661{
3662#ifdef CONFIG_IWL4965_DEBUG 3662#ifdef CONFIG_IWLWIFI_DEBUG
3663 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data; 3663 struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
3664 struct iwl4965_scanreq_notification *notif = 3664 struct iwl4965_scanreq_notification *notif =
3665 (struct iwl4965_scanreq_notification *)pkt->u.raw; 3665 (struct iwl4965_scanreq_notification *)pkt->u.raw;
@@ -4510,13 +4510,13 @@ static int iwl4965_tx_queue_update_write_ptr(struct iwl4965_priv *priv,
4510 return rc; 4510 return rc;
4511} 4511}
4512 4512
4513#ifdef CONFIG_IWL4965_DEBUG 4513#ifdef CONFIG_IWLWIFI_DEBUG
4514static void iwl4965_print_rx_config_cmd(struct iwl4965_rxon_cmd *rxon) 4514static void iwl4965_print_rx_config_cmd(struct iwl4965_rxon_cmd *rxon)
4515{ 4515{
4516 DECLARE_MAC_BUF(mac); 4516 DECLARE_MAC_BUF(mac);
4517 4517
4518 IWL_DEBUG_RADIO("RX CONFIG:\n"); 4518 IWL_DEBUG_RADIO("RX CONFIG:\n");
4519 iwl4965_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 4519 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
4520 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 4520 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
4521 IWL_DEBUG_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags)); 4521 IWL_DEBUG_RADIO("u32 flags: 0x%08X\n", le32_to_cpu(rxon->flags));
4522 IWL_DEBUG_RADIO("u32 filter_flags: 0x%08x\n", 4522 IWL_DEBUG_RADIO("u32 filter_flags: 0x%08x\n",
@@ -4733,8 +4733,8 @@ static void iwl4965_irq_handle_error(struct iwl4965_priv *priv)
4733 /* Cancel currently queued command. */ 4733 /* Cancel currently queued command. */
4734 clear_bit(STATUS_HCMD_ACTIVE, &priv->status); 4734 clear_bit(STATUS_HCMD_ACTIVE, &priv->status);
4735 4735
4736#ifdef CONFIG_IWL4965_DEBUG 4736#ifdef CONFIG_IWLWIFI_DEBUG
4737 if (iwl4965_debug_level & IWL_DL_FW_ERRORS) { 4737 if (iwl_debug_level & IWL_DL_FW_ERRORS) {
4738 iwl4965_dump_nic_error_log(priv); 4738 iwl4965_dump_nic_error_log(priv);
4739 iwl4965_dump_nic_event_log(priv); 4739 iwl4965_dump_nic_event_log(priv);
4740 iwl4965_print_rx_config_cmd(&priv->staging_rxon); 4740 iwl4965_print_rx_config_cmd(&priv->staging_rxon);
@@ -4782,7 +4782,7 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
4782 u32 inta, handled = 0; 4782 u32 inta, handled = 0;
4783 u32 inta_fh; 4783 u32 inta_fh;
4784 unsigned long flags; 4784 unsigned long flags;
4785#ifdef CONFIG_IWL4965_DEBUG 4785#ifdef CONFIG_IWLWIFI_DEBUG
4786 u32 inta_mask; 4786 u32 inta_mask;
4787#endif 4787#endif
4788 4788
@@ -4800,8 +4800,8 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
4800 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS); 4800 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS);
4801 iwl4965_write32(priv, CSR_FH_INT_STATUS, inta_fh); 4801 iwl4965_write32(priv, CSR_FH_INT_STATUS, inta_fh);
4802 4802
4803#ifdef CONFIG_IWL4965_DEBUG 4803#ifdef CONFIG_IWLWIFI_DEBUG
4804 if (iwl4965_debug_level & IWL_DL_ISR) { 4804 if (iwl_debug_level & IWL_DL_ISR) {
4805 /* just for debug */ 4805 /* just for debug */
4806 inta_mask = iwl4965_read32(priv, CSR_INT_MASK); 4806 inta_mask = iwl4965_read32(priv, CSR_INT_MASK);
4807 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 4807 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
@@ -4834,8 +4834,8 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
4834 return; 4834 return;
4835 } 4835 }
4836 4836
4837#ifdef CONFIG_IWL4965_DEBUG 4837#ifdef CONFIG_IWLWIFI_DEBUG
4838 if (iwl4965_debug_level & (IWL_DL_ISR)) { 4838 if (iwl_debug_level & (IWL_DL_ISR)) {
4839 /* NIC fires this, but we don't use it, redundant with WAKEUP */ 4839 /* NIC fires this, but we don't use it, redundant with WAKEUP */
4840 if (inta & CSR_INT_BIT_SCD) 4840 if (inta & CSR_INT_BIT_SCD)
4841 IWL_DEBUG_ISR("Scheduler finished to transmit " 4841 IWL_DEBUG_ISR("Scheduler finished to transmit "
@@ -4925,8 +4925,8 @@ static void iwl4965_irq_tasklet(struct iwl4965_priv *priv)
4925 /* Re-enable all interrupts */ 4925 /* Re-enable all interrupts */
4926 iwl4965_enable_interrupts(priv); 4926 iwl4965_enable_interrupts(priv);
4927 4927
4928#ifdef CONFIG_IWL4965_DEBUG 4928#ifdef CONFIG_IWLWIFI_DEBUG
4929 if (iwl4965_debug_level & (IWL_DL_ISR)) { 4929 if (iwl_debug_level & (IWL_DL_ISR)) {
4930 inta = iwl4965_read32(priv, CSR_INT); 4930 inta = iwl4965_read32(priv, CSR_INT);
4931 inta_mask = iwl4965_read32(priv, CSR_INT_MASK); 4931 inta_mask = iwl4965_read32(priv, CSR_INT_MASK);
4932 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS); 4932 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS);
@@ -7916,7 +7916,7 @@ static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw,
7916 * 7916 *
7917 *****************************************************************************/ 7917 *****************************************************************************/
7918 7918
7919#ifdef CONFIG_IWL4965_DEBUG 7919#ifdef CONFIG_IWLWIFI_DEBUG
7920 7920
7921/* 7921/*
7922 * The following adds a new attribute to the sysfs representation 7922 * The following adds a new attribute to the sysfs representation
@@ -7928,7 +7928,7 @@ static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw,
7928 7928
7929static ssize_t show_debug_level(struct device_driver *d, char *buf) 7929static ssize_t show_debug_level(struct device_driver *d, char *buf)
7930{ 7930{
7931 return sprintf(buf, "0x%08X\n", iwl4965_debug_level); 7931 return sprintf(buf, "0x%08X\n", iwl_debug_level);
7932} 7932}
7933static ssize_t store_debug_level(struct device_driver *d, 7933static ssize_t store_debug_level(struct device_driver *d,
7934 const char *buf, size_t count) 7934 const char *buf, size_t count)
@@ -7941,7 +7941,7 @@ static ssize_t store_debug_level(struct device_driver *d,
7941 printk(KERN_INFO DRV_NAME 7941 printk(KERN_INFO DRV_NAME
7942 ": %s is not in hex or decimal form.\n", buf); 7942 ": %s is not in hex or decimal form.\n", buf);
7943 else 7943 else
7944 iwl4965_debug_level = val; 7944 iwl_debug_level = val;
7945 7945
7946 return strnlen(buf, count); 7946 return strnlen(buf, count);
7947} 7947}
@@ -7949,7 +7949,7 @@ static ssize_t store_debug_level(struct device_driver *d,
7949static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, 7949static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
7950 show_debug_level, store_debug_level); 7950 show_debug_level, store_debug_level);
7951 7951
7952#endif /* CONFIG_IWL4965_DEBUG */ 7952#endif /* CONFIG_IWLWIFI_DEBUG */
7953 7953
7954static ssize_t show_rf_kill(struct device *d, 7954static ssize_t show_rf_kill(struct device *d,
7955 struct device_attribute *attr, char *buf) 7955 struct device_attribute *attr, char *buf)
@@ -8548,8 +8548,8 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8548 8548
8549 priv->pci_dev = pdev; 8549 priv->pci_dev = pdev;
8550 priv->antenna = (enum iwl4965_antenna)iwl4965_param_antenna; 8550 priv->antenna = (enum iwl4965_antenna)iwl4965_param_antenna;
8551#ifdef CONFIG_IWL4965_DEBUG 8551#ifdef CONFIG_IWLWIFI_DEBUG
8552 iwl4965_debug_level = iwl4965_param_debug; 8552 iwl_debug_level = iwl4965_param_debug;
8553 atomic_set(&priv->restrict_refcnt, 0); 8553 atomic_set(&priv->restrict_refcnt, 0);
8554#endif 8554#endif
8555 priv->retry_rate = 1; 8555 priv->retry_rate = 1;
@@ -8878,7 +8878,7 @@ static int __init iwl4965_init(void)
8878 IWL_ERROR("Unable to initialize PCI module\n"); 8878 IWL_ERROR("Unable to initialize PCI module\n");
8879 return ret; 8879 return ret;
8880 } 8880 }
8881#ifdef CONFIG_IWL4965_DEBUG 8881#ifdef CONFIG_IWLWIFI_DEBUG
8882 ret = driver_create_file(&iwl4965_driver.driver, &driver_attr_debug_level); 8882 ret = driver_create_file(&iwl4965_driver.driver, &driver_attr_debug_level);
8883 if (ret) { 8883 if (ret) {
8884 IWL_ERROR("Unable to create driver sysfs file\n"); 8884 IWL_ERROR("Unable to create driver sysfs file\n");
@@ -8892,7 +8892,7 @@ static int __init iwl4965_init(void)
8892 8892
8893static void __exit iwl4965_exit(void) 8893static void __exit iwl4965_exit(void)
8894{ 8894{
8895#ifdef CONFIG_IWL4965_DEBUG 8895#ifdef CONFIG_IWLWIFI_DEBUG
8896 driver_remove_file(&iwl4965_driver.driver, &driver_attr_debug_level); 8896 driver_remove_file(&iwl4965_driver.driver, &driver_attr_debug_level);
8897#endif 8897#endif
8898 pci_unregister_driver(&iwl4965_driver); 8898 pci_unregister_driver(&iwl4965_driver);