Commit be9efd36 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: pass changed flags along with NETDEV_CHANGE event

Use new netdevice notifier infrastructure to pass along changed flags.
Signed-off-by: default avatarTimo Teräs <timo.teras@iki.fi>
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>

v2->v3: shortened notifier_info struct name
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 351638e7
...@@ -1604,6 +1604,11 @@ struct netdev_notifier_info { ...@@ -1604,6 +1604,11 @@ struct netdev_notifier_info {
struct net_device *dev; struct net_device *dev;
}; };
struct netdev_notifier_change_info {
struct netdev_notifier_info info; /* must be first */
unsigned int flags_changed;
};
static inline struct net_device * static inline struct net_device *
netdev_notifier_info_to_dev(const struct netdev_notifier_info *info) netdev_notifier_info_to_dev(const struct netdev_notifier_info *info)
{ {
......
...@@ -4771,8 +4771,13 @@ void __dev_notify_flags(struct net_device *dev, unsigned int old_flags) ...@@ -4771,8 +4771,13 @@ void __dev_notify_flags(struct net_device *dev, unsigned int old_flags)
} }
if (dev->flags & IFF_UP && if (dev->flags & IFF_UP &&
(changes & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | IFF_VOLATILE))) (changes & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | IFF_VOLATILE))) {
call_netdevice_notifiers(NETDEV_CHANGE, dev); struct netdev_notifier_change_info change_info;
change_info.flags_changed = changes;
call_netdevice_notifiers_info(NETDEV_CHANGE, dev,
&change_info.info);
}
} }
/** /**
......
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