net: vlan: make non-hw-accel rx path similar to hw-accel
[deliverable/linux.git] / net / 8021q / vlan.c
index 7850412f52b7e23f817969fea24a560bcbdda4e8..14ef5efbc653675ca7b3c23161fbe39f689c669f 100644 (file)
@@ -49,11 +49,6 @@ const char vlan_version[] = DRV_VERSION;
 static const char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
 static const char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
 
-static struct packet_type vlan_packet_type __read_mostly = {
-       .type = cpu_to_be16(ETH_P_8021Q),
-       .func = vlan_skb_recv, /* VLAN receive method */
-};
-
 /* End of global variables definitions. */
 
 static void vlan_group_free(struct vlan_group *grp)
@@ -327,10 +322,6 @@ static void vlan_sync_address(struct net_device *dev,
 static void vlan_transfer_features(struct net_device *dev,
                                   struct net_device *vlandev)
 {
-       u32 old_features = vlandev->features;
-
-       vlandev->features &= ~dev->vlan_features;
-       vlandev->features |= dev->features & dev->vlan_features;
        vlandev->gso_max_size = dev->gso_max_size;
 
        if (dev->features & NETIF_F_HW_VLAN_TX)
@@ -341,8 +332,8 @@ static void vlan_transfer_features(struct net_device *dev,
 #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
        vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
 #endif
-       if (old_features != vlandev->features)
-               netdev_features_change(vlandev);
+
+       netdev_update_features(vlandev);
 }
 
 static void __vlan_device_event(struct net_device *dev, unsigned long event)
@@ -688,7 +679,6 @@ static int __init vlan_proto_init(void)
        if (err < 0)
                goto err4;
 
-       dev_add_pack(&vlan_packet_type);
        vlan_ioctl_set(vlan_ioctl_handler);
        return 0;
 
@@ -709,8 +699,6 @@ static void __exit vlan_cleanup_module(void)
 
        unregister_netdevice_notifier(&vlan_notifier_block);
 
-       dev_remove_pack(&vlan_packet_type);
-
        unregister_pernet_subsys(&vlan_net_ops);
        rcu_barrier(); /* Wait for completion of call_rcu()'s */
 
This page took 0.029724 seconds and 5 git commands to generate.