aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-05-27 21:30:21 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-28 16:11:01 -0400
commit351638e7deeed2ec8ce451b53d33921b3da68f83 (patch)
tree175dfff289b5e3baecffbc7e97d1884e9a18345c /include/linux/netdevice.h
parentb1098bbe1b24d5d90cff92fbd716d2ef4bed2cff (diff)
net: pass info struct via netdevice notifier
So far, only net_device * could be passed along with netdevice notifier event. This patch provides a possibility to pass custom structure able to provide info that event listener needs to know. Signed-off-by: Jiri Pirko <jiri@resnulli.us> v2->v3: fix typo on simeth shortened dev_getter shortened notifier_info struct name v1->v2: fix notifier_call parameter in call_netdevice_notifier() Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 6b2bb460d1d7..13a34848b5e1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1599,6 +1599,19 @@ struct packet_offload {
1599 1599
1600extern int register_netdevice_notifier(struct notifier_block *nb); 1600extern int register_netdevice_notifier(struct notifier_block *nb);
1601extern int unregister_netdevice_notifier(struct notifier_block *nb); 1601extern int unregister_netdevice_notifier(struct notifier_block *nb);
1602
1603struct netdev_notifier_info {
1604 struct net_device *dev;
1605};
1606
1607static inline struct net_device *
1608netdev_notifier_info_to_dev(const struct netdev_notifier_info *info)
1609{
1610 return info->dev;
1611}
1612
1613extern int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev,
1614 struct netdev_notifier_info *info);
1602extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); 1615extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1603 1616
1604 1617