diff options
author | David Decotigny <decot@google.com> | 2011-04-27 14:32:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-29 17:03:01 -0400 |
commit | 707394972093e2056e1e8cc39be19cf9bcb3e7b3 (patch) | |
tree | f6dc95219bca6895adf304b79241e9d60561f8f5 /drivers/net/ns83820.c | |
parent | 25db0338813a8915457636b1f6abe6a28fa73f8d (diff) |
ethtool: cosmetic: Use ethtool ethtool_cmd_speed API
This updates the network drivers so that they don't access the
ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
instead.
For most of the drivers, these changes are purely cosmetic and don't
fix any problem, such as for those 1GbE/10GbE drivers that indirectly
call their own ethtool get_settings()/mii_ethtool_gset(). The changes
are meant to enforce code consistency and provide robustness with
future larger throughputs, at the expense of a few CPU cycles for each
ethtool operation.
All drivers compiled with make allyesconfig ion x86_64 have been
updated.
Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r-- | drivers/net/ns83820.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 6667e0667a88..3e4040f2f3cb 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -1251,7 +1251,7 @@ static int ns83820_get_settings(struct net_device *ndev, | |||
1251 | /* | 1251 | /* |
1252 | * Here's the list of available ethtool commands from other drivers: | 1252 | * Here's the list of available ethtool commands from other drivers: |
1253 | * cmd->advertising = | 1253 | * cmd->advertising = |
1254 | * cmd->speed = | 1254 | * ethtool_cmd_speed_set(cmd, ...) |
1255 | * cmd->duplex = | 1255 | * cmd->duplex = |
1256 | * cmd->port = 0; | 1256 | * cmd->port = 0; |
1257 | * cmd->phy_address = | 1257 | * cmd->phy_address = |
@@ -1289,13 +1289,13 @@ static int ns83820_get_settings(struct net_device *ndev, | |||
1289 | cmd->duplex = fullduplex ? DUPLEX_FULL : DUPLEX_HALF; | 1289 | cmd->duplex = fullduplex ? DUPLEX_FULL : DUPLEX_HALF; |
1290 | switch (cfg / CFG_SPDSTS0 & 3) { | 1290 | switch (cfg / CFG_SPDSTS0 & 3) { |
1291 | case 2: | 1291 | case 2: |
1292 | cmd->speed = SPEED_1000; | 1292 | ethtool_cmd_speed_set(cmd, SPEED_1000); |
1293 | break; | 1293 | break; |
1294 | case 1: | 1294 | case 1: |
1295 | cmd->speed = SPEED_100; | 1295 | ethtool_cmd_speed_set(cmd, SPEED_100); |
1296 | break; | 1296 | break; |
1297 | default: | 1297 | default: |
1298 | cmd->speed = SPEED_10; | 1298 | ethtool_cmd_speed_set(cmd, SPEED_10); |
1299 | break; | 1299 | break; |
1300 | } | 1300 | } |
1301 | cmd->autoneg = (tbicr & TBICR_MR_AN_ENABLE) | 1301 | cmd->autoneg = (tbicr & TBICR_MR_AN_ENABLE) |