aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 0e3b2d3e2339..4ae0d7ef62c1 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -692,6 +692,20 @@ static int vlan_dev_init(struct net_device *dev)
692 return 0; 692 return 0;
693} 693}
694 694
695static 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
695void vlan_setup(struct net_device *dev) 709void 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;