summaryrefslogtreecommitdiffstats
path: root/drivers/net/gtp.c
diff options
context:
space:
mode:
authorJonas Bonn <jonas@norrbonn.se>2021-02-03 08:08:04 +0100
committerJakub Kicinski <kuba@kernel.org>2021-02-04 09:29:58 -0800
commit29f53b5c00c1deb27d31603ccf6ee161bd5ebb2f (patch)
tree95a9c5fa4a18e8a3bc3be3635b5c0a38e82571ce /drivers/net/gtp.c
parent70d132462998dcef701180e047c91933bda33ae2 (diff)
downloadlinux-29f53b5c00c1deb27d31603ccf6ee161bd5ebb2f.tar.bz2
gtp: set device type
Set the devtype to 'gtp' when setting up the link. Signed-off-by: Jonas Bonn <jonas@norrbonn.se> Acked-by: Harald Welte <laforge@gnumonks.org> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r--drivers/net/gtp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 04d9de385549..a1bb02818977 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -610,6 +610,10 @@ static const struct net_device_ops gtp_netdev_ops = {
.ndo_get_stats64 = dev_get_tstats64,
};
+static const struct device_type gtp_type = {
+ .name = "gtp",
+};
+
static void gtp_link_setup(struct net_device *dev)
{
unsigned int max_gtp_header_len = sizeof(struct iphdr) +
@@ -618,6 +622,7 @@ static void gtp_link_setup(struct net_device *dev)
dev->netdev_ops = &gtp_netdev_ops;
dev->needs_free_netdev = true;
+ SET_NETDEV_DEVTYPE(dev, &gtp_type);
dev->hard_header_len = 0;
dev->addr_len = 0;