aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-11-23 16:33:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-28 15:05:04 -0500
commita830df0714117574fd0d5fe98477059b3e9fd5bf (patch)
treeb9e97c27d1b24dfed5f5267e1ee991e791e767a2 /drivers/net/wireless/ath/ath9k/debug.c
parentf911ab83a2c07118dc605d643545647cef6f2322 (diff)
ath9k: separate debugfs support from CONFIG_ATH_DEBUG
In my setups, ath9k's debugfs files are most of the time much more useful than the messages generated by enabling CONFIG_ATH_DEBUG along with the right debug flags. Since CONFIG_ATH_DEBUG comes with a noticeable overhead on embedded systems, this patch makes it possible to use the debugfs files without that option. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 608fa06e531c..b66f72dbf7b9 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -31,6 +31,8 @@ static int ath9k_debugfs_open(struct inode *inode, struct file *file)
31 return 0; 31 return 0;
32} 32}
33 33
34#ifdef CONFIG_ATH_DEBUG
35
34static ssize_t read_file_debug(struct file *file, char __user *user_buf, 36static ssize_t read_file_debug(struct file *file, char __user *user_buf,
35 size_t count, loff_t *ppos) 37 size_t count, loff_t *ppos)
36{ 38{
@@ -71,6 +73,8 @@ static const struct file_operations fops_debug = {
71 .owner = THIS_MODULE 73 .owner = THIS_MODULE
72}; 74};
73 75
76#endif
77
74static ssize_t read_file_dma(struct file *file, char __user *user_buf, 78static ssize_t read_file_dma(struct file *file, char __user *user_buf,
75 size_t count, loff_t *ppos) 79 size_t count, loff_t *ppos)
76{ 80{
@@ -563,10 +567,12 @@ int ath9k_init_debug(struct ath_hw *ah)
563 if (!sc->debug.debugfs_phy) 567 if (!sc->debug.debugfs_phy)
564 goto err; 568 goto err;
565 569
570#ifdef CONFIG_ATH_DEBUG
566 sc->debug.debugfs_debug = debugfs_create_file("debug", 571 sc->debug.debugfs_debug = debugfs_create_file("debug",
567 S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_debug); 572 S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_debug);
568 if (!sc->debug.debugfs_debug) 573 if (!sc->debug.debugfs_debug)
569 goto err; 574 goto err;
575#endif
570 576
571 sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR, 577 sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
572 sc->debug.debugfs_phy, sc, &fops_dma); 578 sc->debug.debugfs_phy, sc, &fops_dma);