summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_main.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-04-02 17:07:07 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-02 14:05:01 -0400
commit5aa7add8f14bc29105bca841c053f574c8d232dd (patch)
tree723f39bdcdc7f9bbe101ed6c7de99ab410c64d4f /drivers/infiniband/ulp/ipoib/ipoib_main.c
parent7c4116588b2ad5f45c693e0f12b612b621604c92 (diff)
downloadop-kernel-dev-5aa7add8f14bc29105bca841c053f574c8d232dd.zip
op-kernel-dev-5aa7add8f14bc29105bca841c053f574c8d232dd.tar.gz
infiniband/ipoib: implement ndo_get_iflink
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>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 58b5aa3..657b89b 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -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)
OpenPOWER on IntegriCloud