From 0992a61cafb0f3def3b6997f7c3670a4474f479b Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 26 Mar 2013 01:01:04 +0100 Subject: Fix tunnel and dummy interfaces * pfinet/linux-src/include/linux/netdevice.h (netdevice): Add `change_flags' field. * pfinet/ethernet.c (ethernet_change_flags): Make function static. (setup_ethernet_device): Set `change_flags' field of `dev' to ethernet_change_flags. * pfinet/linux-src/net/core/dev.c (dev_change_flags): Call `change_flags' field of `dev' if non-nul, instead of calling ethernet_change_flags. * pfinet/pfinet.h (ethernet_change_flags): Remove function prototype. --- pfinet/linux-src/include/linux/netdevice.h | 2 ++ pfinet/linux-src/net/core/dev.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'pfinet/linux-src') diff --git a/pfinet/linux-src/include/linux/netdevice.h b/pfinet/linux-src/include/linux/netdevice.h index 86f84a90..0b6af203 100644 --- a/pfinet/linux-src/include/linux/netdevice.h +++ b/pfinet/linux-src/include/linux/netdevice.h @@ -317,6 +317,8 @@ struct device /* Semi-private data. Keep it at the end of device struct. */ struct dst_entry *fastpath[NETDEV_FASTROUTE_HMASK+1]; #endif + + int (*change_flags)(struct device *dev, short flags); }; diff --git a/pfinet/linux-src/net/core/dev.c b/pfinet/linux-src/net/core/dev.c index ff16e827..b47c5027 100644 --- a/pfinet/linux-src/net/core/dev.c +++ b/pfinet/linux-src/net/core/dev.c @@ -1452,8 +1452,8 @@ int dev_change_flags(struct device *dev, unsigned flags) dev_set_allmulti(dev, inc); } - if (!ret) - ret = ethernet_change_flags(dev, dev->flags); + if (!ret && dev->change_flags) + ret = dev->change_flags(dev, dev->flags); return ret; } -- cgit v1.2.3