]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] bonding: incorrect bonding state reported via ioctl
authorAndy Gospodarek <andy@greyhouse.net>
Tue, 21 Nov 2006 16:46:44 +0000 (11:46 -0500)
committerChris Wright <chrisw@sous-sol.org>
Wed, 10 Jan 2007 19:05:17 +0000 (11:05 -0800)
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 <andy@greyhouse.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/bonding/bond_main.c

index 17a461152d39884157e5e138c71b7ed236fc5427..946303bd89ed96e080c21b8cf34c2ce3d2e47694 100644 (file)
@@ -3675,7 +3675,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);