aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/eth_media.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-05-27 14:02:48 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-17 22:55:06 -0400
commit18abf0fb6b8f05be2a289abbbc054d4869281476 (patch)
tree0959d84f446c81fb7a0216d882a066666079a032 /net/tipc/eth_media.c
parentbcd326e844c46e0533a79f91e75dea160469cf86 (diff)
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/tipc/eth_media.c')
-rw-r--r--net/tipc/eth_media.c24
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)
156 if (!dev) 156 if (!dev)
157 return -ENODEV; 157 return -ENODEV;
158 158
159 /* Find Ethernet bearer for device (or create one) */ 159 /* Create Ethernet bearer for device */
160 160
161 while ((eb_ptr != stop) && eb_ptr->dev && (eb_ptr->dev != dev)) 161 eb_ptr->dev = dev;
162 eb_ptr++; 162 eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC);
163 if (eb_ptr == stop) 163 eb_ptr->tipc_packet_type.dev = dev;
164 return -EDQUOT; 164 eb_ptr->tipc_packet_type.func = recv_msg;
165 if (!eb_ptr->dev) { 165 eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr;
166 eb_ptr->dev = dev; 166 INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list));
167 eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC); 167 dev_add_pack(&eb_ptr->tipc_packet_type);
168 eb_ptr->tipc_packet_type.dev = dev;
169 eb_ptr->tipc_packet_type.func = recv_msg;
170 eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr;
171 INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list));
172 dev_add_pack(&eb_ptr->tipc_packet_type);
173 }
174 168
175 /* Associate TIPC bearer with Ethernet bearer */ 169 /* Associate TIPC bearer with Ethernet bearer */
176 170