diff options
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 8fbcefe10c9f..41a76a05e6fd 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -660,7 +660,7 @@ static int vlan_dev_init(struct net_device *dev) | |||
660 | int subclass = 0; | 660 | int subclass = 0; |
661 | 661 | ||
662 | /* IFF_BROADCAST|IFF_MULTICAST; ??? */ | 662 | /* IFF_BROADCAST|IFF_MULTICAST; ??? */ |
663 | dev->flags = real_dev->flags & ~IFF_UP; | 663 | dev->flags = real_dev->flags & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI); |
664 | dev->iflink = real_dev->ifindex; | 664 | dev->iflink = real_dev->ifindex; |
665 | dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | | 665 | dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | |
666 | (1<<__LINK_STATE_DORMANT))) | | 666 | (1<<__LINK_STATE_DORMANT))) | |
@@ -692,6 +692,20 @@ static int vlan_dev_init(struct net_device *dev) | |||
692 | return 0; | 692 | return 0; |
693 | } | 693 | } |
694 | 694 | ||
695 | static void vlan_dev_uninit(struct net_device *dev) | ||
696 | { | ||
697 | struct vlan_priority_tci_mapping *pm; | ||
698 | struct vlan_dev_info *vlan = vlan_dev_info(dev); | ||
699 | int i; | ||
700 | |||
701 | for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) { | ||
702 | while ((pm = vlan->egress_priority_map[i]) != NULL) { | ||
703 | vlan->egress_priority_map[i] = pm->next; | ||
704 | kfree(pm); | ||
705 | } | ||
706 | } | ||
707 | } | ||
708 | |||
695 | void vlan_setup(struct net_device *dev) | 709 | void vlan_setup(struct net_device *dev) |
696 | { | 710 | { |
697 | ether_setup(dev); | 711 | ether_setup(dev); |
@@ -701,6 +715,7 @@ void vlan_setup(struct net_device *dev) | |||
701 | 715 | ||
702 | dev->change_mtu = vlan_dev_change_mtu; | 716 | dev->change_mtu = vlan_dev_change_mtu; |
703 | dev->init = vlan_dev_init; | 717 | dev->init = vlan_dev_init; |
718 | dev->uninit = vlan_dev_uninit; | ||
704 | dev->open = vlan_dev_open; | 719 | dev->open = vlan_dev_open; |
705 | dev->stop = vlan_dev_stop; | 720 | dev->stop = vlan_dev_stop; |
706 | dev->set_mac_address = vlan_dev_set_mac_address; | 721 | dev->set_mac_address = vlan_dev_set_mac_address; |