From: nsxfreddy@gmail.com Date: Wed, 21 Sep 2005 19:18:04 +0000 (-0500) Subject: [PATCH] bonding: Fix link monitor capability check (was skge: set mac address oops... X-Git-Tag: v2.6.14-rc3~51^2~93 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=552709d5aee9145f325bf07348fb299e84b2e5b3;p=linux-2.6-omap-h63xx.git [PATCH] bonding: Fix link monitor capability check (was skge: set mac address oops with bonding) Fix bond_enslave link monitoring warning to check use_carrier status and ethtool_ops in addition to do_ioctl. This version checks ethtool_ops as well as do_ioctl, and also uses the per-bond params.use_carrier instead of the global use_carrier. Signed-off-by: Jason R. Martin Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 90449a0f2a6..6d00c3de1a8 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1653,7 +1653,8 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de int old_features = bond_dev->features; int res = 0; - if (slave_dev->do_ioctl == NULL) { + if (!bond->params.use_carrier && slave_dev->ethtool_ops == NULL && + slave_dev->do_ioctl == NULL) { printk(KERN_WARNING DRV_NAME ": Warning : no link monitoring support for %s\n", slave_dev->name);