mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 15:09:53 +00:00
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>
This commit is contained in:
parent
bcd326e844
commit
18abf0fb6b
@ -156,21 +156,15 @@ 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->dev = dev;
|
||||||
eb_ptr++;
|
eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC);
|
||||||
if (eb_ptr == stop)
|
eb_ptr->tipc_packet_type.dev = dev;
|
||||||
return -EDQUOT;
|
eb_ptr->tipc_packet_type.func = recv_msg;
|
||||||
if (!eb_ptr->dev) {
|
eb_ptr->tipc_packet_type.af_packet_priv = eb_ptr;
|
||||||
eb_ptr->dev = dev;
|
INIT_LIST_HEAD(&(eb_ptr->tipc_packet_type.list));
|
||||||
eb_ptr->tipc_packet_type.type = htons(ETH_P_TIPC);
|
dev_add_pack(&eb_ptr->tipc_packet_type);
|
||||||
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 */
|
/* Associate TIPC bearer with Ethernet bearer */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user