Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122860
b: refs/heads/master
c: f7d1b9f
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Dec 26, 2008
1 parent 9a528f2 commit bcb9d5a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d45227391c70ea12ec129ebfa97841e9b7ff34fd
refs/heads/master: f7d1b9f5aafa371d7f51f644aa3c38bc914e9205
22 changes: 20 additions & 2 deletions trunk/net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,8 @@ static const struct header_ops vlan_header_ops = {
.parse = eth_header_parse,
};

static const struct net_device_ops vlan_netdev_ops, vlan_netdev_accel_ops;

static int vlan_dev_init(struct net_device *dev)
{
struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
Expand All @@ -619,11 +621,11 @@ static int vlan_dev_init(struct net_device *dev)
if (real_dev->features & NETIF_F_HW_VLAN_TX) {
dev->header_ops = real_dev->header_ops;
dev->hard_header_len = real_dev->hard_header_len;
dev->hard_start_xmit = vlan_dev_hwaccel_hard_start_xmit;
dev->netdev_ops = &vlan_netdev_accel_ops;
} else {
dev->header_ops = &vlan_header_ops;
dev->hard_header_len = real_dev->hard_header_len + VLAN_HLEN;
dev->hard_start_xmit = vlan_dev_hard_start_xmit;
dev->netdev_ops = &vlan_netdev_ops;
}

if (is_vlan_dev(real_dev))
Expand Down Expand Up @@ -704,6 +706,22 @@ static const struct net_device_ops vlan_netdev_ops = {
.ndo_uninit = vlan_dev_uninit,
.ndo_open = vlan_dev_open,
.ndo_stop = vlan_dev_stop,
.ndo_start_xmit = vlan_dev_hard_start_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = vlan_dev_set_mac_address,
.ndo_set_rx_mode = vlan_dev_set_rx_mode,
.ndo_set_multicast_list = vlan_dev_set_rx_mode,
.ndo_change_rx_flags = vlan_dev_change_rx_flags,
.ndo_do_ioctl = vlan_dev_ioctl,
};

static const struct net_device_ops vlan_netdev_accel_ops = {
.ndo_change_mtu = vlan_dev_change_mtu,
.ndo_init = vlan_dev_init,
.ndo_uninit = vlan_dev_uninit,
.ndo_open = vlan_dev_open,
.ndo_stop = vlan_dev_stop,
.ndo_start_xmit = vlan_dev_hwaccel_hard_start_xmit,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = vlan_dev_set_mac_address,
.ndo_set_rx_mode = vlan_dev_set_rx_mode,
Expand Down

0 comments on commit bcb9d5a

Please sign in to comment.