Skip to content

Commit 5aa7add

Browse files
NicolasDichteldavem330
authored andcommitted
infiniband/ipoib: implement ndo_get_iflink
Don't use dev->iflink anymore. CC: Roland Dreier <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7c41165 commit 5aa7add

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/infiniband/ulp/ipoib/ipoib_main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,13 @@ static void ipoib_set_mcast_list(struct net_device *dev)
842842
queue_work(ipoib_workqueue, &priv->restart_task);
843843
}
844844

845+
static int ipoib_get_iflink(const struct net_device *dev)
846+
{
847+
struct ipoib_dev_priv *priv = netdev_priv(dev);
848+
849+
return priv->parent->ifindex;
850+
}
851+
845852
static u32 ipoib_addr_hash(struct ipoib_neigh_hash *htbl, u8 *daddr)
846853
{
847854
/*
@@ -1341,6 +1348,7 @@ static const struct net_device_ops ipoib_netdev_ops = {
13411348
.ndo_start_xmit = ipoib_start_xmit,
13421349
.ndo_tx_timeout = ipoib_timeout,
13431350
.ndo_set_rx_mode = ipoib_set_mcast_list,
1351+
.ndo_get_iflink = ipoib_get_iflink,
13441352
};
13451353

13461354
void ipoib_setup(struct net_device *dev)

drivers/infiniband/ulp/ipoib/ipoib_vlan.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
102102
}
103103

104104
priv->child_type = type;
105-
priv->dev->iflink = ppriv->dev->ifindex;
106105
list_add_tail(&priv->list, &ppriv->child_intfs);
107106

108107
return 0;

0 commit comments

Comments
 (0)