diff options
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 71193a6b10e6..89a3bbdfca3f 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -593,6 +593,8 @@ static const struct header_ops vlan_header_ops = { | |||
593 | .parse = eth_header_parse, | 593 | .parse = eth_header_parse, |
594 | }; | 594 | }; |
595 | 595 | ||
596 | static const struct net_device_ops vlan_netdev_ops, vlan_netdev_accel_ops; | ||
597 | |||
596 | static int vlan_dev_init(struct net_device *dev) | 598 | static int vlan_dev_init(struct net_device *dev) |
597 | { | 599 | { |
598 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; | 600 | struct net_device *real_dev = vlan_dev_info(dev)->real_dev; |
@@ -619,11 +621,11 @@ static int vlan_dev_init(struct net_device *dev) | |||
619 | if (real_dev->features & NETIF_F_HW_VLAN_TX) { | 621 | if (real_dev->features & NETIF_F_HW_VLAN_TX) { |
620 | dev->header_ops = real_dev->header_ops; | 622 | dev->header_ops = real_dev->header_ops; |
621 | dev->hard_header_len = real_dev->hard_header_len; | 623 | dev->hard_header_len = real_dev->hard_header_len; |
622 | dev->hard_start_xmit = vlan_dev_hwaccel_hard_start_xmit; | 624 | dev->netdev_ops = &vlan_netdev_accel_ops; |
623 | } else { | 625 | } else { |
624 | dev->header_ops = &vlan_header_ops; | 626 | dev->header_ops = &vlan_header_ops; |
625 | dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN; | 627 | dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN; |
626 | dev->hard_start_xmit = vlan_dev_hard_start_xmit; | 628 | dev->netdev_ops = &vlan_netdev_ops; |
627 | } | 629 | } |
628 | 630 | ||
629 | if (is_vlan_dev(real_dev)) | 631 | if (is_vlan_dev(real_dev)) |
@@ -704,6 +706,22 @@ static const struct net_device_ops vlan_netdev_ops = { | |||
704 | .ndo_uninit = vlan_dev_uninit, | 706 | .ndo_uninit = vlan_dev_uninit, |
705 | .ndo_open = vlan_dev_open, | 707 | .ndo_open = vlan_dev_open, |
706 | .ndo_stop = vlan_dev_stop, | 708 | .ndo_stop = vlan_dev_stop, |
709 | .ndo_start_xmit = vlan_dev_hard_start_xmit, | ||
710 | .ndo_validate_addr = eth_validate_addr, | ||
711 | .ndo_set_mac_address = vlan_dev_set_mac_address, | ||
712 | .ndo_set_rx_mode = vlan_dev_set_rx_mode, | ||
713 | .ndo_set_multicast_list = vlan_dev_set_rx_mode, | ||
714 | .ndo_change_rx_flags = vlan_dev_change_rx_flags, | ||
715 | .ndo_do_ioctl = vlan_dev_ioctl, | ||
716 | }; | ||
717 | |||
718 | static const struct net_device_ops vlan_netdev_accel_ops = { | ||
719 | .ndo_change_mtu = vlan_dev_change_mtu, | ||
720 | .ndo_init = vlan_dev_init, | ||
721 | .ndo_uninit = vlan_dev_uninit, | ||
722 | .ndo_open = vlan_dev_open, | ||
723 | .ndo_stop = vlan_dev_stop, | ||
724 | .ndo_start_xmit = vlan_dev_hwaccel_hard_start_xmit, | ||
707 | .ndo_validate_addr = eth_validate_addr, | 725 | .ndo_validate_addr = eth_validate_addr, |
708 | .ndo_set_mac_address = vlan_dev_set_mac_address, | 726 | .ndo_set_mac_address = vlan_dev_set_mac_address, |
709 | .ndo_set_rx_mode = vlan_dev_set_rx_mode, | 727 | .ndo_set_rx_mode = vlan_dev_set_rx_mode, |