提交 d9c58f30 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: fix key debugfs default_key link

The default_key symlink points to the key index rather than
they key counter, fix it.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 cfcdf40e
......@@ -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);
}
......
......@@ -125,6 +125,7 @@ struct ieee80211_key {
struct dentry *replays;
struct dentry *key;
struct dentry *ifindex;
int cnt;
} debugfs;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册