aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorDavid Decotigny <decot@google.com>2011-04-27 14:32:43 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-29 17:03:03 -0400
commit14ad2513ed5b709e566a853f4b515d91c5d83311 (patch)
tree19ce2e6deefaa0725533612df85c51b99d2513cb /drivers/net/igb/igb_ethtool.c
parentfbef7139a8b89a7f49ba1410593ed894b4c8b017 (diff)
net/igb/e1000/e1000e: more robust ethtool duplex/speed configuration
This makes sure that one cannot request a 99Mbps full-duplex and get a 100Mbps half-duplex configuration in return due to the way the speed/duplex parameters are handled internally. Tested: e1000 works Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r--drivers/net/igb/igb_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 023aa9b10654..6e29634b1fb5 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -224,7 +224,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
224 hw->fc.requested_mode = e1000_fc_default; 224 hw->fc.requested_mode = e1000_fc_default;
225 } else { 225 } else {
226 u32 speed = ethtool_cmd_speed(ecmd); 226 u32 speed = ethtool_cmd_speed(ecmd);
227 if (igb_set_spd_dplx(adapter, speed + ecmd->duplex)) { 227 if (igb_set_spd_dplx(adapter, speed, ecmd->duplex)) {
228 clear_bit(__IGB_RESETTING, &adapter->state); 228 clear_bit(__IGB_RESETTING, &adapter->state);
229 return -EINVAL; 229 return -EINVAL;
230 } 230 }