aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debug.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debug.h172
1 files changed, 91 insertions, 81 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index 56c13b458de7..7192d3249caf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -1,6 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Copyright(c) 2003 - 2008 Intel Corporation. All rights reserved. 3 * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions of this file are derived from the ipw3945 project. 5 * Portions of this file are derived from the ipw3945 project.
6 * 6 *
@@ -29,16 +29,27 @@
29#ifndef __iwl_debug_h__ 29#ifndef __iwl_debug_h__
30#define __iwl_debug_h__ 30#define __iwl_debug_h__
31 31
32struct iwl_priv;
33
34#define IWL_ERR(p, f, a...) dev_err(&((p)->pci_dev->dev), f, ## a)
35#define IWL_WARN(p, f, a...) dev_warn(&((p)->pci_dev->dev), f, ## a)
36#define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a)
37#define IWL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a)
38
32#ifdef CONFIG_IWLWIFI_DEBUG 39#ifdef CONFIG_IWLWIFI_DEBUG
33#define IWL_DEBUG(level, fmt, args...) \ 40#define IWL_DEBUG(level, fmt, args...) \
34do { if (priv->debug_level & (level)) \ 41do { \
35 dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ 42 if (priv->debug_level & (level)) \
36 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) 43 dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
44 in_interrupt() ? 'I' : 'U', __func__ , ## args); \
45} while (0)
37 46
38#define IWL_DEBUG_LIMIT(level, fmt, args...) \ 47#define IWL_DEBUG_LIMIT(level, fmt, args...) \
39do { if ((priv->debug_level & (level)) && net_ratelimit()) \ 48do { \
40 dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ 49 if ((priv->debug_level & (level)) && net_ratelimit()) \
41 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) 50 dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
51 in_interrupt() ? 'I' : 'U', __func__ , ## args); \
52} while (0)
42 53
43#define iwl_print_hex_dump(priv, level, p, len) \ 54#define iwl_print_hex_dump(priv, level, p, len) \
44do { \ 55do { \
@@ -61,6 +72,7 @@ struct iwl_debugfs {
61 struct dentry *file_tx_statistics; 72 struct dentry *file_tx_statistics;
62 struct dentry *file_log_event; 73 struct dentry *file_log_event;
63 struct dentry *file_channels; 74 struct dentry *file_channels;
75 struct dentry *file_status;
64 } dbgfs_data_files; 76 } dbgfs_data_files;
65 struct dir_rf_files { 77 struct dir_rf_files {
66 struct dentry *file_disable_sensitivity; 78 struct dentry *file_disable_sensitivity;
@@ -117,84 +129,82 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv)
117 * when CONFIG_IWLWIFI_DEBUG=y. 129 * when CONFIG_IWLWIFI_DEBUG=y.
118 */ 130 */
119 131
132/* 0x0000000F - 0x00000001 */
120#define IWL_DL_INFO (1 << 0) 133#define IWL_DL_INFO (1 << 0)
121#define IWL_DL_MAC80211 (1 << 1) 134#define IWL_DL_MAC80211 (1 << 1)
122#define IWL_DL_HCMD (1 << 2) 135#define IWL_DL_HCMD (1 << 2)
123#define IWL_DL_STATE (1 << 3) 136#define IWL_DL_STATE (1 << 3)
137/* 0x000000F0 - 0x00000010 */
124#define IWL_DL_MACDUMP (1 << 4) 138#define IWL_DL_MACDUMP (1 << 4)
125#define IWL_DL_HCMD_DUMP (1 << 5) 139#define IWL_DL_HCMD_DUMP (1 << 5)
126#define IWL_DL_RADIO (1 << 7) 140#define IWL_DL_RADIO (1 << 7)
127#define IWL_DL_POWER (1 << 8) 141/* 0x00000F00 - 0x00000100 */
128#define IWL_DL_TEMP (1 << 9) 142#define IWL_DL_POWER (1 << 8)
129 143#define IWL_DL_TEMP (1 << 9)
130#define IWL_DL_NOTIF (1 << 10) 144#define IWL_DL_NOTIF (1 << 10)
131#define IWL_DL_SCAN (1 << 11) 145#define IWL_DL_SCAN (1 << 11)
132#define IWL_DL_ASSOC (1 << 12) 146/* 0x0000F000 - 0x00001000 */
133#define IWL_DL_DROP (1 << 13) 147#define IWL_DL_ASSOC (1 << 12)
134 148#define IWL_DL_DROP (1 << 13)
135#define IWL_DL_TXPOWER (1 << 14) 149#define IWL_DL_TXPOWER (1 << 14)
136 150#define IWL_DL_AP (1 << 15)
137#define IWL_DL_AP (1 << 15) 151/* 0x000F0000 - 0x00010000 */
138 152#define IWL_DL_FW (1 << 16)
139#define IWL_DL_FW (1 << 16) 153#define IWL_DL_RF_KILL (1 << 17)
140#define IWL_DL_RF_KILL (1 << 17) 154#define IWL_DL_FW_ERRORS (1 << 18)
141#define IWL_DL_FW_ERRORS (1 << 18) 155#define IWL_DL_LED (1 << 19)
142 156/* 0x00F00000 - 0x00100000 */
143#define IWL_DL_LED (1 << 19) 157#define IWL_DL_RATE (1 << 20)
144 158#define IWL_DL_CALIB (1 << 21)
145#define IWL_DL_RATE (1 << 20) 159#define IWL_DL_WEP (1 << 22)
146 160#define IWL_DL_TX (1 << 23)
147#define IWL_DL_CALIB (1 << 21) 161/* 0x0F000000 - 0x01000000 */
148#define IWL_DL_WEP (1 << 22) 162#define IWL_DL_RX (1 << 24)
149#define IWL_DL_TX (1 << 23) 163#define IWL_DL_ISR (1 << 25)
150#define IWL_DL_RX (1 << 24) 164#define IWL_DL_HT (1 << 26)
151#define IWL_DL_ISR (1 << 25) 165#define IWL_DL_IO (1 << 27)
152#define IWL_DL_HT (1 << 26) 166/* 0xF0000000 - 0x10000000 */
153#define IWL_DL_IO (1 << 27) 167#define IWL_DL_11H (1 << 28)
154#define IWL_DL_11H (1 << 28) 168#define IWL_DL_STATS (1 << 29)
155 169#define IWL_DL_TX_REPLY (1 << 30)
156#define IWL_DL_STATS (1 << 29) 170#define IWL_DL_QOS (1 << 31)
157#define IWL_DL_TX_REPLY (1 << 30) 171
158#define IWL_DL_QOS (1 << 31) 172#define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a)
159 173#define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a)
160#define IWL_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a) 174#define IWL_DEBUG_MACDUMP(f, a...) IWL_DEBUG(IWL_DL_MACDUMP, f, ## a)
161#define IWL_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a) 175#define IWL_DEBUG_TEMP(f, a...) IWL_DEBUG(IWL_DL_TEMP, f, ## a)
162#define IWL_DEBUG_INFO(f, a...) IWL_DEBUG(IWL_DL_INFO, f, ## a) 176#define IWL_DEBUG_SCAN(f, a...) IWL_DEBUG(IWL_DL_SCAN, f, ## a)
163 177#define IWL_DEBUG_RX(f, a...) IWL_DEBUG(IWL_DL_RX, f, ## a)
164#define IWL_DEBUG_MAC80211(f, a...) IWL_DEBUG(IWL_DL_MAC80211, f, ## a) 178#define IWL_DEBUG_TX(f, a...) IWL_DEBUG(IWL_DL_TX, f, ## a)
165#define IWL_DEBUG_MACDUMP(f, a...) IWL_DEBUG(IWL_DL_MACDUMP, f, ## a) 179#define IWL_DEBUG_ISR(f, a...) IWL_DEBUG(IWL_DL_ISR, f, ## a)
166#define IWL_DEBUG_TEMP(f, a...) IWL_DEBUG(IWL_DL_TEMP, f, ## a) 180#define IWL_DEBUG_LED(f, a...) IWL_DEBUG(IWL_DL_LED, f, ## a)
167#define IWL_DEBUG_SCAN(f, a...) IWL_DEBUG(IWL_DL_SCAN, f, ## a) 181#define IWL_DEBUG_WEP(f, a...) IWL_DEBUG(IWL_DL_WEP, f, ## a)
168#define IWL_DEBUG_RX(f, a...) IWL_DEBUG(IWL_DL_RX, f, ## a) 182#define IWL_DEBUG_HC(f, a...) IWL_DEBUG(IWL_DL_HCMD, f, ## a)
169#define IWL_DEBUG_TX(f, a...) IWL_DEBUG(IWL_DL_TX, f, ## a) 183#define IWL_DEBUG_HC_DUMP(f, a...) IWL_DEBUG(IWL_DL_HCMD_DUMP, f, ## a)
170#define IWL_DEBUG_ISR(f, a...) IWL_DEBUG(IWL_DL_ISR, f, ## a) 184#define IWL_DEBUG_CALIB(f, a...) IWL_DEBUG(IWL_DL_CALIB, f, ## a)
171#define IWL_DEBUG_LED(f, a...) IWL_DEBUG(IWL_DL_LED, f, ## a) 185#define IWL_DEBUG_FW(f, a...) IWL_DEBUG(IWL_DL_FW, f, ## a)
172#define IWL_DEBUG_WEP(f, a...) IWL_DEBUG(IWL_DL_WEP, f, ## a) 186#define IWL_DEBUG_RF_KILL(f, a...) IWL_DEBUG(IWL_DL_RF_KILL, f, ## a)
173#define IWL_DEBUG_HC(f, a...) IWL_DEBUG(IWL_DL_HCMD, f, ## a) 187#define IWL_DEBUG_DROP(f, a...) IWL_DEBUG(IWL_DL_DROP, f, ## a)
174#define IWL_DEBUG_HC_DUMP(f, a...) IWL_DEBUG(IWL_DL_HCMD_DUMP, f, ## a) 188#define IWL_DEBUG_DROP_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_DROP, f, ## a)
175#define IWL_DEBUG_CALIB(f, a...) IWL_DEBUG(IWL_DL_CALIB, f, ## a) 189#define IWL_DEBUG_AP(f, a...) IWL_DEBUG(IWL_DL_AP, f, ## a)
176#define IWL_DEBUG_FW(f, a...) IWL_DEBUG(IWL_DL_FW, f, ## a) 190#define IWL_DEBUG_TXPOWER(f, a...) IWL_DEBUG(IWL_DL_TXPOWER, f, ## a)
177#define IWL_DEBUG_RF_KILL(f, a...) IWL_DEBUG(IWL_DL_RF_KILL, f, ## a) 191#define IWL_DEBUG_IO(f, a...) IWL_DEBUG(IWL_DL_IO, f, ## a)
178#define IWL_DEBUG_DROP(f, a...) IWL_DEBUG(IWL_DL_DROP, f, ## a) 192#define IWL_DEBUG_RATE(f, a...) IWL_DEBUG(IWL_DL_RATE, f, ## a)
179#define IWL_DEBUG_DROP_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_DROP, f, ## a) 193#define IWL_DEBUG_RATE_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_RATE, f, ## a)
180#define IWL_DEBUG_AP(f, a...) IWL_DEBUG(IWL_DL_AP, f, ## a) 194#define IWL_DEBUG_NOTIF(f, a...) IWL_DEBUG(IWL_DL_NOTIF, f, ## a)
181#define IWL_DEBUG_TXPOWER(f, a...) IWL_DEBUG(IWL_DL_TXPOWER, f, ## a) 195#define IWL_DEBUG_ASSOC(f, a...) \
182#define IWL_DEBUG_IO(f, a...) IWL_DEBUG(IWL_DL_IO, f, ## a) 196 IWL_DEBUG(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a)
183#define IWL_DEBUG_RATE(f, a...) IWL_DEBUG(IWL_DL_RATE, f, ## a) 197#define IWL_DEBUG_ASSOC_LIMIT(f, a...) \
184#define IWL_DEBUG_RATE_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_RATE, f, ## a) 198 IWL_DEBUG_LIMIT(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a)
185#define IWL_DEBUG_NOTIF(f, a...) IWL_DEBUG(IWL_DL_NOTIF, f, ## a) 199#define IWL_DEBUG_HT(f, a...) IWL_DEBUG(IWL_DL_HT, f, ## a)
186#define IWL_DEBUG_ASSOC(f, a...) IWL_DEBUG(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a) 200#define IWL_DEBUG_STATS(f, a...) IWL_DEBUG(IWL_DL_STATS, f, ## a)
187#define IWL_DEBUG_ASSOC_LIMIT(f, a...) \ 201#define IWL_DEBUG_STATS_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_STATS, f, ## a)
188 IWL_DEBUG_LIMIT(IWL_DL_ASSOC | IWL_DL_INFO, f, ## a) 202#define IWL_DEBUG_TX_REPLY(f, a...) IWL_DEBUG(IWL_DL_TX_REPLY, f, ## a)
189#define IWL_DEBUG_HT(f, a...) IWL_DEBUG(IWL_DL_HT, f, ## a)
190#define IWL_DEBUG_STATS(f, a...) IWL_DEBUG(IWL_DL_STATS, f, ## a)
191#define IWL_DEBUG_STATS_LIMIT(f, a...) IWL_DEBUG_LIMIT(IWL_DL_STATS, f, ## a)
192#define IWL_DEBUG_TX_REPLY(f, a...) IWL_DEBUG(IWL_DL_TX_REPLY, f, ## a)
193#define IWL_DEBUG_TX_REPLY_LIMIT(f, a...) \ 203#define IWL_DEBUG_TX_REPLY_LIMIT(f, a...) \
194 IWL_DEBUG_LIMIT(IWL_DL_TX_REPLY, f, ## a) 204 IWL_DEBUG_LIMIT(IWL_DL_TX_REPLY, f, ## a)
195#define IWL_DEBUG_QOS(f, a...) IWL_DEBUG(IWL_DL_QOS, f, ## a) 205#define IWL_DEBUG_QOS(f, a...) IWL_DEBUG(IWL_DL_QOS, f, ## a)
196#define IWL_DEBUG_RADIO(f, a...) IWL_DEBUG(IWL_DL_RADIO, f, ## a) 206#define IWL_DEBUG_RADIO(f, a...) IWL_DEBUG(IWL_DL_RADIO, f, ## a)
197#define IWL_DEBUG_POWER(f, a...) IWL_DEBUG(IWL_DL_POWER, f, ## a) 207#define IWL_DEBUG_POWER(f, a...) IWL_DEBUG(IWL_DL_POWER, f, ## a)
198#define IWL_DEBUG_11H(f, a...) IWL_DEBUG(IWL_DL_11H, f, ## a) 208#define IWL_DEBUG_11H(f, a...) IWL_DEBUG(IWL_DL_11H, f, ## a)
199 209
200#endif 210#endif