Search Linux Wireless

[PATCH] cfg80211: use debugfs_rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the new debugfs_rename function in mac80211's debugfs where
necessary and fix a bug with renaming.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

---
debugfs_rename hasn't actually been merged yet, but I hope it will be
merged soon. URL is
http://article.gmane.org/gmane.linux.file-systems/14819

This patch should also apply against net-2.6 (with some fuzz though due
to the nl80211 bit)

 net/wireless/core.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- wireless-dev.orig/net/wireless/core.c	2007-05-21 18:37:40.541805077 +0200
+++ wireless-dev/net/wireless/core.c	2007-05-21 21:01:03.481611481 +0200
@@ -162,10 +162,15 @@ int cfg80211_dev_rename(struct cfg80211_
 
 	/* this will check for collisions */
 	result = device_rename(&rdev->wiphy.dev, newname);
-	if (!result)
+	if (result)
 		return result;
 
-	/* TODO: do debugfs rename! */
+	if (!debugfs_rename(rdev->wiphy.debugfsdir->d_parent,
+			    rdev->wiphy.debugfsdir,
+			    rdev->wiphy.debugfsdir->d_parent,
+			    newname))
+		printk(KERN_ERR "cfg80211: failed to rename debugfs dir to %s!\n",
+		       newname);
 
 	nl80211_notify_dev_rename(rdev);
 


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux