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

[PATCH] mac80211: use debugfs_rename

Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4ad13663
...@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier_block * nb, ...@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier_block * nb,
void *ndev) void *ndev)
{ {
struct net_device *dev = ndev; struct net_device *dev = ndev;
struct dentry *dir;
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
char buf[10+IFNAMSIZ]; char buf[10+IFNAMSIZ];
if (state != NETDEV_CHANGENAME) if (state != NETDEV_CHANGENAME)
...@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier_block * nb, ...@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier_block * nb,
if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid) if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
return 0; return 0;
/* TODO
sprintf(buf, "netdev:%s", dev->name); sprintf(buf, "netdev:%s", dev->name);
debugfs_rename(IEEE80211_DEV_TO_SUB_IF(dev)->debugfsdir, buf); dir = sdata->debugfsdir;
*/ if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
"dir to %s\n", buf);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册