make sure that the dhcp client (or other processes necessary to get a connection...
[openwrt.git] / package / mac80211 / patches / 417-cfg80211-fix-rename.patch
1 Subject: cfg80211: fix debugfs error handling
2
3 If something goes wrong creating the debugfs dir or when
4 debugfs is not compiled in, the current code might lead to
5 trouble; make it more robust.
6
7 Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
8 ---
9 net/wireless/core.c | 5 ++++-
10 1 file changed, 4 insertions(+), 1 deletion(-)
11
12 --- everything.orig/net/wireless/core.c 2008-10-08 10:13:49.000000000 +0200
13 +++ everything/net/wireless/core.c 2008-10-08 10:19:10.000000000 +0200
14 @@ -185,7 +185,8 @@ int cfg80211_dev_rename(struct cfg80211_
15 if (result)
16 goto out_unlock;
17
18 - if (!debugfs_rename(rdev->wiphy.debugfsdir->d_parent,
19 + if (rdev->wiphy.debugfsdir &&
20 + !debugfs_rename(rdev->wiphy.debugfsdir->d_parent,
21 rdev->wiphy.debugfsdir,
22 rdev->wiphy.debugfsdir->d_parent,
23 newname))
24 @@ -318,6 +319,8 @@ int wiphy_register(struct wiphy *wiphy)
25 drv->wiphy.debugfsdir =
26 debugfs_create_dir(wiphy_name(&drv->wiphy),
27 ieee80211_debugfs_dir);
28 + if (IS_ERR(drv->wiphy.debugfsdir))
29 + drv->wiphy.debugfsdir = NULL;
30
31 res = 0;
32 out_unlock:
This page took 0.056526 seconds and 5 git commands to generate.