diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2011-05-27 14:02:48 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-09-17 22:55:06 -0400 |
commit | 18abf0fb6b8f05be2a289abbbc054d4869281476 (patch) | |
tree | 0959d84f446c81fb7a0216d882a066666079a032 /net | |
parent | bcd326e844c46e0533a79f91e75dea160469cf86 (diff) | |
download | linux-18abf0fb6b8f05be2a289abbbc054d4869281476.tar.gz linux-18abf0fb6b8f05be2a289abbbc054d4869281476.tar.bz2 linux-18abf0fb6b8f05be2a289abbbc054d4869281476.zip |
tipc: Remove redundant search when enabling bearer
Removes obsolete code that searches for an Ethernet bearer structure entry
to use for a newly enabled bearer, since this search is now performed
at the start of the enabling algorithm.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/eth_media.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 69bedd8a297b..413b33742a99 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -156,21 +156,15 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) if (!dev) return -ENODEV; - /* Find Ethernet bearer for device (or create one) */ - - while ((eb_ptr != stop) && eb_ptr->dev && (eb_ptr->dev != dev)) - eb_ptr++; - if (eb_ptr == stop) - return -EDQUOT; - if (!eb_ptr->dev) { - eb_ptr->dev = dev; - eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC); - eb_ptr->tipc_packet_type.dev = dev; - eb_ptr->tipc_packet_type.func = recv_msg; - eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr; - INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list)); - dev_add_pack(&eb_ptr->tipc_packet_type); - } + /* Create Ethernet bearer for device */ + + eb_ptr->dev = dev; + eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC); + eb_ptr->tipc_packet_type.dev = dev; + eb_ptr->tipc_packet_type.func = recv_msg; + eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr; + INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list)); + dev_add_pack(&eb_ptr->tipc_packet_type); /* Associate TIPC bearer with Ethernet bearer */ |