diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2015-04-02 11:07:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 14:05:00 -0400 |
commit | 2dbf6b5058ace6b12e0674b07d59d47177741ae7 (patch) | |
tree | 65b65f1904550345fca304d93459c3ab3be4dd41 /net/8021q | |
parent | ee9b9596a8dd90fc59a910f840a419321be5917b (diff) |
vlan: implement ndo_get_iflink
Don't use dev->iflink anymore.
CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan_dev.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 8b5ab9033b41..01d7ba840df8 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -538,7 +538,6 @@ static int vlan_dev_init(struct net_device *dev) | |||
538 | /* IFF_BROADCAST|IFF_MULTICAST; ??? */ | 538 | /* IFF_BROADCAST|IFF_MULTICAST; ??? */ |
539 | dev->flags = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | | 539 | dev->flags = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | |
540 | IFF_MASTER | IFF_SLAVE); | 540 | IFF_MASTER | IFF_SLAVE); |
541 | dev->iflink = real_dev->ifindex; | ||
542 | dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | | 541 | dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | |
543 | (1<<__LINK_STATE_DORMANT))) | | 542 | (1<<__LINK_STATE_DORMANT))) | |
544 | (1<<__LINK_STATE_PRESENT); | 543 | (1<<__LINK_STATE_PRESENT); |
@@ -733,6 +732,13 @@ static void vlan_dev_netpoll_cleanup(struct net_device *dev) | |||
733 | } | 732 | } |
734 | #endif /* CONFIG_NET_POLL_CONTROLLER */ | 733 | #endif /* CONFIG_NET_POLL_CONTROLLER */ |
735 | 734 | ||
735 | static int vlan_dev_get_iflink(const struct net_device *dev) | ||
736 | { | ||
737 | struct net_device *real_dev = vlan_dev_priv(dev)->real_dev; | ||
738 | |||
739 | return real_dev->ifindex; | ||
740 | } | ||
741 | |||
736 | static const struct ethtool_ops vlan_ethtool_ops = { | 742 | static const struct ethtool_ops vlan_ethtool_ops = { |
737 | .get_settings = vlan_ethtool_get_settings, | 743 | .get_settings = vlan_ethtool_get_settings, |
738 | .get_drvinfo = vlan_ethtool_get_drvinfo, | 744 | .get_drvinfo = vlan_ethtool_get_drvinfo, |
@@ -769,6 +775,7 @@ static const struct net_device_ops vlan_netdev_ops = { | |||
769 | #endif | 775 | #endif |
770 | .ndo_fix_features = vlan_dev_fix_features, | 776 | .ndo_fix_features = vlan_dev_fix_features, |
771 | .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, | 777 | .ndo_get_lock_subclass = vlan_dev_get_lock_subclass, |
778 | .ndo_get_iflink = vlan_dev_get_iflink, | ||
772 | }; | 779 | }; |
773 | 780 | ||
774 | static void vlan_dev_free(struct net_device *dev) | 781 | static void vlan_dev_free(struct net_device *dev) |