Search Linux Wireless

[PATCH] mac80211: fix key debugfs default_key link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The default_key symlink points to the key index rather than
they key counter, fix it.

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

--- everything.orig/net/mac80211/debugfs_key.c	2008-04-08 11:20:39.000000000 +0200
+++ everything/net/mac80211/debugfs_key.c	2008-04-08 11:20:43.000000000 +0200
@@ -194,6 +194,7 @@ void ieee80211_debugfs_key_add(struct ie
 		return;
 
 	sprintf(buf, "%d", keycount);
+	key->debugfs.cnt = keycount;
 	keycount++;
 	key->debugfs.dir = debugfs_create_dir(buf,
 					local->debugfs.keys);
@@ -246,7 +247,7 @@ void ieee80211_debugfs_key_add_default(s
 	if (!sdata->debugfsdir)
 		return;
 
-	sprintf(buf, "../keys/%d", sdata->default_key->conf.keyidx);
+	sprintf(buf, "../keys/%d", sdata->default_key->debugfs.cnt);
 	sdata->debugfs.default_key =
 		debugfs_create_symlink("default_key", sdata->debugfsdir, buf);
 }
--- everything.orig/net/mac80211/ieee80211_key.h	2008-04-08 11:20:39.000000000 +0200
+++ everything/net/mac80211/ieee80211_key.h	2008-04-08 11:20:43.000000000 +0200
@@ -115,6 +115,7 @@ struct ieee80211_key {
 		struct dentry *replays;
 		struct dentry *key;
 		struct dentry *ifindex;
+		int cnt;
 	} debugfs;
 #endif
 


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux