Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247041
b: refs/heads/master
c: fbef713
h: refs/heads/master
i:
  247039: 26842f2
v: v3
  • Loading branch information
David Decotigny authored and David S. Miller committed Apr 29, 2011
1 parent 2592f32 commit a3b23a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1258c076edcf4a253657320cfc2bd24fd5981d79
refs/heads/master: fbef7139a8b89a7f49ba1410593ed894b4c8b017
10 changes: 3 additions & 7 deletions trunk/drivers/net/tulip/de2104x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,18 +1518,17 @@ static int __de_get_settings(struct de_private *de, struct ethtool_cmd *ecmd)
switch (de->media_type) {
case DE_MEDIA_AUI:
ecmd->port = PORT_AUI;
ethtool_cmd_speed_set(ecmd, 5);
break;
case DE_MEDIA_BNC:
ecmd->port = PORT_BNC;
ethtool_cmd_speed_set(ecmd, 2);
break;
default:
ecmd->port = PORT_TP;
ethtool_cmd_speed_set(ecmd, SPEED_10);
break;
}

ethtool_cmd_speed_set(ecmd, 10);

if (dr32(MacMode) & FullDuplex)
ecmd->duplex = DUPLEX_FULL;
else
Expand All @@ -1549,11 +1548,8 @@ static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd)
{
u32 new_media;
unsigned int media_lock;
u32 speed = ethtool_cmd_speed(ecmd);

if (speed != SPEED_10 && speed != 5 && speed != 2)
return -EINVAL;
if (de->de21040 && speed == 2)
if (ethtool_cmd_speed(ecmd) != 10)
return -EINVAL;
if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
return -EINVAL;
Expand Down

0 comments on commit a3b23a5

Please sign in to comment.