* [PATCH net-next 0/2] Minor PPP devices improvements
@ 2015-12-11 18:54 Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 1/2] ppp: define "ppp" device type Guillaume Nault
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Guillaume Nault @ 2015-12-11 18:54 UTC (permalink / raw)
To: netdev; +Cc: Paul Mackerras, linux-ppp, David S. Miller
Let PPP devices be friendlier to user space by registering their device
type and reporting their interface naming scheme.
Guillaume Nault (2):
ppp: define "ppp" device type
ppp: declare ppp devices as enumerated interfaces
drivers/net/ppp/ppp_generic.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--
2.6.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] ppp: define "ppp" device type
2015-12-11 18:54 [PATCH net-next 0/2] Minor PPP devices improvements Guillaume Nault
@ 2015-12-11 18:54 ` Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 2/2] ppp: declare ppp devices as enumerated interfaces Guillaume Nault
2015-12-14 21:21 ` [PATCH net-next 0/2] Minor PPP devices improvements David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Nault @ 2015-12-11 18:54 UTC (permalink / raw)
To: netdev; +Cc: Paul Mackerras, linux-ppp, David S. Miller
Let PPP devices be identified as such in /sys/class/net/<iface>/uevent.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
drivers/net/ppp/ppp_generic.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 9a863c6..1cd7651 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -1138,9 +1138,15 @@ static const struct net_device_ops ppp_netdev_ops = {
.ndo_get_stats64 = ppp_get_stats64,
};
+static struct device_type ppp_type = {
+ .name = "ppp",
+};
+
static void ppp_setup(struct net_device *dev)
{
dev->netdev_ops = &ppp_netdev_ops;
+ SET_NETDEV_DEVTYPE(dev, &ppp_type);
+
dev->hard_header_len = PPP_HDRLEN;
dev->mtu = PPP_MRU;
dev->addr_len = 0;
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] ppp: declare ppp devices as enumerated interfaces
2015-12-11 18:54 [PATCH net-next 0/2] Minor PPP devices improvements Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 1/2] ppp: define "ppp" device type Guillaume Nault
@ 2015-12-11 18:54 ` Guillaume Nault
2015-12-14 21:21 ` [PATCH net-next 0/2] Minor PPP devices improvements David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Guillaume Nault @ 2015-12-11 18:54 UTC (permalink / raw)
To: netdev; +Cc: Paul Mackerras, linux-ppp, David S. Miller
Let user space be aware of the naming scheme used by ppp interfaces
(visible in /sys/class/net/<iface>/name_assign_type).
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
drivers/net/ppp/ppp_generic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 1cd7651..fc8ad00 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2726,8 +2726,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit,
int ret = -ENOMEM;
int i;
- dev = alloc_netdev(sizeof(struct ppp), "", NET_NAME_UNKNOWN,
- ppp_setup);
+ dev = alloc_netdev(sizeof(struct ppp), "", NET_NAME_ENUM, ppp_setup);
if (!dev)
goto out1;
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] Minor PPP devices improvements
2015-12-11 18:54 [PATCH net-next 0/2] Minor PPP devices improvements Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 1/2] ppp: define "ppp" device type Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 2/2] ppp: declare ppp devices as enumerated interfaces Guillaume Nault
@ 2015-12-14 21:21 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-12-14 21:21 UTC (permalink / raw)
To: g.nault; +Cc: netdev, paulus, linux-ppp
From: Guillaume Nault <g.nault@alphalink.fr>
Date: Fri, 11 Dec 2015 19:54:47 +0100
> Let PPP devices be friendlier to user space by registering their device
> type and reporting their interface naming scheme.
Series applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-14 21:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 18:54 [PATCH net-next 0/2] Minor PPP devices improvements Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 1/2] ppp: define "ppp" device type Guillaume Nault
2015-12-11 18:54 ` [PATCH net-next 2/2] ppp: declare ppp devices as enumerated interfaces Guillaume Nault
2015-12-14 21:21 ` [PATCH net-next 0/2] Minor PPP devices improvements David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).