diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4ff006c37626..e0f51afec778 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1145,7 +1145,8 @@ int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1145 | } | 1145 | } |
1146 | 1146 | ||
1147 | #define BOND_INTERSECT_FEATURES \ | 1147 | #define BOND_INTERSECT_FEATURES \ |
1148 | (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) | 1148 | (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM|\ |
1149 | NETIF_F_TSO|NETIF_F_UFO) | ||
1149 | 1150 | ||
1150 | /* | 1151 | /* |
1151 | * Compute the common dev->feature set available to all slaves. Some | 1152 | * Compute the common dev->feature set available to all slaves. Some |
@@ -1168,6 +1169,16 @@ static int bond_compute_features(struct bonding *bond) | |||
1168 | NETIF_F_HW_CSUM))) | 1169 | NETIF_F_HW_CSUM))) |
1169 | features &= ~NETIF_F_SG; | 1170 | features &= ~NETIF_F_SG; |
1170 | 1171 | ||
1172 | /* | ||
1173 | * features will include NETIF_F_TSO (NETIF_F_UFO) iff all | ||
1174 | * slave devices support NETIF_F_TSO (NETIF_F_UFO), which | ||
1175 | * implies that all slaves also support scatter-gather | ||
1176 | * (NETIF_F_SG), which implies that features also includes | ||
1177 | * NETIF_F_SG. So no need to check whether we have an | ||
1178 | * illegal combination of NETIF_F_{TSO,UFO} and | ||
1179 | * !NETIF_F_SG | ||
1180 | */ | ||
1181 | |||
1171 | features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES); | 1182 | features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES); |
1172 | bond_dev->features = features; | 1183 | bond_dev->features = features; |
1173 | 1184 | ||
@@ -4080,6 +4091,8 @@ static void bond_ethtool_get_drvinfo(struct net_device *bond_dev, | |||
4080 | 4091 | ||
4081 | static struct ethtool_ops bond_ethtool_ops = { | 4092 | static struct ethtool_ops bond_ethtool_ops = { |
4082 | .get_tx_csum = ethtool_op_get_tx_csum, | 4093 | .get_tx_csum = ethtool_op_get_tx_csum, |
4094 | .get_tso = ethtool_op_get_tso, | ||
4095 | .get_ufo = ethtool_op_get_ufo, | ||
4083 | .get_sg = ethtool_op_get_sg, | 4096 | .get_sg = ethtool_op_get_sg, |
4084 | .get_drvinfo = bond_ethtool_get_drvinfo, | 4097 | .get_drvinfo = bond_ethtool_get_drvinfo, |
4085 | }; | 4098 | }; |