From: Dan Carpenter Date: Thu, 25 Apr 2013 07:44:20 +0000 (+0300) Subject: net: calxedaxgmac: fix condition in xgmac_set_features() X-Git-Tag: firefly_0821_release~3680^2~548^2~38 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cf62cb72d63944f4dcc7376efd84959afc9366cb;p=firefly-linux-kernel-4.4.55.git net: calxedaxgmac: fix condition in xgmac_set_features() The "changed" variable should be a 64 bit type, otherwise it can't store all the features. The way the code is now the test for whether NETIF_F_RXCSUM changed is always false and we return immediately. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c index 791e5ff305d8..4a1f2fa812ab 100644 --- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c @@ -1482,7 +1482,7 @@ static int xgmac_set_features(struct net_device *dev, netdev_features_t features u32 ctrl; struct xgmac_priv *priv = netdev_priv(dev); void __iomem *ioaddr = priv->base; - u32 changed = dev->features ^ features; + netdev_features_t changed = dev->features ^ features; if (!(changed & NETIF_F_RXCSUM)) return 0;