Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275082
b: refs/heads/master
c: 589665f
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 4, 2011
1 parent 923fcf4 commit dd7118e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 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: 27d240fdae2808d727ad9ce48ec029731a457524
refs/heads/master: 589665f5a6008dbce1d0af2cb93e94a80bf78151
4 changes: 2 additions & 2 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ static int bond_update_speed_duplex(struct slave *slave)
u32 slave_speed;
int res;

slave->speed = -1;
slave->duplex = -1;
slave->speed = SPEED_UNKNOWN;
slave->duplex = DUPLEX_UNKNOWN;

res = __ethtool_get_settings(slave_dev, &ecmd);
if (res < 0)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/bonding/bond_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ static void bond_info_show_slave(struct seq_file *seq,
seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
seq_printf(seq, "MII Status: %s\n",
(slave->link == BOND_LINK_UP) ? "up" : "down");
if (slave->speed == -1)
if (slave->speed == SPEED_UNKNOWN)
seq_printf(seq, "Speed: %s\n", "Unknown");
else
seq_printf(seq, "Speed: %d Mbps\n", slave->speed);

if (slave->duplex == -1)
if (slave->duplex == DUPLEX_UNKNOWN)
seq_printf(seq, "Duplex: %s\n", "Unknown");
else
seq_printf(seq, "Duplex: %s\n", slave->duplex ? "full" : "half");
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -1097,10 +1097,12 @@ struct ethtool_ops {
#define SPEED_1000 1000
#define SPEED_2500 2500
#define SPEED_10000 10000
#define SPEED_UNKNOWN -1

/* Duplex, half or full. */
#define DUPLEX_HALF 0x00
#define DUPLEX_FULL 0x01
#define DUPLEX_UNKNOWN 0xff

/* Which connector port. */
#define PORT_TP 0x00
Expand Down

0 comments on commit dd7118e

Please sign in to comment.