]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: fix key debugfs default_key link
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 8 Apr 2008 20:46:36 +0000 (16:46 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Apr 2008 20:46:36 +0000 (16:46 -0400)
The default_key symlink points to the key index rather than
they key counter, fix it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/debugfs_key.c
net/mac80211/key.h

index bf7027e9ce9fbc2aaa3ab79023064e8cef3537c7..879e7210458ad3ae8965b0d8cc7211cd614a83c2 100644 (file)
@@ -195,6 +195,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_key *key)
                return;
 
        sprintf(buf, "%d", keycount);
+       key->debugfs.cnt = keycount;
        keycount++;
        key->debugfs.dir = debugfs_create_dir(buf,
                                        key->local->debugfs.keys);
@@ -258,7 +259,7 @@ void ieee80211_debugfs_key_add_default(struct ieee80211_sub_if_data *sdata)
        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);
 }
index 467890c6fe81682fbbb0186dd2c21e98f786f48d..5d48518985b3b5502e0a3eca05c793a61f961868 100644 (file)
@@ -125,6 +125,7 @@ struct ieee80211_key {
                struct dentry *replays;
                struct dentry *key;
                struct dentry *ifindex;
+               int cnt;
        } debugfs;
 #endif