aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2015-12-03 12:12:11 +0100
committerDavid S. Miller <davem@davemloft.net>2015-12-03 11:49:25 -0500
commit29bf24afb29042f568fa67b1b0eee46796725ed2 (patch)
tree865e593be107511f4032b41c09fd252e317cd540 /include/linux
parentnet: propagate upper priv via netdev_master_upper_dev_link (diff)
downloadlinux-dev-29bf24afb29042f568fa67b1b0eee46796725ed2.tar.xz
linux-dev-29bf24afb29042f568fa67b1b0eee46796725ed2.zip
net: add possibility to pass information about upper device via notifier
Sometimes the drivers and other code would find it handy to know some internal information about upper device being changed. So allow upper-code to pass information down to notifier listeners during linking. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 939b8f3de810..aea556c64f2c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2163,6 +2163,7 @@ struct netdev_notifier_changeupper_info {
struct net_device *upper_dev; /* new upper dev */
bool master; /* is upper dev master */
bool linking; /* is the nofication for link or unlink */
+ void *upper_info; /* upper dev info */
};
static inline void netdev_notifier_info_init(struct netdev_notifier_info *info,
@@ -3620,7 +3621,7 @@ struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev);
int netdev_master_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev,
- void *upper_priv);
+ void *upper_priv, void *upper_info);
void netdev_upper_dev_unlink(struct net_device *dev,
struct net_device *upper_dev);
void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);