aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx/atl1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atlx/atl1.c')
-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