aee45825eae02c74a641f0dfb32fed41940c999f
[openwrt.git] / package / mac80211 / patches / 416-mac80211-fix-netdev-notifier.patch
1 Subject: mac80211: fix debugfs netdev rename
2
3 If, for some reason, a netdev has no debugfs dir, we shouldn't
4 try to rename that dir.
5
6 Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
7 Cc: Robin Holt <holt@sgi.com>
8 ---
9 net/mac80211/debugfs_netdev.c | 6 +++++-
10 1 file changed, 5 insertions(+), 1 deletion(-)
11
12 --- everything.orig/net/mac80211/debugfs_netdev.c 2008-10-08 10:08:23.000000000 +0200
13 +++ everything/net/mac80211/debugfs_netdev.c 2008-10-08 10:22:52.000000000 +0200
14 @@ -481,8 +481,12 @@ static int netdev_notify(struct notifier
15
16 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
17
18 - sprintf(buf, "netdev:%s", dev->name);
19 dir = sdata->debugfsdir;
20 +
21 + if (!dir)
22 + return 0;
23 +
24 + sprintf(buf, "netdev:%s", dev->name);
25 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
26 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
27 "dir to %s\n", buf);
This page took 0.041904 seconds and 3 git commands to generate.