Skip to content

Commit

Permalink
net: calxedaxgmac: fix condition in xgmac_set_features()
Browse files Browse the repository at this point in the history
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 <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Apr 25, 2013
1 parent 3a4e0d6 commit cf62cb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/calxeda/xgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cf62cb7

Please sign in to comment.