Commit 29f53b5c authored by Jonas Bonn's avatar Jonas Bonn Committed by Jakub Kicinski

gtp: set device type

Set the devtype to 'gtp' when setting up the link.
Signed-off-by: default avatarJonas Bonn <jonas@norrbonn.se>
Acked-by: default avatarHarald Welte <laforge@gnumonks.org>
Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 70d13246
...@@ -610,6 +610,10 @@ static const struct net_device_ops gtp_netdev_ops = { ...@@ -610,6 +610,10 @@ static const struct net_device_ops gtp_netdev_ops = {
.ndo_get_stats64 = dev_get_tstats64, .ndo_get_stats64 = dev_get_tstats64,
}; };
static const struct device_type gtp_type = {
.name = "gtp",
};
static void gtp_link_setup(struct net_device *dev) static void gtp_link_setup(struct net_device *dev)
{ {
unsigned int max_gtp_header_len = sizeof(struct iphdr) + unsigned int max_gtp_header_len = sizeof(struct iphdr) +
...@@ -618,6 +622,7 @@ static void gtp_link_setup(struct net_device *dev) ...@@ -618,6 +622,7 @@ static void gtp_link_setup(struct net_device *dev)
dev->netdev_ops = &gtp_netdev_ops; dev->netdev_ops = &gtp_netdev_ops;
dev->needs_free_netdev = true; dev->needs_free_netdev = true;
SET_NETDEV_DEVTYPE(dev, &gtp_type);
dev->hard_header_len = 0; dev->hard_header_len = 0;
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