diff options
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index f2839b0f6b65..411719feb803 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -158,7 +158,6 @@ int tipc_register_media(u32 media_type, | |||
158 | m_ptr->disable_bearer = disable; | 158 | m_ptr->disable_bearer = disable; |
159 | m_ptr->addr2str = addr2str; | 159 | m_ptr->addr2str = addr2str; |
160 | memcpy(&m_ptr->bcast_addr, bcast_addr, sizeof(*bcast_addr)); | 160 | memcpy(&m_ptr->bcast_addr, bcast_addr, sizeof(*bcast_addr)); |
161 | m_ptr->bcast = 1; | ||
162 | strcpy(m_ptr->name, name); | 161 | strcpy(m_ptr->name, name); |
163 | m_ptr->priority = bearer_priority; | 162 | m_ptr->priority = bearer_priority; |
164 | m_ptr->tolerance = link_tolerance; | 163 | m_ptr->tolerance = link_tolerance; |
@@ -474,7 +473,7 @@ int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr) | |||
474 | * tipc_enable_bearer - enable bearer with the given name | 473 | * tipc_enable_bearer - enable bearer with the given name |
475 | */ | 474 | */ |
476 | 475 | ||
477 | int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority) | 476 | int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority) |
478 | { | 477 | { |
479 | struct tipc_bearer *b_ptr; | 478 | struct tipc_bearer *b_ptr; |
480 | struct media *m_ptr; | 479 | struct media *m_ptr; |
@@ -494,9 +493,9 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority) | |||
494 | warn("Bearer <%s> rejected, illegal name\n", name); | 493 | warn("Bearer <%s> rejected, illegal name\n", name); |
495 | return -EINVAL; | 494 | return -EINVAL; |
496 | } | 495 | } |
497 | if (!tipc_addr_domain_valid(bcast_scope) || | 496 | if (!tipc_addr_domain_valid(disc_domain) || |
498 | !tipc_in_scope(bcast_scope, tipc_own_addr)) { | 497 | !tipc_in_scope(disc_domain, tipc_own_addr)) { |
499 | warn("Bearer <%s> rejected, illegal broadcast scope\n", name); | 498 | warn("Bearer <%s> rejected, illegal discovery domain\n", name); |
500 | return -EINVAL; | 499 | return -EINVAL; |
501 | } | 500 | } |
502 | if ((priority < TIPC_MIN_LINK_PRI || | 501 | if ((priority < TIPC_MIN_LINK_PRI || |
@@ -560,18 +559,15 @@ restart: | |||
560 | b_ptr->media = m_ptr; | 559 | b_ptr->media = m_ptr; |
561 | b_ptr->net_plane = bearer_id + 'A'; | 560 | b_ptr->net_plane = bearer_id + 'A'; |
562 | b_ptr->active = 1; | 561 | b_ptr->active = 1; |
563 | b_ptr->detect_scope = bcast_scope; | ||
564 | b_ptr->priority = priority; | 562 | b_ptr->priority = priority; |
565 | INIT_LIST_HEAD(&b_ptr->cong_links); | 563 | INIT_LIST_HEAD(&b_ptr->cong_links); |
566 | INIT_LIST_HEAD(&b_ptr->links); | 564 | INIT_LIST_HEAD(&b_ptr->links); |
567 | if (m_ptr->bcast) { | 565 | b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, |
568 | b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, | 566 | disc_domain); |
569 | bcast_scope); | ||
570 | } | ||
571 | spin_lock_init(&b_ptr->lock); | 567 | spin_lock_init(&b_ptr->lock); |
572 | write_unlock_bh(&tipc_net_lock); | 568 | write_unlock_bh(&tipc_net_lock); |
573 | info("Enabled bearer <%s>, discovery domain %s, priority %u\n", | 569 | info("Enabled bearer <%s>, discovery domain %s, priority %u\n", |
574 | name, tipc_addr_string_fill(addr_string, bcast_scope), priority); | 570 | name, tipc_addr_string_fill(addr_string, disc_domain), priority); |
575 | return 0; | 571 | return 0; |
576 | failed: | 572 | failed: |
577 | write_unlock_bh(&tipc_net_lock); | 573 | write_unlock_bh(&tipc_net_lock); |