linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: johannes@sipsolutions.net
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH (v3) 4/4] mac80211 debugfs Kconfig
Date: Wed, 07 Mar 2007 17:45:35 +0100	[thread overview]
Message-ID: <20070307164647.839947000@sipsolutions.net> (raw)
In-Reply-To: 20070307164531.910923000@sipsolutions.net

This patch adds a configuration option to mac80211 that lets you
enable or disable the debugfs internal state export.

I intentionally made this option not depend on MAC80211_DEBUG
because that option always generates debug messages in the kernel
log; this way you can see the internal state without seeing any
debugging message.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 net/mac80211/Kconfig          |    9 +++++++++
 net/mac80211/Makefile         |    2 +-
 net/mac80211/debugfs.h        |    2 +-
 net/mac80211/debugfs_key.h    |    2 +-
 net/mac80211/debugfs_netdev.h |    2 +-
 net/mac80211/debugfs_sta.h    |    2 +-
 net/mac80211/ieee80211_i.h    |    4 ++--
 net/mac80211/ieee80211_key.h  |    2 +-
 net/mac80211/ieee80211_rate.h |    4 ++--
 net/mac80211/rc80211_simple.c |    6 +++---
 net/mac80211/sta_info.h       |    2 +-
 11 files changed, 23 insertions(+), 14 deletions(-)

--- wireless-dev.orig/net/mac80211/Kconfig	2007-03-07 13:03:43.954710923 +0100
+++ wireless-dev/net/mac80211/Kconfig	2007-03-07 13:04:00.514710923 +0100
@@ -18,6 +18,15 @@ config MAC80211_LEDS
 	This option enables a few LED triggers for different
 	packet receive/transmit events.
 
+config MAC80211_DEBUGFS
+	bool "Export mac80211 internals in DebugFS"
+	depends on MAC80211 && DEBUG_FS
+	---help---
+	  Select this to see extensive information about
+	  the internal state of mac80211 in debugfs.
+
+	  Say N unless you know you need this.
+
 config MAC80211_DEBUG
 	bool "Enable debugging output"
 	depends on MAC80211
--- wireless-dev.orig/net/mac80211/Makefile	2007-03-07 13:03:58.974710923 +0100
+++ wireless-dev/net/mac80211/Makefile	2007-03-07 13:04:00.514710923 +0100
@@ -1,7 +1,7 @@
 obj-$(CONFIG_MAC80211) += mac80211.o rc80211_simple.o
 
 mac80211-objs-$(CONFIG_MAC80211_LEDS) += ieee80211_led.o
