Commit 94dbffe1 authored by Guillaume Nault's avatar Guillaume Nault Committed by David S. Miller

ppp: define "ppp" device type

Let PPP devices be identified as such in /sys/class/net/<iface>/uevent.
Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2862134
...@@ -1138,9 +1138,15 @@ static const struct net_device_ops ppp_netdev_ops = { ...@@ -1138,9 +1138,15 @@ static const struct net_device_ops ppp_netdev_ops = {
.ndo_get_stats64 = ppp_get_stats64, .ndo_get_stats64 = ppp_get_stats64,
}; };
static struct device_type ppp_type = {
.name = "ppp",
};
static void ppp_setup(struct net_device *dev) static void ppp_setup(struct net_device *dev)
{ {
dev->netdev_ops = &ppp_netdev_ops; dev->netdev_ops = &ppp_netdev_ops;
SET_NETDEV_DEVTYPE(dev, &ppp_type);
dev->hard_header_len = PPP_HDRLEN; dev->hard_header_len = PPP_HDRLEN;
dev->mtu = PPP_MRU; dev->mtu = PPP_MRU;
dev->addr_len = 0; dev->addr_len = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment