diff options
author | Moni Shoua <monis@voltaire.com> | 2007-10-09 19:43:41 -0700 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-15 14:20:46 -0400 |
commit | 3158bf7d414b69fdc0c715d0a4d82e12b74ef974 (patch) | |
tree | 48fceb771712a8b93ae02269facd29de7d37f70c /drivers/net/bonding/bond_main.c | |
parent | 6b1bf096508c870889c2be63c7757a04d72116fe (diff) | |
download | op-kernel-dev-3158bf7d414b69fdc0c715d0a4d82e12b74ef974.zip op-kernel-dev-3158bf7d414b69fdc0c715d0a4d82e12b74ef974.tar.gz |
net/bonding: Handlle wrong assumptions that slave is always an Ethernet device
bonding sometimes uses Ethernet constants (such as MTU and address length) which
are not good when it enslaves non Ethernet devices (such as InfiniBand).
Signed-off-by: Moni Shoua <monis at voltaire.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3eebfe2..7be2336 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1225,7 +1225,8 @@ static int bond_compute_features(struct bonding *bond) struct slave *slave; struct net_device *bond_dev = bond->dev; unsigned long features = bond_dev->features; - unsigned short max_hard_header_len = ETH_HLEN; + unsigned short max_hard_header_len = max((u16)ETH_HLEN, + bond_dev->hard_header_len); int i; features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES); |