diff options
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index fdec773f5b52..07956ecf545e 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -376,15 +376,20 @@ void br_features_recompute(struct net_bridge *br) | |||
376 | features = br->feature_mask & ~NETIF_F_ALL_CSUM; | 376 | features = br->feature_mask & ~NETIF_F_ALL_CSUM; |
377 | 377 | ||
378 | list_for_each_entry(p, &br->port_list, list) { | 378 | list_for_each_entry(p, &br->port_list, list) { |
379 | if (checksum & NETIF_F_NO_CSUM && | 379 | unsigned long feature = p->dev->features; |
380 | !(p->dev->features & NETIF_F_NO_CSUM)) | 380 | |
381 | if (checksum & NETIF_F_NO_CSUM && !(feature & NETIF_F_NO_CSUM)) | ||
381 | checksum ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM; | 382 | checksum ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM; |
382 | if (checksum & NETIF_F_HW_CSUM && | 383 | if (checksum & NETIF_F_HW_CSUM && !(feature & NETIF_F_HW_CSUM)) |
383 | !(p->dev->features & NETIF_F_HW_CSUM)) | ||
384 | checksum ^= NETIF_F_HW_CSUM | NETIF_F_IP_CSUM; | 384 | checksum ^= NETIF_F_HW_CSUM | NETIF_F_IP_CSUM; |
385 | if (!(p->dev->features & NETIF_F_IP_CSUM)) | 385 | if (!(feature & NETIF_F_IP_CSUM)) |
386 | checksum = 0; | 386 | checksum = 0; |
387 | features &= p->dev->features; | 387 | |
388 | if (feature & NETIF_F_GSO) | ||
389 | feature |= NETIF_F_TSO; | ||
390 | feature |= NETIF_F_GSO; | ||
391 | |||
392 | features &= feature; | ||
388 | } | 393 | } |
389 | 394 | ||
390 | br->dev->features = features | checksum | NETIF_F_LLTX; | 395 | br->dev->features = features | checksum | NETIF_F_LLTX; |