Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / infiniband / ulp / ipoib / ipoib_cm.c
index 93d5580..39913a0 100644 (file)
@@ -1463,8 +1463,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
                set_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags);
                ipoib_warn(priv, "enabling connected mode "
                           "will cause multicast packet drops\n");
-
-               dev->features &= ~(NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO);
+               netdev_update_features(dev);
                rtnl_unlock();
                priv->tx_wr.send_flags &= ~IB_SEND_IP_CSUM;
 
@@ -1474,13 +1473,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
 
        if (!strcmp(buf, "datagram\n")) {
                clear_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags);
-
-               if (test_bit(IPOIB_FLAG_CSUM, &priv->flags)) {
-                       dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
-                       priv->dev->features |= NETIF_F_GRO;
-                       if (priv->hca_caps & IB_DEVICE_UD_TSO)
-                               dev->features |= NETIF_F_TSO;
-               }
+               netdev_update_features(dev);
                dev_set_mtu(dev, min(priv->mcast_mtu, dev->mtu));
                rtnl_unlock();
                ipoib_flush_paths(dev);