All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Jiri Benc <jbenc@suse.cz>, Michael Wu <flamingice@sourmilk.net>,
	linux-wireless@vger.kernel.org
Subject: [PATCH 3/3] mac80211: add interface index to key debugfs
Date: Tue, 21 Aug 2007 17:57:28 +0200	[thread overview]
Message-ID: <20070821160002.157469000@sipsolutions.net> (raw)
In-Reply-To: 20070821155725.489738000@sipsolutions.net

Add a new file 'ifindex' to each key's debugfs dir to
allow finding which interface the key was configured on.
This isn't done as a symlink because of possible netdev
name changes.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/debugfs_key.c   |    4 ++++
 net/mac80211/ieee80211_key.h |    1 +
 2 files changed, 5 insertions(+)

--- wireless-dev.orig/net/mac80211/debugfs_key.c	2007-08-21 16:26:46.415923881 +0200
+++ wireless-dev/net/mac80211/debugfs_key.c	2007-08-21 16:27:34.505923881 +0200
@@ -56,6 +56,8 @@ KEY_CONF_FILE(keyidx, D);
 KEY_CONF_FILE(hw_key_idx, D);
 KEY_FILE(flags, X);
 KEY_FILE(tx_rx_count, D);
+KEY_READ(ifindex, sdata->dev->ifindex, 20, "%d\n");
+KEY_OPS(ifindex);
 
 static ssize_t key_algorithm_read(struct file *file,
 				  char __user *userbuf,
@@ -209,6 +211,7 @@ void ieee80211_debugfs_key_add(struct ie
 	DEBUGFS_ADD(rx_spec);
 	DEBUGFS_ADD(replays);
 	DEBUGFS_ADD(key);
+	DEBUGFS_ADD(ifindex);
 };
 
 #define DEBUGFS_DEL(name) \
@@ -229,6 +232,7 @@ void ieee80211_debugfs_key_remove(struct
 	DEBUGFS_DEL(rx_spec);
 	DEBUGFS_DEL(replays);
 	DEBUGFS_DEL(key);
+	DEBUGFS_DEL(ifindex);
 
 	debugfs_remove(key->debugfs.stalink);
 	key->debugfs.stalink = NULL;
--- wireless-dev.orig/net/mac80211/ieee80211_key.h	2007-08-21 16:26:46.375923881 +0200
+++ wireless-dev/net/mac80211/ieee80211_key.h	2007-08-21 16:27:34.505923881 +0200
@@ -101,6 +101,7 @@ struct ieee80211_key {
 		struct dentry *rx_spec;
 		struct dentry *replays;
 		struct dentry *key;
+		struct dentry *ifindex;
 	} debugfs;
 #endif
 

-- 


      parent reply	other threads:[~2007-08-21 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 15:57 [PATCH 0/3] improve mac80211 key handling Johannes Berg
2007-08-21 15:57 ` [PATCH 1/3] mac80211: embed key conf in key, fix driver interface Johannes Berg
2007-08-21 15:57 ` [PATCH 2/3] mac80211: revamp key handling Johannes Berg
2007-08-30 23:45   ` Johannes Berg
2007-08-31 13:03     ` Michael Buesch
2007-08-31 23:40       ` Johannes Berg
2007-08-21 15:57 ` Johannes Berg [this message]

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=20070821160002.157469000@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=flamingice@sourmilk.net \
    --cc=jbenc@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.