net: calxedaxgmac: fix condition in xgmac_set_features()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
drivers/net/ethernet/calxeda/xgmac.c +1 -1
@@ -1482,7 +1482,7 @@ static int xgmac_set_features(struct net_device *dev, netdev_features_t featuresu32 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 ;
From: Dan Carpenter <[email protected]>
Date: Thu, 25 Apr 2013 10:44:20 +0300
Quoted 5 lines
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_RXCSUMchanged is always false and we return immediately.Signed-off-by Dan Carpenter <[email protected]>
Applied, thanks Dan.