diff options
author | Moni Shoua <monis@voltaire.com> | 2007-10-09 22:43:41 -0400 |
---|---|---|
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) |
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 3eebfe287533..7be23364a9d6 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) | |||
1225 | struct slave *slave; | 1225 | struct slave *slave; |
1226 | struct net_device *bond_dev = bond->dev; | 1226 | struct net_device *bond_dev = bond->dev; |
1227 | unsigned long features = bond_dev->features; | 1227 | unsigned long features = bond_dev->features; |
1228 | unsigned short max_hard_header_len = ETH_HLEN; | 1228 | unsigned short max_hard_header_len = max((u16)ETH_HLEN, |
1229 | bond_dev->hard_header_len); | ||
1229 | int i; | 1230 | int i; |
1230 | 1231 | ||
1231 | features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES); | 1232 | features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES); |