6lowpan: fix debugfs interface entry name

This patches moves the debugfs interface related register after
netdevice register. The function lowpan_dev_debugfs_init will use
"dev->name" which can be before register_netdevice a format string.
The function register_netdevice will evaluate the format string if
necessary and replace "dev->name" to the real interface name.

Reported-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Acked-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Alexander Aring 2015-12-15 12:25:35 +01:00 committed by Marcel Holtmann
parent 7eb7404f7e
commit 92e17ee72a
1 changed files with 3 additions and 3 deletions

View File

@ -29,13 +29,13 @@ int lowpan_register_netdevice(struct net_device *dev,
lowpan_priv(dev)->lltype = lltype;
ret = lowpan_dev_debugfs_init(dev);
ret = register_netdevice(dev);
if (ret < 0)
return ret;
ret = register_netdevice(dev);
ret = lowpan_dev_debugfs_init(dev);
if (ret < 0)
lowpan_dev_debugfs_exit(dev);
unregister_netdevice(dev);
return ret;
}