This repository was archived by the owner on Dec 20, 2023. It is now read-only.
File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -627,8 +627,6 @@ static void vlan_dev_uninit(struct net_device *dev)
627
627
struct vlan_dev_priv * vlan = vlan_dev_priv (dev );
628
628
int i ;
629
629
630
- free_percpu (vlan -> vlan_pcpu_stats );
631
- vlan -> vlan_pcpu_stats = NULL ;
632
630
for (i = 0 ; i < ARRAY_SIZE (vlan -> egress_priority_map ); i ++ ) {
633
631
while ((pm = vlan -> egress_priority_map [i ]) != NULL ) {
634
632
vlan -> egress_priority_map [i ] = pm -> next ;
@@ -785,6 +783,15 @@ static const struct net_device_ops vlan_netdev_ops = {
785
783
.ndo_get_lock_subclass = vlan_dev_get_lock_subclass ,
786
784
};
787
785
786
+ static void vlan_dev_free (struct net_device * dev )
787
+ {
788
+ struct vlan_dev_priv * vlan = vlan_dev_priv (dev );
789
+
790
+ free_percpu (vlan -> vlan_pcpu_stats );
791
+ vlan -> vlan_pcpu_stats = NULL ;
792
+ free_netdev (dev );
793
+ }
794
+
788
795
void vlan_setup (struct net_device * dev )
789
796
{
790
797
ether_setup (dev );
@@ -794,7 +801,7 @@ void vlan_setup(struct net_device *dev)
794
801
dev -> tx_queue_len = 0 ;
795
802
796
803
dev -> netdev_ops = & vlan_netdev_ops ;
797
- dev -> destructor = free_netdev ;
804
+ dev -> destructor = vlan_dev_free ;
798
805
dev -> ethtool_ops = & vlan_ethtool_ops ;
799
806
800
807
memset (dev -> broadcast , 0 , ETH_ALEN );
You can’t perform that action at this time.
0 commit comments