aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-19 14:58:29 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:41 -0500
commit8c12118db77dce5a7abf1a0e87af56592fdd7c09 (patch)
tree77d267ff594515bbe59b01c338c26d8c4d39aec2
parentbfec73d7e45cdf570d649a547050295789e1e6fb (diff)
tipc: Minor optimization to deactivation of Ethernet media suppot
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>
-rw-r--r--net/tipc/core.c2
-rw-r--r--net/tipc/eth_media.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/net/tipc/core.c b/net/tipc/core.c
index c21331d58fdb..2691cd57b8a8 100644
--- a/net/tipc/core.c
+++ b/net/tipc/core.c
@@ -99,8 +99,8 @@ struct sk_buff *tipc_buf_acquire(u32 size)
99 99
100static void tipc_core_stop_net(void) 100static void tipc_core_stop_net(void)
101{ 101{
102 tipc_eth_media_stop();
103 tipc_net_stop(); 102 tipc_net_stop();
103 tipc_eth_media_stop();
104} 104}
105 105
106/** 106/**
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index 3b75c0d656d9..23bf67b1f010 100644
--- a/net/tipc/eth_media.c
+++ b/net/tipc/eth_media.c
@@ -376,10 +376,6 @@ void tipc_eth_media_stop(void)
376 376
377 unregister_netdevice_notifier(&notifier); 377 unregister_netdevice_notifier(&notifier);
378 for (i = 0; i < MAX_ETH_BEARERS ; i++) { 378 for (i = 0; i < MAX_ETH_BEARERS ; i++) {
379 if (eth_bearers[i].bearer) {
380 eth_bearers[i].bearer->blocked = 1;
381 eth_bearers[i].bearer = NULL;
382 }
383 if (eth_bearers[i].dev) { 379 if (eth_bearers[i].dev) {
384 dev_remove_pack(&eth_bearers[i].tipc_packet_type); 380 dev_remove_pack(&eth_bearers[i].tipc_packet_type);
385 dev_put(eth_bearers[i].dev); 381 dev_put(eth_bearers[i].dev);