-mac80211-objs-$(CONFIG_DEBUG_FS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
+mac80211-objs-$(CONFIG_MAC80211_DEBUGFS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
 
 mac80211-objs := \
 	ieee80211.o \
--- wireless-dev.orig/net/mac80211/debugfs.h	2007-03-07 13:03:56.054710923 +0100
+++ wireless-dev/net/mac80211/debugfs.h	2007-03-07 13:04:00.514710923 +0100
@@ -1,7 +1,7 @@
 #ifndef __MAC80211_DEBUGFS_H
 #define __MAC80211_DEBUGFS_H
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 extern void debugfs_hw_add(struct ieee80211_local *local);
 extern void debugfs_hw_del(struct ieee80211_local *local);
 extern int mac80211_open_file_generic(struct inode *inode, struct file *file);
--- wireless-dev.orig/net/mac80211/debugfs_key.h	2007-03-07 13:03:58.994710923 +0100
+++ wireless-dev/net/mac80211/debugfs_key.h	2007-03-07 13:04:00.514710923 +0100
@@ -1,7 +1,7 @@
 #ifndef __MAC80211_DEBUGFS_KEY_H
 #define __MAC80211_DEBUGFS_KEY_H
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 void ieee80211_debugfs_key_add(struct ieee80211_local *local,
 			       struct ieee80211_key *key);
 void ieee80211_debugfs_key_remove(struct ieee80211_key *key);
--- wireless-dev.orig/net/mac80211/debugfs_netdev.h	2007-03-07 13:03:58.974710923 +0100
+++ wireless-dev/net/mac80211/debugfs_netdev.h	2007-03-07 13:04:00.514710923 +0100
@@ -3,7 +3,7 @@
 #ifndef __IEEE80211_SYSFS_H
 #define __IEEE80211_SYSFS_H
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata);
 void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata);
 void ieee80211_debugfs_change_if_type(struct ieee80211_sub_if_data *sdata,
--- wireless-dev.orig/net/mac80211/debugfs_sta.h	2007-03-07 13:03:56.074710923 +0100
+++ wireless-dev/net/mac80211/debugfs_sta.h	2007-03-07 13:04:00.514710923 +0100
@@ -1,7 +1,7 @@
 #ifndef __MAC80211_DEBUGFS_STA_H
 #define __MAC80211_DEBUGFS_STA_H
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 void ieee80211_sta_debugfs_add(struct sta_info *sta);
 void ieee80211_sta_debugfs_remove(struct sta_info *sta);
 #else
--- wireless-dev.orig/net/mac80211/ieee80211_i.h	2007-03-07 13:03:58.984710923 +0100
+++ wireless-dev/net/mac80211/ieee80211_i.h	2007-03-07 13:04:00.514710923 +0100
@@ -337,7 +337,7 @@ struct ieee80211_sub_if_data {
 	int channel_use;
 	int channel_use_raw;
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct dentry *debugfsdir;
 	union {
 		struct {
@@ -595,7 +595,7 @@ struct ieee80211_local {
 
 	int user_space_mlme;
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct local_debugfsdentries {
 		struct dentry *channel;
 		struct dentry *frequency;
--- wireless-dev.orig/net/mac80211/ieee80211_key.h	2007-03-07 13:03:58.984710923 +0100
+++ wireless-dev/net/mac80211/ieee80211_key.h	2007-03-07 13:04:00.514710923 +0100
@@ -83,7 +83,7 @@ struct ieee80211_key {
 					* (used only for broadcast keys). */
 	s8 keyidx; /* WEP key index */
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct {
 		struct dentry *stalink;
 		struct dentry *dir;
--- wireless-dev.orig/net/mac80211/rc80211_simple.c	2007-03-07 13:03:56.084710923 +0100
+++ wireless-dev/net/mac80211/rc80211_simple.c	2007-03-07 13:04:00.514710923 +0100
@@ -123,7 +123,7 @@ struct sta_rate_control {
 	u32 tx_avg_rate_sum;
 	u32 tx_avg_rate_num;
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct dentry *tx_avg_rate_sum_dentry;
 	struct dentry *tx_avg_rate_num_dentry;
 #endif
@@ -333,7 +333,7 @@ static void rate_control_simple_free_sta
 	kfree(rctrl);
 }
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 
 static int open_file_generic(struct inode *inode, struct file *file)
 {
@@ -406,7 +406,7 @@ static struct rate_control_ops rate_cont
 	.free = rate_control_simple_free,
 	.alloc_sta = rate_control_simple_alloc_sta,
 	.free_sta = rate_control_simple_free_sta,
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	.add_sta_debugfs = rate_control_simple_add_sta_debugfs,
 	.remove_sta_debugfs = rate_control_simple_remove_sta_debugfs,
 #endif
--- wireless-dev.orig/net/mac80211/sta_info.h	2007-03-07 13:03:56.074710923 +0100
+++ wireless-dev/net/mac80211/sta_info.h	2007-03-07 13:04:00.524710923 +0100
@@ -115,7 +115,7 @@ struct sta_info {
 
 	u16 listen_interval;
 
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct sta_info_debugfsdentries {
 		struct dentry *dir;
 		struct dentry *flags;
--- wireless-dev.orig/net/mac80211/ieee80211_rate.h	2007-03-07 13:03:56.084710923 +0100
+++ wireless-dev/net/mac80211/ieee80211_rate.h	2007-03-07 13:04:00.524710923 +0100
@@ -124,7 +124,7 @@ static inline void rate_control_free_sta
 
 static inline void rate_control_add_sta_debugfs(struct sta_info *sta)
 {
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct rate_control_ref *ref = sta->rate_ctrl;
 	if (sta->debugfs.dir && ref->ops->add_sta_debugfs)
 		ref->ops->add_sta_debugfs(ref->priv, sta->rate_ctrl_priv,
@@ -134,7 +134,7 @@ static inline void rate_control_add_sta_
 
 static inline void rate_control_remove_sta_debugfs(struct sta_info *sta)
 {
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_MAC80211_DEBUGFS
 	struct rate_control_ref *ref = sta->rate_ctrl;
 	if (ref->ops->remove_sta_debugfs)
 		ref->ops->remove_sta_debugfs(ref->priv, sta->rate_ctrl_priv);

--


  parent reply	other threads:[~2007-03-07 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 16:45 [PATCH (v3) 0/4] move everything in mac80211 from sysfs to debugfs johannes
2007-03-07 16:45 ` [PATCH (v3) 1/4] mac80211: move PHY things " johannes
2007-03-07 16:45 ` [PATCH (v3) 2/4] mac80211: move sta dir " johannes
2007-03-07 16:45 ` [PATCH (v3) 3/4] mac80211: move per-netdev and key stuff " johannes
2007-03-07 16:45 ` johannes [this message]
2007-03-23 18:04 ` [PATCH (v3) 0/4] move everything in mac80211 from sysfs " Jiri Benc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070307164647.839947000@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).