diff options
| author | Dave Airlie <airlied@redhat.com> | 2017-06-27 07:24:49 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2017-06-27 08:28:30 +1000 |
| commit | 6d61e70ccc21606ffb8a0a03bd3aba24f659502b (patch) | |
| tree | 69f5bfb29d085cc42839445d34170bd3ee4f7408 /include/linux/netdevice.h | |
| parent | 338ffbf7cb5eee0ed4600650d03cd2d7cd1cac9d (diff) | |
| parent | c0bc126f97fb929b3ae02c1c62322645d70eb408 (diff) | |
| download | linux-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.tar.gz linux-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.tar.bz2 linux-6d61e70ccc21606ffb8a0a03bd3aba24f659502b.zip | |
Backmerge tag 'v4.12-rc7' into drm-next
Linux 4.12-rc7
Needed at least rc6 for drm-misc-next-fixes, may as well go to rc7
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3f39d27decf4..4ed952c17fc7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -914,8 +914,7 @@ struct xfrmdev_ops { * * int (*ndo_change_mtu)(struct net_device *dev, int new_mtu); * Called when a user wants to change the Maximum Transfer Unit - * of a device. If not defined, any request to change MTU will - * will return an error. + * of a device. * * void (*ndo_tx_timeout)(struct net_device *dev); * Callback used when the transmitter has not made any progress @@ -1596,8 +1595,8 @@ enum netdev_priv_flags { * @rtnl_link_state: This enum represents the phases of creating * a new link * - * @destructor: Called from unregister, - * can be used to call free_netdev + * @needs_free_netdev: Should unregister perform free_netdev? + * @priv_destructor: Called from unregister * @npinfo: XXX: need comments on this one * @nd_net: Network namespace this network device is inside * @@ -1858,7 +1857,8 @@ struct net_device { RTNL_LINK_INITIALIZING, } rtnl_link_state:16; - void (*destructor)(struct net_device *dev); + bool needs_free_netdev; + void (*priv_destructor)(struct net_device *dev); #ifdef CONFIG_NETPOLL struct netpoll_info __rcu *npinfo; @@ -4261,6 +4261,11 @@ static inline const char *netdev_name(const struct net_device *dev) return dev->name; } +static inline bool netdev_unregistering(const struct net_device *dev) +{ + return dev->reg_state == NETREG_UNREGISTERING; +} + static inline const char *netdev_reg_state(const struct net_device *dev) { switch (dev->reg_state) { |
