提交 86669530 编写于 作者: J Julia Lawall 提交者: David S. Miller

drivers/net/mlx4: Adjust constant

The values in the advertising field are typically ADVERTISED_xxx, not
SUPPORTED_xxx.  Both SUPPORTED_10000baseT_Full and
ADVERTISED_1000baseT_Full have the same value.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct ethtool_cmd E;
@@
*E.advertising = SUPPORTED_10000baseT_Full
// </smpl>
Signed-off-by: NJulia Lawall <julia@diku.dk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0376d5b2
...@@ -220,7 +220,7 @@ static int mlx4_en_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -220,7 +220,7 @@ static int mlx4_en_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{ {
cmd->autoneg = AUTONEG_DISABLE; cmd->autoneg = AUTONEG_DISABLE;
cmd->supported = SUPPORTED_10000baseT_Full; cmd->supported = SUPPORTED_10000baseT_Full;
cmd->advertising = SUPPORTED_10000baseT_Full; cmd->advertising = ADVERTISED_1000baseT_Full;
if (netif_carrier_ok(dev)) { if (netif_carrier_ok(dev)) {
cmd->speed = SPEED_10000; cmd->speed = SPEED_10000;
cmd->duplex = DUPLEX_FULL; cmd->duplex = DUPLEX_FULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册