Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311362
b: refs/heads/master
c: df2bcc4
h: refs/heads/master
v: v3
  • Loading branch information
Amerigo Wang authored and David S. Miller committed Jun 17, 2012
1 parent 1f2520a commit 5c6f45d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: 86a2f415e6cdc5dbb2163b31abf4d36f26f7e3da
refs/heads/master: df2bcc4af2616b18efeaa3d044fe15ce891c5d21
15 changes: 13 additions & 2 deletions trunk/drivers/net/bonding/bond_procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,25 @@ static void bond_info_show_master(struct seq_file *seq)
}
}

static const char *bond_slave_link_status(s8 link)
{
static const char * const status[] = {
[BOND_LINK_UP] = "up",
[BOND_LINK_FAIL] = "going down",
[BOND_LINK_DOWN] = "down",
[BOND_LINK_BACK] = "going back",
};

return status[link];
}

static void bond_info_show_slave(struct seq_file *seq,
const struct slave *slave)
{
struct bonding *bond = seq->private;

seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
seq_printf(seq, "MII Status: %s\n",
(slave->link == BOND_LINK_UP) ? "up" : "down");
seq_printf(seq, "MII Status: %s\n", bond_slave_link_status(slave->link));
if (slave->speed == SPEED_UNKNOWN)
seq_printf(seq, "Speed: %s\n", "Unknown");
else
Expand Down

0 comments on commit 5c6f45d

Please sign in to comment.