Skip to content

Commit

Permalink
tipc: Minor optimization to deactivation of Ethernet media suppot
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Dec 27, 2011
1 parent bfec73d commit 8c12118
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion net/tipc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
4 changes: 0 additions & 4 deletions net/tipc/eth_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8c12118

Please sign in to comment.