aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-io.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-10-02 16:44:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:44 -0400
commitbe1a71a128ed91372d4ad8d54d8fd972a1a356eb (patch)
tree9c8ac5551069c0d4352d6cc06e7194acce3aca9d /drivers/net/wireless/iwlwifi/iwl-io.h
parent4d80d7210bb5a36a18978d1305b44375ecb857d9 (diff)
iwlwifi: device tracing
In order to have an easier way to debug issues, create trace events (using the ftrace framework) that will allow us to follow exactly what the driver is doing with the device. The text format isn't all that useful, but the binary format can also be obtained easily via debugfs and then analysed on the fly or offline with debugging tools. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-io.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index d30cb0275d19..0a078b082833 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -32,6 +32,7 @@
32#include <linux/io.h> 32#include <linux/io.h>
33 33
34#include "iwl-debug.h" 34#include "iwl-debug.h"
35#include "iwl-devtrace.h"
35 36
36/* 37/*
37 * IO, register, and NIC memory access functions 38 * IO, register, and NIC memory access functions
@@ -61,7 +62,12 @@
61 * 62 *
62 */ 63 */
63 64
64#define _iwl_write32(priv, ofs, val) iowrite32((val), (priv)->hw_base + (ofs)) 65static inline void _iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val)
66{
67 trace_iwlwifi_dev_iowrite32(priv, ofs, val);
68 iowrite32(val, priv->hw_base + ofs);
69}
70
65#ifdef CONFIG_IWLWIFI_DEBUG 71#ifdef CONFIG_IWLWIFI_DEBUG
66static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *priv, 72static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *priv,
67 u32 ofs, u32 val) 73 u32 ofs, u32 val)
@@ -75,7 +81,13 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *priv,
75#define iwl_write32(priv, ofs, val) _iwl_write32(priv, ofs, val) 81#define iwl_write32(priv, ofs, val) _iwl_write32(priv, ofs, val)
76#endif 82#endif
77 83
78#define _iwl_read32(priv, ofs) ioread32((priv)->hw_base + (ofs)) 84static inline u32 _iwl_read32(struct iwl_priv *priv, u32 ofs)
85{
86 u32 val = ioread32(priv->hw_base + ofs);
87 trace_iwlwifi_dev_ioread32(priv, ofs, val);
88 return val;
89}
90
79#ifdef CONFIG_IWLWIFI_DEBUG 91#ifdef CONFIG_IWLWIFI_DEBUG
80static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs) 92static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs)
81{ 93{