Skip to content

Commit

Permalink
mac80211: fix key debugfs default_key link
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 8, 2008
1 parent cfcdf40 commit d9c58f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/debugfs_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions net/mac80211/key.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ struct ieee80211_key {
struct dentry *replays;
struct dentry *key;
struct dentry *ifindex;
int cnt;
} debugfs;
#endif

Expand Down

0 comments on commit d9c58f3

Please sign in to comment.