提交 cf62cb72 编写于 作者: D Dan Carpenter 提交者: David S. Miller

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3a4e0d6a
...@@ -1482,7 +1482,7 @@ static int xgmac_set_features(struct net_device *dev, netdev_features_t features ...@@ -1482,7 +1482,7 @@ static int xgmac_set_features(struct net_device *dev, netdev_features_t features
u32 ctrl; u32 ctrl;
struct xgmac_priv *priv = netdev_priv(dev); struct xgmac_priv *priv = netdev_priv(dev);
void __iomem *ioaddr = priv->base; void __iomem *ioaddr = priv->base;
u32 changed = dev->features ^ features; netdev_features_t changed = dev->features ^ features;
if (!(changed & NETIF_F_RXCSUM)) if (!(changed & NETIF_F_RXCSUM))
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册