diff options
author | Patrick McHardy <kaber@trash.net> | 2013-04-17 06:18:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-17 14:18:33 -0400 |
commit | 8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb (patch) | |
tree | ba2175f89efa688ad4e58e0d21842dce4f4c34da /net/tipc/bearer.c | |
parent | ccc4ba2ea23e4507c174620405c5de7bee328f99 (diff) | |
download | op-kernel-dev-8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb.zip op-kernel-dev-8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb.tar.gz |
tipc: move bcast_addr from struct tipc_media to struct tipc_bearer
Some network protocols, like InfiniBand, don't have a fixed broadcast
address but one that depends on the configuration. Move the bcast_addr
to struct tipc_bearer and initialize it with the broadcast address of
the network device when the bearer is enabled.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index aa62f93..45d5398 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -89,9 +89,6 @@ int tipc_register_media(struct tipc_media *m_ptr) if ((strlen(m_ptr->name) + 1) > TIPC_MAX_MEDIA_NAME) goto exit; - if ((m_ptr->bcast_addr.media_id != m_ptr->type_id) || - !m_ptr->bcast_addr.broadcast) - goto exit; if (m_ptr->priority > TIPC_MAX_LINK_PRI) goto exit; if ((m_ptr->tolerance < TIPC_MIN_LINK_TOL) || @@ -407,7 +404,7 @@ restart: INIT_LIST_HEAD(&b_ptr->links); spin_lock_init(&b_ptr->lock); - res = tipc_disc_create(b_ptr, &m_ptr->bcast_addr, disc_domain); + res = tipc_disc_create(b_ptr, &b_ptr->bcast_addr, disc_domain); if (res) { bearer_disable(b_ptr); pr_warn("Bearer <%s> rejected, discovery object creation failed\n", |