brcmfmac: (clean) Rename files dhd_dbg to debug
authorHante Meuleman <meuleman@broadcom.com>
Tue, 28 Oct 2014 13:56:13 +0000 (14:56 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 30 Oct 2014 19:26:44 +0000 (15:26 -0400)
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
27 files changed:
drivers/net/wireless/brcm80211/brcmfmac/Makefile
drivers/net/wireless/brcm80211/brcmfmac/bcdc.c
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/brcm80211/brcmfmac/btcoex.c
drivers/net/wireless/brcm80211/brcmfmac/chip.c
drivers/net/wireless/brcm80211/brcmfmac/debug.c [new file with mode: 0644]
drivers/net/wireless/brcm80211/brcmfmac/debug.h [new file with mode: 0644]
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c [deleted file]
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h [deleted file]
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/feature.c
drivers/net/wireless/brcm80211/brcmfmac/firmware.c
drivers/net/wireless/brcm80211/brcmfmac/flowring.c
drivers/net/wireless/brcm80211/brcmfmac/fweh.c
drivers/net/wireless/brcm80211/brcmfmac/fwil.c
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c
drivers/net/wireless/brcm80211/brcmfmac/of.c
drivers/net/wireless/brcm80211/brcmfmac/p2p.c
drivers/net/wireless/brcm80211/brcmfmac/pcie.c
drivers/net/wireless/brcm80211/brcmfmac/proto.c
drivers/net/wireless/brcm80211/brcmfmac/usb.c
drivers/net/wireless/brcm80211/brcmfmac/vendor.c
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index 90a977fe9a648d0f34eda15bbcba305eac6d35c0..1da9042c8aba0fb7b902cebc97972d74f7e8040d 100644 (file)
@@ -50,7 +50,7 @@ brcmfmac-$(CONFIG_BRCMFMAC_USB) += \
 brcmfmac-$(CONFIG_BRCMFMAC_PCIE) += \
                pcie.o
 brcmfmac-$(CONFIG_BRCMDBG) += \
-               dhd_dbg.o
+               debug.o
 brcmfmac-$(CONFIG_BRCM_TRACING) += \
                tracepoint.o
 brcmfmac-$(CONFIG_OF) += \
index a159ff3427de9fa7c3e42c508bc6a0c8930e5cdb..11d3dfae8bac975c602a4c7cadd6737da3660650 100644 (file)
@@ -28,7 +28,7 @@
 #include "dhd.h"
 #include "dhd_bus.h"
 #include "fwsignal.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "tracepoint.h"
 #include "proto.h"
 #include "bcdc.h"
index 79b2c7e3f7e71d39f74c5b8f74035552ee88c7ad..8c0dfea68eebc7423b50279a45fcae9c1a227229 100644 (file)
@@ -42,7 +42,7 @@
 #include <soc.h>
 #include "chip.h"
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "sdio_host.h"
 #include "of.h"
 
index a29ac4977b3a12e009f2947c09bd40d3b604ccde..a2f7e2ccfc846270dc1f070f2e955c925f7ed6f5 100644 (file)
@@ -21,7 +21,7 @@
 #include <brcmu_utils.h>
 #include <defs.h>
 #include <dhd.h>
-#include <dhd_dbg.h>
+#include "debug.h"
 #include "fwil.h"
 #include "fwil_types.h"
 #include "btcoex.h"
index 95efde868db82e6b36e0c954fe4d0ad2cd797721..ddae0b5e56eced02eed599d41decd62ab7b2e273 100644 (file)
@@ -25,7 +25,7 @@
 #include <brcm_hw_ids.h>
 #include <brcmu_utils.h>
 #include <chipcommon.h>
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "chip.h"
 
 /* SOC Interconnect types (aka chip types) */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/debug.c b/drivers/net/wireless/brcm80211/brcmfmac/debug.c
new file mode 100644 (file)
index 0000000..27e5108
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2012 Broadcom Corporation
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+#include <linux/debugfs.h>
+#include <linux/netdevice.h>
+#include <linux/module.h>
+
+#include <brcmu_wifi.h>
+#include <brcmu_utils.h>
+#include "dhd.h"
+#include "dhd_bus.h"
+#include "debug.h"
+
+static struct dentry *root_folder;
+
+void brcmf_debugfs_init(void)
+{
+       root_folder = debugfs_create_dir(KBUILD_MODNAME, NULL);
+       if (IS_ERR(root_folder))
+               root_folder = NULL;
+}
+
+void brcmf_debugfs_exit(void)
+{
+       if (!root_folder)
+               return;
+
+       debugfs_remove_recursive(root_folder);
+       root_folder = NULL;
+}
+
+static int brcmf_debugfs_chipinfo_read(struct seq_file *seq, void *data)
+{
+       struct brcmf_bus *bus = dev_get_drvdata(seq->private);
+
+       seq_printf(seq, "chip: %x(%u) rev %u\n",
+                  bus->chip, bus->chip, bus->chiprev);
+       return 0;
+}
+
+int brcmf_debugfs_attach(struct brcmf_pub *drvr)
+{
+       struct device *dev = drvr->bus_if->dev;
+
+       if (!root_folder)
+               return -ENODEV;
+
+       drvr->dbgfs_dir = debugfs_create_dir(dev_name(dev), root_folder);
+       brcmf_debugfs_add_entry(drvr, "chipinfo", brcmf_debugfs_chipinfo_read);
+
+       return PTR_ERR_OR_ZERO(drvr->dbgfs_dir);
+}
+
+void brcmf_debugfs_detach(struct brcmf_pub *drvr)
+{
+       if (!IS_ERR_OR_NULL(drvr->dbgfs_dir))
+               debugfs_remove_recursive(drvr->dbgfs_dir);
+}
+
+struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr)
+{
+       return drvr->dbgfs_dir;
+}
+
+struct brcmf_debugfs_entry {
+       int (*read)(struct seq_file *seq, void *data);
+       struct brcmf_pub *drvr;
+};
+
+static int brcmf_debugfs_entry_open(struct inode *inode, struct file *f)
+{
+       struct brcmf_debugfs_entry *entry = inode->i_private;
+
+       return single_open(f, entry->read, entry->drvr->bus_if->dev);
+}
+
+static const struct file_operations brcmf_debugfs_def_ops = {
+       .owner = THIS_MODULE,
+       .open = brcmf_debugfs_entry_open,
+       .release = single_release,
+       .read = seq_read,
+       .llseek = seq_lseek
+};
+
+int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
+                           int (*read_fn)(struct seq_file *seq, void *data))
+{
+       struct dentry *dentry =  drvr->dbgfs_dir;
+       struct brcmf_debugfs_entry *entry;
+
+       if (IS_ERR_OR_NULL(dentry))
+               return -ENOENT;
+
+       entry = devm_kzalloc(drvr->bus_if->dev, sizeof(*entry), GFP_KERNEL);
+       if (!entry)
+               return -ENOMEM;
+
+       entry->read = read_fn;
+       entry->drvr = drvr;
+
+       dentry = debugfs_create_file(fn, S_IRUGO, dentry, entry,
+                                    &brcmf_debugfs_def_ops);
+
+       return PTR_ERR_OR_ZERO(dentry);
+}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/debug.h b/drivers/net/wireless/brcm80211/brcmfmac/debug.h
new file mode 100644 (file)
index 0000000..eb0b8c4
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2010 Broadcom Corporation
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef BRCMFMAC_DEBUG_H
+#define BRCMFMAC_DEBUG_H
+
+/* message levels */
+#define BRCMF_TRACE_VAL                0x00000002
+#define BRCMF_INFO_VAL         0x00000004
+#define BRCMF_DATA_VAL         0x00000008
+#define BRCMF_CTL_VAL          0x00000010
+#define BRCMF_TIMER_VAL                0x00000020
+#define BRCMF_HDRS_VAL         0x00000040
+#define BRCMF_BYTES_VAL                0x00000080
+#define BRCMF_INTR_VAL         0x00000100
+#define BRCMF_GLOM_VAL         0x00000200
+#define BRCMF_EVENT_VAL                0x00000400
+#define BRCMF_BTA_VAL          0x00000800
+#define BRCMF_FIL_VAL          0x00001000
+#define BRCMF_USB_VAL          0x00002000
+#define BRCMF_SCAN_VAL         0x00004000
+#define BRCMF_CONN_VAL         0x00008000
+#define BRCMF_BCDC_VAL         0x00010000
+#define BRCMF_SDIO_VAL         0x00020000
+#define BRCMF_MSGBUF_VAL       0x00040000
+#define BRCMF_PCIE_VAL         0x00080000
+
+/* set default print format */
+#undef pr_fmt
+#define pr_fmt(fmt)            KBUILD_MODNAME ": " fmt
+
+/* Macro for error messages. net_ratelimit() is used when driver
+ * debugging is not selected. When debugging the driver error
+ * messages are as important as other tracing or even more so.
+ */
+#ifndef CONFIG_BRCM_TRACING
+#ifdef CONFIG_BRCMDBG
+#define brcmf_err(fmt, ...)    pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
+#else
+#define brcmf_err(fmt, ...)                                            \
+       do {                                                            \
+               if (net_ratelimit())                                    \
+                       pr_err("%s: " fmt, __func__, ##__VA_ARGS__);    \
+       } while (0)
+#endif
+#else
+__printf(2, 3)
+void __brcmf_err(const char *func, const char *fmt, ...);
+#define brcmf_err(fmt, ...) \
+       __brcmf_err(__func__, fmt, ##__VA_ARGS__)
+#endif
+
+#if defined(DEBUG) || defined(CONFIG_BRCM_TRACING)
+__printf(3, 4)
+void __brcmf_dbg(u32 level, const char *func, const char *fmt, ...);
+#define brcmf_dbg(level, fmt, ...)                             \
+do {                                                           \
+       __brcmf_dbg(BRCMF_##level##_VAL, __func__,              \
+                   fmt, ##__VA_ARGS__);                        \
+} while (0)
+#define BRCMF_DATA_ON()                (brcmf_msg_level & BRCMF_DATA_VAL)
+#define BRCMF_CTL_ON()         (brcmf_msg_level & BRCMF_CTL_VAL)
+#define BRCMF_HDRS_ON()                (brcmf_msg_level & BRCMF_HDRS_VAL)
+#define BRCMF_BYTES_ON()       (brcmf_msg_level & BRCMF_BYTES_VAL)
+#define BRCMF_GLOM_ON()                (brcmf_msg_level & BRCMF_GLOM_VAL)
+#define BRCMF_EVENT_ON()       (brcmf_msg_level & BRCMF_EVENT_VAL)
+#define BRCMF_FIL_ON()         (brcmf_msg_level & BRCMF_FIL_VAL)
+
+#else /* defined(DEBUG) || defined(CONFIG_BRCM_TRACING) */
+
+#define brcmf_dbg(level, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
+
+#define BRCMF_DATA_ON()                0
+#define BRCMF_CTL_ON()         0
+#define BRCMF_HDRS_ON()                0
+#define BRCMF_BYTES_ON()       0
+#define BRCMF_GLOM_ON()                0
+#define BRCMF_EVENT_ON()       0
+#define BRCMF_FIL_ON()         0
+
+#endif /* defined(DEBUG) || defined(CONFIG_BRCM_TRACING) */
+
+#define brcmf_dbg_hex_dump(test, data, len, fmt, ...)                  \
+do {                                                                   \
+       trace_brcmf_hexdump((void *)data, len);                         \
+       if (test)                                                       \
+               brcmu_dbg_hex_dump(data, len, fmt, ##__VA_ARGS__);      \
+} while (0)
+
+extern int brcmf_msg_level;
+
+struct brcmf_pub;
+#ifdef DEBUG
+void brcmf_debugfs_init(void);
+void brcmf_debugfs_exit(void);
+int brcmf_debugfs_attach(struct brcmf_pub *drvr);
+void brcmf_debugfs_detach(struct brcmf_pub *drvr);
+struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr);
+int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
+                           int (*read_fn)(struct seq_file *seq, void *data));
+#else
+static inline void brcmf_debugfs_init(void)
+{
+}
+static inline void brcmf_debugfs_exit(void)
+{
+}
+static inline int brcmf_debugfs_attach(struct brcmf_pub *drvr)
+{
+       return 0;
+}
+static inline void brcmf_debugfs_detach(struct brcmf_pub *drvr)
+{
+}
+static inline
+int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
+                           int (*read_fn)(struct seq_file *seq, void *data))
+{
+       return 0;
+}
+#endif
+
+#endif /* BRCMFMAC_DEBUG_H */
index 80e73a1262be81b6d143f4a8967e960def536fa7..0421cfea9a257f188da9f7cf6b3e583dc58714ef 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _BRCMF_BUS_H_
 #define _BRCMF_BUS_H_
 
-#include "dhd_dbg.h"
+#include "debug.h"
 
 /* IDs of the 6 default common rings of msgbuf protocol */
 #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT       0
index 98bc2226a119a335028c235d7061a6dfde0d549e..78ada880506f567c7bc970f632edd946ebcc7d11 100644 (file)
@@ -21,7 +21,7 @@
 #include <brcmu_utils.h>
 #include "dhd.h"
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "fwil.h"
 #include "fwil_types.h"
 #include "tracepoint.h"
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c
deleted file mode 100644 (file)
index be9f4f8..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2012 Broadcom Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-#include <linux/debugfs.h>
-#include <linux/netdevice.h>
-#include <linux/module.h>
-
-#include <brcmu_wifi.h>
-#include <brcmu_utils.h>
-#include "dhd.h"
-#include "dhd_bus.h"
-#include "dhd_dbg.h"
-
-static struct dentry *root_folder;
-
-void brcmf_debugfs_init(void)
-{
-       root_folder = debugfs_create_dir(KBUILD_MODNAME, NULL);
-       if (IS_ERR(root_folder))
-               root_folder = NULL;
-}
-
-void brcmf_debugfs_exit(void)
-{
-       if (!root_folder)
-               return;
-
-       debugfs_remove_recursive(root_folder);
-       root_folder = NULL;
-}
-
-static int brcmf_debugfs_chipinfo_read(struct seq_file *seq, void *data)
-{
-       struct brcmf_bus *bus = dev_get_drvdata(seq->private);
-
-       seq_printf(seq, "chip: %x(%u) rev %u\n",
-                  bus->chip, bus->chip, bus->chiprev);
-       return 0;
-}
-
-int brcmf_debugfs_attach(struct brcmf_pub *drvr)
-{
-       struct device *dev = drvr->bus_if->dev;
-
-       if (!root_folder)
-               return -ENODEV;
-
-       drvr->dbgfs_dir = debugfs_create_dir(dev_name(dev), root_folder);
-       brcmf_debugfs_add_entry(drvr, "chipinfo", brcmf_debugfs_chipinfo_read);
-
-       return PTR_ERR_OR_ZERO(drvr->dbgfs_dir);
-}
-
-void brcmf_debugfs_detach(struct brcmf_pub *drvr)
-{
-       if (!IS_ERR_OR_NULL(drvr->dbgfs_dir))
-               debugfs_remove_recursive(drvr->dbgfs_dir);
-}
-
-struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr)
-{
-       return drvr->dbgfs_dir;
-}
-
-struct brcmf_debugfs_entry {
-       int (*read)(struct seq_file *seq, void *data);
-       struct brcmf_pub *drvr;
-};
-
-static int brcmf_debugfs_entry_open(struct inode *inode, struct file *f)
-{
-       struct brcmf_debugfs_entry *entry = inode->i_private;
-
-       return single_open(f, entry->read, entry->drvr->bus_if->dev);
-}
-
-static const struct file_operations brcmf_debugfs_def_ops = {
-       .owner = THIS_MODULE,
-       .open = brcmf_debugfs_entry_open,
-       .release = single_release,
-       .read = seq_read,
-       .llseek = seq_lseek
-};
-
-int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
-                           int (*read_fn)(struct seq_file *seq, void *data))
-{
-       struct dentry *dentry =  drvr->dbgfs_dir;
-       struct brcmf_debugfs_entry *entry;
-
-       if (IS_ERR_OR_NULL(dentry))
-               return -ENOENT;
-
-       entry = devm_kzalloc(drvr->bus_if->dev, sizeof(*entry), GFP_KERNEL);
-       if (!entry)
-               return -ENOMEM;
-
-       entry->read = read_fn;
-       entry->drvr = drvr;
-
-       dentry = debugfs_create_file(fn, S_IRUGO, dentry, entry,
-                                    &brcmf_debugfs_def_ops);
-
-       return PTR_ERR_OR_ZERO(dentry);
-}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h
deleted file mode 100644 (file)
index dec40d3..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2010 Broadcom Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _BRCMF_DBG_H_
-#define _BRCMF_DBG_H_
-
-/* message levels */
-#define BRCMF_TRACE_VAL                0x00000002
-#define BRCMF_INFO_VAL         0x00000004
-#define BRCMF_DATA_VAL         0x00000008
-#define BRCMF_CTL_VAL          0x00000010
-#define BRCMF_TIMER_VAL                0x00000020
-#define BRCMF_HDRS_VAL         0x00000040
-#define BRCMF_BYTES_VAL                0x00000080
-#define BRCMF_INTR_VAL         0x00000100
-#define BRCMF_GLOM_VAL         0x00000200
-#define BRCMF_EVENT_VAL                0x00000400
-#define BRCMF_BTA_VAL          0x00000800
-#define BRCMF_FIL_VAL          0x00001000
-#define BRCMF_USB_VAL          0x00002000
-#define BRCMF_SCAN_VAL         0x00004000
-#define BRCMF_CONN_VAL         0x00008000
-#define BRCMF_BCDC_VAL         0x00010000
-#define BRCMF_SDIO_VAL         0x00020000
-#define BRCMF_MSGBUF_VAL       0x00040000
-#define BRCMF_PCIE_VAL         0x00080000
-
-/* set default print format */
-#undef pr_fmt
-#define pr_fmt(fmt)            KBUILD_MODNAME ": " fmt
-
-/* Macro for error messages. net_ratelimit() is used when driver
- * debugging is not selected. When debugging the driver error
- * messages are as important as other tracing or even more so.
- */
-#ifndef CONFIG_BRCM_TRACING
-#ifdef CONFIG_BRCMDBG
-#define brcmf_err(fmt, ...)    pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
-#else
-#define brcmf_err(fmt, ...)                                            \
-       do {                                                            \
-               if (net_ratelimit())                                    \
-                       pr_err("%s: " fmt, __func__, ##__VA_ARGS__);    \
-       } while (0)
-#endif
-#else
-__printf(2, 3)
-void __brcmf_err(const char *func, const char *fmt, ...);
-#define brcmf_err(fmt, ...) \
-       __brcmf_err(__func__, fmt, ##__VA_ARGS__)
-#endif
-
-#if defined(DEBUG) || defined(CONFIG_BRCM_TRACING)
-__printf(3, 4)
-void __brcmf_dbg(u32 level, const char *func, const char *fmt, ...);
-#define brcmf_dbg(level, fmt, ...)                             \
-do {                                                           \
-       __brcmf_dbg(BRCMF_##level##_VAL, __func__,              \
-                   fmt, ##__VA_ARGS__);                        \
-} while (0)
-#define BRCMF_DATA_ON()                (brcmf_msg_level & BRCMF_DATA_VAL)
-#define BRCMF_CTL_ON()         (brcmf_msg_level & BRCMF_CTL_VAL)
-#define BRCMF_HDRS_ON()                (brcmf_msg_level & BRCMF_HDRS_VAL)
-#define BRCMF_BYTES_ON()       (brcmf_msg_level & BRCMF_BYTES_VAL)
-#define BRCMF_GLOM_ON()                (brcmf_msg_level & BRCMF_GLOM_VAL)
-#define BRCMF_EVENT_ON()       (brcmf_msg_level & BRCMF_EVENT_VAL)
-#define BRCMF_FIL_ON()         (brcmf_msg_level & BRCMF_FIL_VAL)
-
-#else /* defined(DEBUG) || defined(CONFIG_BRCM_TRACING) */
-
-#define brcmf_dbg(level, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
-
-#define BRCMF_DATA_ON()                0
-#define BRCMF_CTL_ON()         0
-#define BRCMF_HDRS_ON()                0
-#define BRCMF_BYTES_ON()       0
-#define BRCMF_GLOM_ON()                0
-#define BRCMF_EVENT_ON()       0
-#define BRCMF_FIL_ON()         0
-
-#endif /* defined(DEBUG) || defined(CONFIG_BRCM_TRACING) */
-
-#define brcmf_dbg_hex_dump(test, data, len, fmt, ...)                  \
-do {                                                                   \
-       trace_brcmf_hexdump((void *)data, len);                         \
-       if (test)                                                       \
-               brcmu_dbg_hex_dump(data, len, fmt, ##__VA_ARGS__);      \
-} while (0)
-
-extern int brcmf_msg_level;
-
-struct brcmf_pub;
-#ifdef DEBUG
-void brcmf_debugfs_init(void);
-void brcmf_debugfs_exit(void);
-int brcmf_debugfs_attach(struct brcmf_pub *drvr);
-void brcmf_debugfs_detach(struct brcmf_pub *drvr);
-struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr);
-int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
-                           int (*read_fn)(struct seq_file *seq, void *data));
-#else
-static inline void brcmf_debugfs_init(void)
-{
-}
-static inline void brcmf_debugfs_exit(void)
-{
-}
-static inline int brcmf_debugfs_attach(struct brcmf_pub *drvr)
-{
-       return 0;
-}
-static inline void brcmf_debugfs_detach(struct brcmf_pub *drvr)
-{
-}
-static inline
-int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
-                           int (*read_fn)(struct seq_file *seq, void *data))
-{
-       return 0;
-}
-#endif
-
-#endif                         /* _BRCMF_DBG_H_ */
index fb1043908a23eec22c71845d83686b81c872da21..2522e684c66ec09c06b64741c33dc440244f53d6 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "dhd.h"
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "fwil_types.h"
 #include "p2p.h"
 #include "wl_cfg80211.h"
index 079187c511707d6ac053e4bb3e138fb1c0356f8b..4fc2f523af0610523ab05352a6f5364d8937a951 100644 (file)
@@ -97,7 +97,7 @@ struct rte_console {
 #include <chipcommon.h>
 
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "tracepoint.h"
 
 #define TXQLEN         2048    /* bulk tx queue length */
index 4eb6a41e72c754b9793ed7ad69e9d2648222f800..86b854e83f71038d2381c939de448904978aeb0e 100644 (file)
@@ -19,7 +19,7 @@
 #include <brcm_hw_ids.h>
 #include "dhd.h"
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "fwil.h"
 #include "feature.h"
 
index 8ea9f283d2b8065f4766978c2e43e05e6576fba6..0f157f151282ebe4446bd0aab04453d212ff6a77 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/firmware.h>
 #include <linux/module.h>
 
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "firmware.h"
 
 char brcmf_firmware_path[BRCMF_FW_PATH_LEN];
index 1faa929f5fff2c5fcfe667d7b585ca8621448d5a..15a2cc56baf058bef9c4255f01f91c173343ed50 100644 (file)
@@ -20,7 +20,7 @@
 #include <brcmu_utils.h>
 
 #include "dhd.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "dhd_bus.h"
 #include "proto.h"
 #include "flowring.h"
index 44fc85f68f7aceba2788da99126164b0a946a6a7..ce98ce55685b4bea1cf4543be984de04350ba7a6 100644 (file)
@@ -19,7 +19,7 @@
 #include "brcmu_utils.h"
 
 #include "dhd.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "tracepoint.h"
 #include "fwsignal.h"
 #include "fweh.h"
index dccbdc1aae6df8b16814d343f5d63ca31ee8a0bb..424146c226aad0dec775ab57e11639731a21a3eb 100644 (file)
@@ -24,7 +24,7 @@
 #include <brcmu_wifi.h>
 #include "dhd.h"
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "tracepoint.h"
 #include "fwil.h"
 #include "proto.h"
index 183f08d7fc8c8e1ece4a6965fd604313385580f4..5a3cf644af2f1b0cac1eb5ac71cf608aec230075 100644 (file)
@@ -27,7 +27,7 @@
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
 #include "dhd.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "dhd_bus.h"
 #include "fwil.h"
 #include "fwil_types.h"
index 11cc051f97cd42152ed6530257e1c1fcfbcf46e4..87924d32d54065c52e58d227dd8c849022622c68 100644 (file)
@@ -25,7 +25,7 @@
 #include <brcmu_wifi.h>
 
 #include "dhd.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "proto.h"
 #include "msgbuf.h"
 #include "commonring.h"
index f05f5270fec1095df589b96490308bfe5193568a..875060c54a0091c85fe92dc2870950e053f6319f 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/mmc/sdio_func.h>
 
 #include <defs.h>
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "sdio_host.h"
 
 void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
index d54c58a32faa52bf9b6dc2cb36edd35c07993302..7459c252c1ddf5fcd42c7967722e165c00cd433e 100644 (file)
@@ -22,7 +22,7 @@
 #include <brcmu_utils.h>
 #include <defs.h>
 #include <dhd.h>
-#include <dhd_dbg.h>
+#include "debug.h"
 #include "fwil.h"
 #include "fwil_types.h"
 #include "p2p.h"
index 8c0632ec9f7a6041e72a0a3c6e6243a00955d97f..d8fe7abd96c8db0086a3c0ba2f14ab4c610b3604 100644 (file)
@@ -30,7 +30,7 @@
 #include <brcmu_wifi.h>
 #include <brcm_hw_ids.h>
 
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "dhd_bus.h"
 #include "commonring.h"
 #include "msgbuf.h"
index 62b940723339f825a2ded722e19ec39c8e644dee..f96b9326fe3d125f632920c8fdee29252433060a 100644 (file)
@@ -22,7 +22,7 @@
 #include <brcmu_wifi.h>
 #include "dhd.h"
 #include "dhd_bus.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "proto.h"
 #include "bcdc.h"
 #include "msgbuf.h"
index 3f12b606839e66da17c6996e71e4dff2378b7203..4eb9b2c158b34bcec9a5f4d3e4f4df9e273d3683 100644 (file)
@@ -24,8 +24,8 @@
 #include <brcm_hw_ids.h>
 #include <brcmu_wifi.h>
 #include <dhd_bus.h>
-#include <dhd_dbg.h>
 
+#include "debug.h"
 #include "firmware.h"
 #include "usb.h"
 
index 5960d827508c9d42a5f4a7c29e18ab80e559aacb..f204c83cd61f60e5df6571dc24a248a0b285cdeb 100644 (file)
@@ -22,7 +22,7 @@
 #include "fwil_types.h"
 #include "dhd.h"
 #include "p2p.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "wl_cfg80211.h"
 #include "vendor.h"
 #include "fwil.h"
index fcadbe3c38d6d022a287593581c42be70819dc84..50bc6a0b90623087491d00d1dbfd9af445652373 100644 (file)
@@ -27,7 +27,7 @@
 #include <defs.h>
 #include <brcmu_wifi.h>
 #include "dhd.h"
-#include "dhd_dbg.h"
+#include "debug.h"
 #include "tracepoint.h"
 #include "fwil_types.h"
 #include "p2p.h"