From 4e1400796c93df5e7f92d766e4a4332d0c98795f Mon Sep 17 00:00:00 2001 From: Andy Gospodarek Date: Mon, 4 Dec 2006 15:04:54 -0800 Subject: [PATCH] [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: Andy Gospodarek Cc: Jeff Garzik Cc: Stephen Hemminger Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 488d8ed9e740..6482aed4bb7c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3684,7 +3684,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd mii->val_out = 0; read_lock_bh(&bond->lock); read_lock(&bond->curr_slave_lock); - if (bond->curr_active_slave) { + if (netif_carrier_ok(bond->dev)) { mii->val_out = BMSR_LSTATUS; } read_unlock(&bond->curr_slave_lock); -- 2.39.5