aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx
diff options
context:
space:
mode:
authorDavid Decotigny <decot@google.com>2011-04-27 14:32:39 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-29 17:03:00 -0400
commit25db0338813a8915457636b1f6abe6a28fa73f8d (patch)
tree29ea39e45de1342beb4e3c58da0cfbc9915b617e /drivers/net/atlx
parent8ae6daca85c8bbd6a32c382db5e2a2a989f8bed2 (diff)
ethtool: Use full 32 bit speed range in ethtool's set_settings
This makes sure the ethtool's set_settings() callback of network drivers don't ignore the 16 most significant bits when ethtool calls their set_settings(). All drivers compiled with make allyesconfig on x86_64 have been updated. Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atlx')
-rw-r--r--drivers/net/atlx/atl1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index dffa6919a419..37a092fa2ba6 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -3268,7 +3268,8 @@ static int atl1_set_settings(struct net_device *netdev,
3268 if (ecmd->autoneg == AUTONEG_ENABLE) 3268 if (ecmd->autoneg == AUTONEG_ENABLE)
3269 hw->media_type = MEDIA_TYPE_AUTO_SENSOR; 3269 hw->media_type = MEDIA_TYPE_AUTO_SENSOR;
3270 else { 3270 else {
3271 if (ecmd->speed == SPEED_1000) { 3271 u32 speed = ethtool_cmd_speed(ecmd);
3272 if (speed == SPEED_1000) {
3272 if (ecmd->duplex != DUPLEX_FULL) { 3273 if (ecmd->duplex != DUPLEX_FULL) {
3273 if (netif_msg_link(adapter)) 3274 if (netif_msg_link(adapter))
3274 dev_warn(&adapter->pdev->dev, 3275 dev_warn(&adapter->pdev->dev,
@@ -3277,7 +3278,7 @@ static int atl1_set_settings(struct net_device *netdev,
3277 goto exit_sset; 3278 goto exit_sset;
3278 } 3279 }
3279 hw->media_type = MEDIA_TYPE_1000M_FULL; 3280 hw->media_type = MEDIA_TYPE_1000M_FULL;
3280 } else if (ecmd->speed == SPEED_100) { 3281 } else if (speed == SPEED_100) {
3281 if (ecmd->duplex == DUPLEX_FULL) 3282 if (ecmd->duplex == DUPLEX_FULL)
3282 hw->media_type = MEDIA_TYPE_100M_FULL; 3283 hw->media_type = MEDIA_TYPE_100M_FULL;
3283 else 3284 else