projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: Fix disjunct computation of netdev features
[deliverable/linux.git]
/
drivers
/
net
/
bonding
/
bond_main.c
diff --git
a/drivers/net/bonding/bond_main.c
b/drivers/net/bonding/bond_main.c
index 8e2be24f3fe4c2e0f73062092a87f0b03da2f382..832739f38db4cd43adef5cb922430f2b86fb9ceb 100644
(file)
--- a/
drivers/net/bonding/bond_main.c
+++ b/
drivers/net/bonding/bond_main.c
@@
-1341,18
+1341,24
@@
static int bond_compute_features(struct bonding *bond)
int i;
features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
int i;
features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
- features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
- NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
+ features |= NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
+
+ if (!bond->first_slave)
+ goto done;
+
+ features &= ~NETIF_F_ONE_FOR_ALL;
bond_for_each_slave(bond, slave, i) {
bond_for_each_slave(bond, slave, i) {
- features = netdev_compute_features(features,
- slave->dev->features);
+ features = netdev_increment_features(features,
+ slave->dev->features,
+ NETIF_F_ONE_FOR_ALL);
if (slave->dev->hard_header_len > max_hard_header_len)
max_hard_header_len = slave->dev->hard_header_len;
}
if (slave->dev->hard_header_len > max_hard_header_len)
max_hard_header_len = slave->dev->hard_header_len;
}
+done:
features |= (bond_dev->features & BOND_VLAN_FEATURES);
features |= (bond_dev->features & BOND_VLAN_FEATURES);
- bond_dev->features =
features
;
+ bond_dev->features =
netdev_fix_features(features, NULL)
;
bond_dev->hard_header_len = max_hard_header_len;
return 0;
bond_dev->hard_header_len = max_hard_header_len;
return 0;
This page took
0.02913 seconds
and
5
git commands to generate.