* [PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name
@ 2015-12-15 11:25 ` Alexander Aring
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Aring @ 2015-12-15 11:25 UTC (permalink / raw)
To: linux-wpan-u79uwXL29TY76Z2rM5mHXA
Cc: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
lukasz.duda-hR+23Fw+YnFSHonuZl5R5Q, Alexander Aring
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-hR+23Fw+YnFSHonuZl5R5Q@public.gmane.org>
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/6lowpan/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/6lowpan/core.c b/net/6lowpan/core.c
index c7f06f5..faf65ba 100644
--- a/net/6lowpan/core.c
+++ b/net/6lowpan/core.c
@@ -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;
}
--
2.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name
@ 2015-12-15 11:25 ` Alexander Aring
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Aring @ 2015-12-15 11:25 UTC (permalink / raw)
To: linux-wpan; +Cc: linux-bluetooth, netdev, kernel, lukasz.duda, Alexander Aring
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>
---
net/6lowpan/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/6lowpan/core.c b/net/6lowpan/core.c
index c7f06f5..faf65ba 100644
--- a/net/6lowpan/core.c
+++ b/net/6lowpan/core.c
@@ -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;
}
--
2.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name
2015-12-15 11:25 ` Alexander Aring
(?)
@ 2015-12-15 11:47 ` Duda, Lukasz
-1 siblings, 0 replies; 4+ messages in thread
From: Duda, Lukasz @ 2015-12-15 11:47 UTC (permalink / raw)
To: Alexander Aring, linux-wpan; +Cc: linux-bluetooth, netdev, kernel
Hi Alex,
> -----Original Message-----
> From: Alexander Aring [mailto:alex.aring@gmail.com]
> Sent: Tuesday, December 15, 2015 12:26
> To: linux-wpan@vger.kernel.org
> Cc: linux-bluetooth@vger.kernel.org; netdev@vger.kernel.org;
> kernel@pengutronix.de; Duda, Lukasz; Alexander Aring
> Subject: [PATCH bluetooth-next] 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>
> ---
> net/6lowpan/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/6lowpan/core.c b/net/6lowpan/core.c index c7f06f5..faf65ba
> 100644
> --- a/net/6lowpan/core.c
> +++ b/net/6lowpan/core.c
> @@ -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;
> }
> --
> 2.6.1
Thanks, after this change I do have correct interface name under
/sys/kernel/debug/6lowpan for Bluetooth Low Energy (bt0).
Acked-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Best regards,
Łukasz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name
2015-12-15 11:25 ` Alexander Aring
(?)
(?)
@ 2015-12-20 7:22 ` Marcel Holtmann
-1 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2015-12-20 7:22 UTC (permalink / raw)
To: Alexander Aring
Cc: linux-wpan, BlueZ development, netdev, kernel, lukasz.duda
Hi Alex,
> 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>
> ---
> net/6lowpan/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-20 7:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 11:25 [PATCH bluetooth-next] 6lowpan: fix debugfs interface entry name Alexander Aring
2015-12-15 11:25 ` Alexander Aring
2015-12-15 11:47 ` Duda, Lukasz
2015-12-20 7:22 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.