diff options
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 7ea5cf9ea08a..934e221c1d07 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * 2 of the License, or (at your option) any later version. | 20 | * 2 of the License, or (at your option) any later version. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #include <linux/module.h> | 25 | #include <linux/module.h> |
24 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
25 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
@@ -55,7 +57,7 @@ static int vlan_dev_rebuild_header(struct sk_buff *skb) | |||
55 | return arp_find(veth->h_dest, skb); | 57 | return arp_find(veth->h_dest, skb); |
56 | #endif | 58 | #endif |
57 | default: | 59 | default: |
58 | pr_debug("%s: unable to resolve type %X addresses.\n", | 60 | pr_debug("%s: unable to resolve type %X addresses\n", |
59 | dev->name, ntohs(veth->h_vlan_encapsulated_proto)); | 61 | dev->name, ntohs(veth->h_vlan_encapsulated_proto)); |
60 | 62 | ||
61 | memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); | 63 | memcpy(veth->h_source, dev->dev_addr, ETH_ALEN); |
@@ -528,7 +530,11 @@ static int vlan_dev_init(struct net_device *dev) | |||
528 | (1<<__LINK_STATE_DORMANT))) | | 530 | (1<<__LINK_STATE_DORMANT))) | |
529 | (1<<__LINK_STATE_PRESENT); | 531 | (1<<__LINK_STATE_PRESENT); |
530 | 532 | ||
531 | dev->hw_features = NETIF_F_ALL_TX_OFFLOADS; | 533 | dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG | |
534 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | | ||
535 | NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM | | ||
536 | NETIF_F_ALL_FCOE; | ||
537 | |||
532 | dev->features |= real_dev->vlan_features | NETIF_F_LLTX; | 538 | dev->features |= real_dev->vlan_features | NETIF_F_LLTX; |
533 | dev->gso_max_size = real_dev->gso_max_size; | 539 | dev->gso_max_size = real_dev->gso_max_size; |
534 | 540 | ||
@@ -586,9 +592,13 @@ static void vlan_dev_uninit(struct net_device *dev) | |||
586 | static u32 vlan_dev_fix_features(struct net_device *dev, u32 features) | 592 | static u32 vlan_dev_fix_features(struct net_device *dev, u32 features) |
587 | { | 593 | { |
588 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 594 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; |
595 | u32 old_features = features; | ||
589 | 596 | ||
590 | features &= real_dev->features; | 597 | features &= real_dev->features; |
591 | features &= real_dev->vlan_features; | 598 | features &= real_dev->vlan_features; |
599 | |||
600 | features |= old_features & NETIF_F_SOFT_FEATURES; | ||
601 | |||
592 | if (dev_ethtool_get_rx_csum(real_dev)) | 602 | if (dev_ethtool_get_rx_csum(real_dev)) |
593 | features |= NETIF_F_RXCSUM; | 603 | features |= NETIF_F_RXCSUM; |
594 | features |= NETIF_F_LLTX; | 604 | features |= NETIF_F_LLTX; |