diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-06 00:26:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-06 00:26:41 -0400 |
commit | ce305002e1c9b90c2c151ce18bab0b895dd55ae6 (patch) | |
tree | dce98db82836d00cc45db667ada6b77a86724f13 | |
parent | b3ce0325f2bf1bb737cb8fc7c349ce8fefdd9e40 (diff) |
vlan: Move device unregistration before lower dev cleanup
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>
-rw-r--r-- | net/8021q/vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index b591bfca1ab2..8cae2daeb1cc 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -165,6 +165,8 @@ void unregister_vlan_dev(struct net_device *dev) | |||
165 | 165 | ||
166 | synchronize_net(); | 166 | synchronize_net(); |
167 | 167 | ||
168 | unregister_netdevice(dev); | ||
169 | |||
168 | /* If the group is now empty, kill off the group. */ | 170 | /* If the group is now empty, kill off the group. */ |
169 | if (grp->nr_vlans == 0) { | 171 | if (grp->nr_vlans == 0) { |
170 | if (real_dev->features & NETIF_F_HW_VLAN_RX) | 172 | if (real_dev->features & NETIF_F_HW_VLAN_RX) |
@@ -178,8 +180,6 @@ void unregister_vlan_dev(struct net_device *dev) | |||
178 | 180 | ||
179 | /* Get rid of the vlan's reference to real_dev */ | 181 | /* Get rid of the vlan's reference to real_dev */ |
180 | dev_put(real_dev); | 182 | dev_put(real_dev); |
181 | |||
182 | unregister_netdevice(dev); | ||
183 | } | 183 | } |
184 | 184 | ||
185 | static void vlan_transfer_operstate(const struct net_device *dev, | 185 | static void vlan_transfer_operstate(const struct net_device *dev, |