summaryrefslogtreecommitdiffstats
path: root/net/tipc/bearer.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-17 06:18:26 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-17 14:18:33 -0400
commit8aeb89f214cdb4c3d9e43213d52d4c5b0fb93bbb (patch)
treeba2175f89efa688ad4e58e0d21842dce4f4c34da /net/tipc/bearer.h
parentccc4ba2ea23e4507c174620405c5de7bee328f99 (diff)
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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
index cc2d74e1f9f..3b3fa26cb3d 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;