Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: use debugfs_rename
Date: Thu, 21 Jun 2007 18:30:19 +0200	[thread overview]
Message-ID: <1182443419.21939.44.camel@johannes.berg> (raw)


Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 net/mac80211/debugfs_netdev.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--- wireless-dev.orig/net/mac80211/debugfs_netdev.c	2007-06-13 22:45:54.798817885 +0200
+++ wireless-dev/net/mac80211/debugfs_netdev.c	2007-06-13 23:06:25.448817885 +0200
@@ -734,9 +734,9 @@ static int netdev_notify(struct notifier
 			 void *ndev)
 {
 	struct net_device *dev = ndev;
-	/* TODO
 	char buf[10+IFNAMSIZ];
-	*/
+	struct dentry *dir;
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
 	if (state != NETDEV_CHANGENAME)
 		return 0;
@@ -747,10 +747,12 @@ static int netdev_notify(struct notifier
 	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);
-	*/
+	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	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;
 }



             reply	other threads:[~2007-06-22  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-21 16:30 Johannes Berg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-21 19:04 [PATCH] mac80211: use debugfs_rename Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1182443419.21939.44.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox