infiniband/ipoib: implement ndo_get_iflink
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 2 Apr 2015 15:07:07 +0000 (17:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Apr 2015 18:05:01 +0000 (14:05 -0400)
Don't use dev->iflink anymore.

CC: Roland Dreier <roland@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_vlan.c

index 58b5aa3b6f2dded5d2e6d15aff080551aa9eddd9..657b89b1d291c90c76c57f8d4b8183b87c61aaad 100644 (file)
@@ -842,6 +842,13 @@ static void ipoib_set_mcast_list(struct net_device *dev)
        queue_work(ipoib_workqueue, &priv->restart_task);
 }
 
+static int ipoib_get_iflink(const struct net_device *dev)
+{
+       struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+       return priv->parent->ifindex;
+}
+
 static u32 ipoib_addr_hash(struct ipoib_neigh_hash *htbl, u8 *daddr)
 {
        /*
@@ -1341,6 +1348,7 @@ static const struct net_device_ops ipoib_netdev_ops = {
        .ndo_start_xmit          = ipoib_start_xmit,
        .ndo_tx_timeout          = ipoib_timeout,
        .ndo_set_rx_mode         = ipoib_set_mcast_list,
+       .ndo_get_iflink          = ipoib_get_iflink,
 };
 
 void ipoib_setup(struct net_device *dev)
index 9fad7b5ac8b91910af7e6b1527f20165323e7dc8..4dd1313056a42169ecbe7211bc0fd750d5d9f88e 100644 (file)
@@ -102,7 +102,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
        }
 
        priv->child_type  = type;
-       priv->dev->iflink = ppriv->dev->ifindex;
        list_add_tail(&priv->list, &ppriv->child_intfs);
 
        return 0;