Commit 198a9f8d authored by Andy Gospodarek's avatar Andy Gospodarek Committed by Chris Wright

[PATCH] bonding: incorrect bonding state reported via ioctl

This is a small fix-up to finish out the work done by Jay Vosburgh to
add carrier-state support for bonding devices.  The output in
/proc/net/bonding/bondX was correct, but when collecting the same info
via an iotcl it could still be incorrect.
Signed-off-by: default avatarAndy Gospodarek <andy@greyhouse.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 6cfea1e1
...@@ -3547,7 +3547,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd ...@@ -3547,7 +3547,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
mii->val_out = 0; mii->val_out = 0;
read_lock_bh(&bond->lock); read_lock_bh(&bond->lock);
read_lock(&bond->curr_slave_lock); read_lock(&bond->curr_slave_lock);
if (bond->curr_active_slave) { if (netif_carrier_ok(bond->dev)) {
mii->val_out = BMSR_LSTATUS; mii->val_out = BMSR_LSTATUS;
} }
read_unlock(&bond->curr_slave_lock); read_unlock(&bond->curr_slave_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment