|
@@ -6467,9 +6467,9 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
|
|
|
/* UFO needs SG and checksumming */
|
|
/* UFO needs SG and checksumming */
|
|
|
if (features & NETIF_F_UFO) {
|
|
if (features & NETIF_F_UFO) {
|
|
|
/* maybe split UFO into V4 and V6? */
|
|
/* maybe split UFO into V4 and V6? */
|
|
|
- if (!((features & NETIF_F_GEN_CSUM) ||
|
|
|
|
|
- (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
|
|
|
|
|
- == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
|
|
|
|
|
|
|
+ if (!(features & NETIF_F_HW_CSUM) &&
|
|
|
|
|
+ ((features & (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)) !=
|
|
|
|
|
+ (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM))) {
|
|
|
netdev_dbg(dev,
|
|
netdev_dbg(dev,
|
|
|
"Dropping NETIF_F_UFO since no checksum offload features.\n");
|
|
"Dropping NETIF_F_UFO since no checksum offload features.\n");
|
|
|
features &= ~NETIF_F_UFO;
|
|
features &= ~NETIF_F_UFO;
|
|
@@ -7571,7 +7571,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
|
|
|
netdev_features_t netdev_increment_features(netdev_features_t all,
|
|
netdev_features_t netdev_increment_features(netdev_features_t all,
|
|
|
netdev_features_t one, netdev_features_t mask)
|
|
netdev_features_t one, netdev_features_t mask)
|
|
|
{
|
|
{
|
|
|
- if (mask & NETIF_F_GEN_CSUM)
|
|
|
|
|
|
|
+ if (mask & NETIF_F_HW_CSUM)
|
|
|
mask |= NETIF_F_CSUM_MASK;
|
|
mask |= NETIF_F_CSUM_MASK;
|
|
|
mask |= NETIF_F_VLAN_CHALLENGED;
|
|
mask |= NETIF_F_VLAN_CHALLENGED;
|
|
|
|
|
|
|
@@ -7579,8 +7579,8 @@ netdev_features_t netdev_increment_features(netdev_features_t all,
|
|
|
all &= one | ~NETIF_F_ALL_FOR_ALL;
|
|
all &= one | ~NETIF_F_ALL_FOR_ALL;
|
|
|
|
|
|
|
|
/* If one device supports hw checksumming, set for all. */
|
|
/* If one device supports hw checksumming, set for all. */
|
|
|
- if (all & NETIF_F_GEN_CSUM)
|
|
|
|
|
- all &= ~(NETIF_F_CSUM_MASK & ~NETIF_F_GEN_CSUM);
|
|
|
|
|
|
|
+ if (all & NETIF_F_HW_CSUM)
|
|
|
|
|
+ all &= ~(NETIF_F_CSUM_MASK & ~NETIF_F_HW_CSUM);
|
|
|
|
|
|
|
|
return all;
|
|
return all;
|
|
|
}
|
|
}
|