l2tp: define "l2tpeth" device type
authorGuillaume Nault <g.nault@alphalink.fr>
Mon, 24 Apr 2017 12:16:07 +0000 (14:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 15:41:56 +0000 (11:41 -0400)
Export type of l2tpeth interfaces to userspace
(/sys/class/net/<iface>/uevent).

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Acked-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_eth.c

index 5e44b3cc1212144d3e25c17ea6bcf4637c39698a..59aba8aeac03f309c79d16f90b85231cedbc1d84 100644 (file)
@@ -130,8 +130,13 @@ static const struct net_device_ops l2tp_eth_netdev_ops = {
        .ndo_set_mac_address    = eth_mac_addr,
 };
 
+static struct device_type l2tpeth_type = {
+       .name = "l2tpeth",
+};
+
 static void l2tp_eth_dev_setup(struct net_device *dev)
 {
+       SET_NETDEV_DEVTYPE(dev, &l2tpeth_type);
        ether_setup(dev);
        dev->priv_flags         &= ~IFF_TX_SKB_SHARING;
        dev->features           |= NETIF_F_LLTX;