diff options
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 67ce5bd3b56a..19db03dbbd00 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -616,15 +616,16 @@ static inline bool skb_vlan_tagged_multi(const struct sk_buff *skb) | |||
616 | static inline netdev_features_t vlan_features_check(const struct sk_buff *skb, | 616 | static inline netdev_features_t vlan_features_check(const struct sk_buff *skb, |
617 | netdev_features_t features) | 617 | netdev_features_t features) |
618 | { | 618 | { |
619 | if (skb_vlan_tagged_multi(skb)) | 619 | if (skb_vlan_tagged_multi(skb)) { |
620 | features = netdev_intersect_features(features, | 620 | /* In the case of multi-tagged packets, use a direct mask |
621 | NETIF_F_SG | | 621 | * instead of using netdev_interesect_features(), to make |
622 | NETIF_F_HIGHDMA | | 622 | * sure that only devices supporting NETIF_F_HW_CSUM will |
623 | NETIF_F_FRAGLIST | | 623 | * have checksum offloading support. |
624 | NETIF_F_GEN_CSUM | | 624 | */ |
625 | NETIF_F_HW_VLAN_CTAG_TX | | 625 | features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | |
626 | NETIF_F_HW_VLAN_STAG_TX); | 626 | NETIF_F_FRAGLIST | NETIF_F_HW_VLAN_CTAG_TX | |
627 | 627 | NETIF_F_HW_VLAN_STAG_TX; | |
628 | } | ||
628 | return features; | 629 | return features; |
629 | } | 630 | } |
630 | 631 | ||