diff options
author | Patrick McHardy <kaber@trash.net> | 2013-04-17 08:18:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-17 20:18:33 +0200 |
commit | 8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb (patch) | |
tree | ba2175f89efa688ad4e58e0d21842dce4f4c34da /net/tipc/bearer.h | |
parent | tipc: remove unused str2addr media callback (diff) | |
download | linux-8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb.tar.xz linux-8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb.zip |
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.h')
-rw-r--r-- | net/tipc/bearer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index cc2d74e1f9f7..3b3fa26cb3dd 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h @@ -94,8 +94,8 @@ struct tipc_media { void (*disable_bearer)(struct tipc_bearer *b_ptr); int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size); int (*addr2msg)(struct tipc_media_addr *a, char *msg_area); - int (*msg2addr)(struct tipc_media_addr *a, char *msg_area); - struct tipc_media_addr bcast_addr; + int (*msg2addr)(const struct tipc_bearer *b_ptr, + struct tipc_media_addr *a, char *msg_area); u32 priority; u32 tolerance; u32 window; @@ -134,6 +134,7 @@ struct tipc_bearer { char name[TIPC_MAX_BEARER_NAME]; spinlock_t lock; struct tipc_media *media; + struct tipc_media_addr bcast_addr; u32 priority; u32 window; u32 tolerance; |