summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-06-21 18:30:19 +0200
committerJohn W. Linville <linville@tuxdriver.com>2007-07-17 21:50:19 -0400
commit7c8081eb8f20aa83deb5f1e95adc8a98902555a9 (patch)
tree294aee2710c14dfbc119cdb3f0c98499f7af9127 /net/mac80211
parent4ad1366376bfef32ec0ffa12d1faa483d6f330bd (diff)
downloadblackbird-op-linux-7c8081eb8f20aa83deb5f1e95adc8a98902555a9.tar.gz
blackbird-op-linux-7c8081eb8f20aa83deb5f1e95adc8a98902555a9.zip
[PATCH] mac80211: use debugfs_rename
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/debugfs_netdev.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index a3e01d76d503..799a9208c4b4 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier_block * nb,
void *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];
if (state != NETDEV_CHANGENAME)
@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier_block * nb,
if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
return 0;
- /* TODO
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;
}
OpenPOWER on IntegriCloud