Skip to content

Commit

Permalink
vlan: Move device unregistration before lower dev cleanup
Browse files Browse the repository at this point in the history
Move the unregister_netdevice() call for the VLAN device before cleanup
for the lower device. This is needed by GVRP so it can send a leave
message before the applicant on the lower device is cleaned up.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 6, 2008
1 parent b3ce032 commit ce30500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ void unregister_vlan_dev(struct net_device *dev)

synchronize_net();

unregister_netdevice(dev);

/* If the group is now empty, kill off the group. */
if (grp->nr_vlans == 0) {
if (real_dev->features & NETIF_F_HW_VLAN_RX)
Expand All @@ -178,8 +180,6 @@ void unregister_vlan_dev(struct net_device *dev)

/* Get rid of the vlan's reference to real_dev */
dev_put(real_dev);

unregister_netdevice(dev);
}

static void vlan_transfer_operstate(const struct net_device *dev,
Expand Down

0 comments on commit ce30500

Please sign in to comment.