diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2015-04-02 11:07:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 14:05:00 -0400 |
commit | 7c4116588b2ad5f45c693e0f12b612b621604c92 (patch) | |
tree | 4b625cb2caab411a9583f2f52c57fc43e95d8b8a /drivers/net/ipvlan/ipvlan_main.c | |
parent | ef5fa6bc46ee516f732d1171323cf3b8524bb8c2 (diff) |
ipvlan: implement ndo_get_iflink
Don't use dev->iflink anymore.
CC: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index 2950c3780230..1701ede2df89 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c | |||
@@ -114,7 +114,6 @@ static int ipvlan_init(struct net_device *dev) | |||
114 | dev->features = phy_dev->features & IPVLAN_FEATURES; | 114 | dev->features = phy_dev->features & IPVLAN_FEATURES; |
115 | dev->features |= NETIF_F_LLTX; | 115 | dev->features |= NETIF_F_LLTX; |
116 | dev->gso_max_size = phy_dev->gso_max_size; | 116 | dev->gso_max_size = phy_dev->gso_max_size; |
117 | dev->iflink = phy_dev->ifindex; | ||
118 | dev->hard_header_len = phy_dev->hard_header_len; | 117 | dev->hard_header_len = phy_dev->hard_header_len; |
119 | 118 | ||
120 | ipvlan_set_lockdep_class(dev); | 119 | ipvlan_set_lockdep_class(dev); |
@@ -305,6 +304,13 @@ static int ipvlan_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, | |||
305 | return 0; | 304 | return 0; |
306 | } | 305 | } |
307 | 306 | ||
307 | static int ipvlan_get_iflink(const struct net_device *dev) | ||
308 | { | ||
309 | struct ipvl_dev *ipvlan = netdev_priv(dev); | ||
310 | |||
311 | return ipvlan->phy_dev->ifindex; | ||
312 | } | ||
313 | |||
308 | static const struct net_device_ops ipvlan_netdev_ops = { | 314 | static const struct net_device_ops ipvlan_netdev_ops = { |
309 | .ndo_init = ipvlan_init, | 315 | .ndo_init = ipvlan_init, |
310 | .ndo_uninit = ipvlan_uninit, | 316 | .ndo_uninit = ipvlan_uninit, |
@@ -317,6 +323,7 @@ static const struct net_device_ops ipvlan_netdev_ops = { | |||
317 | .ndo_get_stats64 = ipvlan_get_stats64, | 323 | .ndo_get_stats64 = ipvlan_get_stats64, |
318 | .ndo_vlan_rx_add_vid = ipvlan_vlan_rx_add_vid, | 324 | .ndo_vlan_rx_add_vid = ipvlan_vlan_rx_add_vid, |
319 | .ndo_vlan_rx_kill_vid = ipvlan_vlan_rx_kill_vid, | 325 | .ndo_vlan_rx_kill_vid = ipvlan_vlan_rx_kill_vid, |
326 | .ndo_get_iflink = ipvlan_get_iflink, | ||
320 | }; | 327 | }; |
321 | 328 | ||
322 | static int ipvlan_hard_header(struct sk_buff *skb, struct net_device *dev, | 329 | static int ipvlan_hard_header(struct sk_buff *skb, struct net_device *dev, |