summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@voltaire.com>2008-10-22 15:49:49 -0700
committerRoland Dreier <rolandd@cisco.com>2008-10-22 15:49:49 -0700
commit83bb63f62bda28be88b21216fbb59838a10f2348 (patch)
treeb5e4ab80cf230d663d398ff52c7e71fb594110fb /drivers/infiniband/ulp/ipoib/ipoib_vlan.c
parent70c9c0db549245a49cabf42d5a74688077254d46 (diff)
IPoIB: Set netdev offload features properly for child (VLAN) interfaces
Child devices were created without any offload features set, fix this by moving the code that computes the features into generic function which is now called through non-child and child device creation. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> -- v1 has a bug where the 'result' flag in ipoib_vlan_add may be used uninitialized Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_vlan.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_vlan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
index b08eb56196d3..2cf1a4088718 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
@@ -93,6 +93,10 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
priv->mcast_mtu = priv->admin_mtu = priv->dev->mtu;
set_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags);
+ result = ipoib_set_dev_features(priv, ppriv->ca);
+ if (result)
+ goto device_init_failed;
+
priv->pkey = pkey;
memcpy(priv->dev->dev_addr, ppriv->dev->dev_addr, INFINIBAND_ALEN);