summaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2015-12-11 19:54:49 +0100
committerDavid S. Miller <davem@davemloft.net>2015-12-14 16:20:57 -0500
commit94dbffe16eb187a7e9c34f1f614925fd9460ec33 (patch)
tree13c94a841a17c8e54fa5b66587b8e8440c3c1235 /drivers/net/ppp
parente286213484e724dcba21c214f7316fdf6ccbcf6b (diff)
downloadlinux-94dbffe16eb187a7e9c34f1f614925fd9460ec33.tar.bz2
ppp: define "ppp" device type
Let PPP devices be identified as such in /sys/class/net/<iface>/uevent. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp')
-rw-r--r--drivers/net/ppp/ppp_generic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 9a863c6a6a33..1cd7651c6659 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;