Commit 18abf0fb authored by Allan Stephens's avatar Allan Stephens Committed by Paul Gortmaker

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: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent bcd326e8
...@@ -156,13 +156,8 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) ...@@ -156,13 +156,8 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
if (!dev) if (!dev)
return -ENODEV; return -ENODEV;
/* Find Ethernet bearer for device (or create one) */ /* Create Ethernet bearer for device */
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->dev = dev;
eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC); eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC);
eb_ptr->tipc_packet_type.dev = dev; eb_ptr->tipc_packet_type.dev = dev;
...@@ -170,7 +165,6 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) ...@@ -170,7 +165,6 @@ static int enable_bearer(struct tipc_bearer *tb_ptr)
eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr; eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr;
INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list)); INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list));
dev_add_pack(&eb_ptr->tipc_packet_type); dev_add_pack(&eb_ptr->tipc_packet_type);
}
/* Associate TIPC bearer with Ethernet bearer */ /* Associate TIPC bearer with Ethernet bearer */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment