]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tipc: Minor optimization to deactivation of Ethernet media suppot
authorAllan Stephens <allan.stephens@windriver.com>
Wed, 19 Oct 2011 18:58:29 +0000 (14:58 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 27 Dec 2011 16:33:41 +0000 (11:33 -0500)
Change TIPC's shutdown code to deactivate generic networking support
before terminating Ethernet media support. The deactivation of generic
networking support causes all existing bearers to be destroyed, meaning
the Ethernet media termination routine no longer has to bother marking
them as unavailable.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/core.c
net/tipc/eth_media.c

index c21331d58fdb5d5839b1f9669757e45420dcb8fd..2691cd57b8a8244b89857c043631445d55d031ab 100644 (file)
@@ -99,8 +99,8 @@ struct sk_buff *tipc_buf_acquire(u32 size)
 
 static void tipc_core_stop_net(void)
 {
-       tipc_eth_media_stop();
        tipc_net_stop();
+       tipc_eth_media_stop();
 }
 
 /**
index 3b75c0d656d932d7f7608e45a333bccdf0cda0e0..23bf67b1f0100fbe48d2d4e83dbb8950899d800d 100644 (file)
@@ -376,10 +376,6 @@ void tipc_eth_media_stop(void)
 
        unregister_netdevice_notifier(&notifier);
        for (i = 0; i < MAX_ETH_BEARERS ; i++) {
-               if (eth_bearers[i].bearer) {
-                       eth_bearers[i].bearer->blocked = 1;
-                       eth_bearers[i].bearer = NULL;
-               }
                if (eth_bearers[i].dev) {
                        dev_remove_pack(&eth_bearers[i].tipc_packet_type);
                        dev_put(eth_bearers[i].dev);