@@ -2562,7 +2562,6 @@ static int ravb_set_features_gbeth(struct net_device *ndev,
goto done;
}
- ndev->features = features;
done:
spin_unlock_irqrestore(&priv->lock, flags);
@@ -2577,8 +2576,6 @@ static int ravb_set_features_rcar(struct net_device *ndev,
if (changed & NETIF_F_RXCSUM)
ravb_set_rx_csum(ndev, features & NETIF_F_RXCSUM);
- ndev->features = features;
-
return 0;
}
@@ -2587,8 +2584,15 @@ static int ravb_set_features(struct net_device *ndev,
{
struct ravb_private *priv = netdev_priv(ndev);
const struct ravb_hw_info *info = priv->info;
+ int ret;
+
+ ret = info->set_feature(ndev, features);
+ if (ret)
+ return ret;
- return info->set_feature(ndev, features);
+ ndev->features = features;
+
+ return 0;
}
static const struct net_device_ops ravb_netdev_ops = {