diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2011-01-07 13:00:11 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-02-23 18:05:05 -0500 |
commit | 2d627b92fd1e39d83c3ee0b9d410403f98cb3981 (patch) | |
tree | 38fc08bfe87ed28785c7dd464577e947397dfa7c /net/tipc/link.c | |
parent | 23dd4cce387124ec3ea06ca30d17854ae4d9b772 (diff) |
tipc: Combine bearer structure with tipc_bearer structure
Combines two distinct structures containing information about a TIPC bearer
into a single structure. The structures were previously kept separate so
that public information about a bearer could be made available to plug-in
media types using TIPC's native API, while the remaining information was
kept private for use by TIPC itself. However, now that the native API has
been removed there is no longer any need for this arrangement.
Since one of the structures was already embedded within the other, the
change largely involves replacing instances of "publ.foo" with "foo".
The changes do not otherwise alter the operation of TIPC bearers.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index e30770d007f5..1c5c53a81531 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -113,7 +113,7 @@ static void link_init_max_pkt(struct link *l_ptr) | |||
113 | { | 113 | { |
114 | u32 max_pkt; | 114 | u32 max_pkt; |
115 | 115 | ||
116 | max_pkt = (l_ptr->b_ptr->publ.mtu & ~3); | 116 | max_pkt = (l_ptr->b_ptr->mtu & ~3); |
117 | if (max_pkt > MAX_MSG_SIZE) | 117 | if (max_pkt > MAX_MSG_SIZE) |
118 | max_pkt = MAX_MSG_SIZE; | 118 | max_pkt = MAX_MSG_SIZE; |
119 | 119 | ||
@@ -303,7 +303,7 @@ static void link_set_timer(struct link *l_ptr, u32 time) | |||
303 | * Returns pointer to link. | 303 | * Returns pointer to link. |
304 | */ | 304 | */ |
305 | 305 | ||
306 | struct link *tipc_link_create(struct bearer *b_ptr, const u32 peer, | 306 | struct link *tipc_link_create(struct tipc_bearer *b_ptr, const u32 peer, |
307 | const struct tipc_media_addr *media_addr) | 307 | const struct tipc_media_addr *media_addr) |
308 | { | 308 | { |
309 | struct link *l_ptr; | 309 | struct link *l_ptr; |
@@ -317,7 +317,7 @@ struct link *tipc_link_create(struct bearer *b_ptr, const u32 peer, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | l_ptr->addr = peer; | 319 | l_ptr->addr = peer; |
320 | if_name = strchr(b_ptr->publ.name, ':') + 1; | 320 | if_name = strchr(b_ptr->name, ':') + 1; |
321 | sprintf(l_ptr->name, "%u.%u.%u:%s-%u.%u.%u:", | 321 | sprintf(l_ptr->name, "%u.%u.%u:%s-%u.%u.%u:", |
322 | tipc_zone(tipc_own_addr), tipc_cluster(tipc_own_addr), | 322 | tipc_zone(tipc_own_addr), tipc_cluster(tipc_own_addr), |
323 | tipc_node(tipc_own_addr), | 323 | tipc_node(tipc_own_addr), |
@@ -1595,11 +1595,10 @@ static int link_recv_buf_validate(struct sk_buff *buf) | |||
1595 | * structure (i.e. cannot be NULL), but bearer can be inactive. | 1595 | * structure (i.e. cannot be NULL), but bearer can be inactive. |
1596 | */ | 1596 | */ |
1597 | 1597 | ||
1598 | void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | 1598 | void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr) |
1599 | { | 1599 | { |
1600 | read_lock_bh(&tipc_net_lock); | 1600 | read_lock_bh(&tipc_net_lock); |
1601 | while (head) { | 1601 | while (head) { |
1602 | struct bearer *b_ptr = (struct bearer *)tb_ptr; | ||
1603 | struct tipc_node *n_ptr; | 1602 | struct tipc_node *n_ptr; |
1604 | struct link *l_ptr; | 1603 | struct link *l_ptr; |
1605 | struct sk_buff *crs; | 1604 | struct sk_buff *crs; |
@@ -2658,7 +2657,7 @@ void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) | |||
2658 | static struct link *link_find_link(const char *name, struct tipc_node **node) | 2657 | static struct link *link_find_link(const char *name, struct tipc_node **node) |
2659 | { | 2658 | { |
2660 | struct link_name link_name_parts; | 2659 | struct link_name link_name_parts; |
2661 | struct bearer *b_ptr; | 2660 | struct tipc_bearer *b_ptr; |
2662 | struct link *l_ptr; | 2661 | struct link *l_ptr; |
2663 | 2662 | ||
2664 | if (!link_name_validate(name, &link_name_parts)) | 2663 | if (!link_name_validate(name, &link_name_parts)) |
@@ -2961,7 +2960,7 @@ static void link_print(struct link *l_ptr, const char *str) | |||
2961 | 2960 | ||
2962 | tipc_printf(buf, str); | 2961 | tipc_printf(buf, str); |
2963 | tipc_printf(buf, "Link %x<%s>:", | 2962 | tipc_printf(buf, "Link %x<%s>:", |
2964 | l_ptr->addr, l_ptr->b_ptr->publ.name); | 2963 | l_ptr->addr, l_ptr->b_ptr->name); |
2965 | 2964 | ||
2966 | #ifdef CONFIG_TIPC_DEBUG | 2965 | #ifdef CONFIG_TIPC_DEBUG |
2967 | if (link_reset_reset(l_ptr) || link_reset_unknown(l_ptr)) | 2966 | if (link_reset_reset(l_ptr) || link_reset_unknown(l_ptr)) |