diff options
Diffstat (limited to 'net/tipc/bcast.c')
| -rw-r--r-- | net/tipc/bcast.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index e7880172ef19..3ddaff42d1bb 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
| @@ -96,8 +96,8 @@ struct bcbearer { | |||
| 96 | struct media media; | 96 | struct media media; |
| 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; | 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; |
| 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; | 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; |
| 99 | struct node_map remains; | 99 | struct tipc_node_map remains; |
| 100 | struct node_map remains_new; | 100 | struct tipc_node_map remains_new; |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | /** | 103 | /** |
| @@ -110,7 +110,7 @@ struct bcbearer { | |||
| 110 | 110 | ||
| 111 | struct bclink { | 111 | struct bclink { |
| 112 | struct link link; | 112 | struct link link; |
| 113 | struct node node; | 113 | struct tipc_node node; |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | 116 | ||
| @@ -149,7 +149,7 @@ static void bcbuf_decr_acks(struct sk_buff *buf) | |||
| 149 | * Called with 'node' locked, bc_lock unlocked | 149 | * Called with 'node' locked, bc_lock unlocked |
| 150 | */ | 150 | */ |
| 151 | 151 | ||
| 152 | static void bclink_set_gap(struct node *n_ptr) | 152 | static void bclink_set_gap(struct tipc_node *n_ptr) |
| 153 | { | 153 | { |
| 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; | 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; |
| 155 | 155 | ||
| @@ -202,7 +202,7 @@ static void bclink_retransmit_pkt(u32 after, u32 to) | |||
| 202 | * Node is locked, bc_lock unlocked. | 202 | * Node is locked, bc_lock unlocked. |
| 203 | */ | 203 | */ |
| 204 | 204 | ||
| 205 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | 205 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) |
| 206 | { | 206 | { |
| 207 | struct sk_buff *crs; | 207 | struct sk_buff *crs; |
| 208 | struct sk_buff *next; | 208 | struct sk_buff *next; |
| @@ -250,7 +250,7 @@ void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | |||
| 250 | * tipc_net_lock and node lock set | 250 | * tipc_net_lock and node lock set |
| 251 | */ | 251 | */ |
| 252 | 252 | ||
| 253 | static void bclink_send_ack(struct node *n_ptr) | 253 | static void bclink_send_ack(struct tipc_node *n_ptr) |
| 254 | { | 254 | { |
| 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; | 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; |
| 256 | 256 | ||
| @@ -264,7 +264,7 @@ static void bclink_send_ack(struct node *n_ptr) | |||
| 264 | * tipc_net_lock and node lock set | 264 | * tipc_net_lock and node lock set |
| 265 | */ | 265 | */ |
| 266 | 266 | ||
| 267 | static void bclink_send_nack(struct node *n_ptr) | 267 | static void bclink_send_nack(struct tipc_node *n_ptr) |
| 268 | { | 268 | { |
| 269 | struct sk_buff *buf; | 269 | struct sk_buff *buf; |
| 270 | struct tipc_msg *msg; | 270 | struct tipc_msg *msg; |
| @@ -276,7 +276,7 @@ static void bclink_send_nack(struct node *n_ptr) | |||
| 276 | if (buf) { | 276 | if (buf) { |
| 277 | msg = buf_msg(buf); | 277 | msg = buf_msg(buf); |
| 278 | msg_init(msg, BCAST_PROTOCOL, STATE_MSG, | 278 | msg_init(msg, BCAST_PROTOCOL, STATE_MSG, |
| 279 | TIPC_OK, INT_H_SIZE, n_ptr->addr); | 279 | INT_H_SIZE, n_ptr->addr); |
| 280 | msg_set_mc_netid(msg, tipc_net_id); | 280 | msg_set_mc_netid(msg, tipc_net_id); |
| 281 | msg_set_bcast_ack(msg, mod(n_ptr->bclink.last_in)); | 281 | msg_set_bcast_ack(msg, mod(n_ptr->bclink.last_in)); |
| 282 | msg_set_bcgap_after(msg, n_ptr->bclink.gap_after); | 282 | msg_set_bcgap_after(msg, n_ptr->bclink.gap_after); |
| @@ -308,7 +308,7 @@ static void bclink_send_nack(struct node *n_ptr) | |||
| 308 | * tipc_net_lock and node lock set | 308 | * tipc_net_lock and node lock set |
| 309 | */ | 309 | */ |
| 310 | 310 | ||
| 311 | void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | 311 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 last_sent) |
| 312 | { | 312 | { |
| 313 | if (!n_ptr->bclink.supported || | 313 | if (!n_ptr->bclink.supported || |
| 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) | 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) |
| @@ -328,7 +328,7 @@ void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | |||
| 328 | 328 | ||
| 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) | 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) |
| 330 | { | 330 | { |
| 331 | struct node *n_ptr = tipc_node_find(dest); | 331 | struct tipc_node *n_ptr = tipc_node_find(dest); |
| 332 | u32 my_after, my_to; | 332 | u32 my_after, my_to; |
| 333 | 333 | ||
| 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) | 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) |
| @@ -418,7 +418,7 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) | |||
| 418 | static int rx_count = 0; | 418 | static int rx_count = 0; |
| 419 | #endif | 419 | #endif |
| 420 | struct tipc_msg *msg = buf_msg(buf); | 420 | struct tipc_msg *msg = buf_msg(buf); |
| 421 | struct node* node = tipc_node_find(msg_prevnode(msg)); | 421 | struct tipc_node* node = tipc_node_find(msg_prevnode(msg)); |
| 422 | u32 next_in; | 422 | u32 next_in; |
| 423 | u32 seqno; | 423 | u32 seqno; |
| 424 | struct sk_buff *deferred; | 424 | struct sk_buff *deferred; |
| @@ -538,7 +538,7 @@ u32 tipc_bclink_get_last_sent(void) | |||
| 538 | return last_sent; | 538 | return last_sent; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | u32 tipc_bclink_acks_missing(struct node *n_ptr) | 541 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr) |
| 542 | { | 542 | { |
| 543 | return (n_ptr->bclink.supported && | 543 | return (n_ptr->bclink.supported && |
| 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); | 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); |
| @@ -571,7 +571,7 @@ static int tipc_bcbearer_send(struct sk_buff *buf, | |||
| 571 | assert(tipc_cltr_bcast_nodes.count != 0); | 571 | assert(tipc_cltr_bcast_nodes.count != 0); |
| 572 | bcbuf_set_acks(buf, tipc_cltr_bcast_nodes.count); | 572 | bcbuf_set_acks(buf, tipc_cltr_bcast_nodes.count); |
| 573 | msg = buf_msg(buf); | 573 | msg = buf_msg(buf); |
| 574 | msg_set_non_seq(msg); | 574 | msg_set_non_seq(msg, 1); |
| 575 | msg_set_mc_netid(msg, tipc_net_id); | 575 | msg_set_mc_netid(msg, tipc_net_id); |
| 576 | } | 576 | } |
| 577 | 577 | ||
| @@ -611,7 +611,7 @@ swap: | |||
| 611 | bcbearer->bpairs[bp_index].secondary = p; | 611 | bcbearer->bpairs[bp_index].secondary = p; |
| 612 | update: | 612 | update: |
| 613 | if (bcbearer->remains_new.count == 0) | 613 | if (bcbearer->remains_new.count == 0) |
| 614 | return TIPC_OK; | 614 | return 0; |
| 615 | 615 | ||
| 616 | bcbearer->remains = bcbearer->remains_new; | 616 | bcbearer->remains = bcbearer->remains_new; |
| 617 | } | 617 | } |
| @@ -620,7 +620,7 @@ update: | |||
| 620 | 620 | ||
| 621 | bcbearer->bearer.publ.blocked = 1; | 621 | bcbearer->bearer.publ.blocked = 1; |
| 622 | bcl->stats.bearer_congs++; | 622 | bcl->stats.bearer_congs++; |
| 623 | return ~TIPC_OK; | 623 | return 1; |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | /** | 626 | /** |
| @@ -756,7 +756,7 @@ int tipc_bclink_reset_stats(void) | |||
| 756 | spin_lock_bh(&bc_lock); | 756 | spin_lock_bh(&bc_lock); |
| 757 | memset(&bcl->stats, 0, sizeof(bcl->stats)); | 757 | memset(&bcl->stats, 0, sizeof(bcl->stats)); |
| 758 | spin_unlock_bh(&bc_lock); | 758 | spin_unlock_bh(&bc_lock); |
| 759 | return TIPC_OK; | 759 | return 0; |
| 760 | } | 760 | } |
| 761 | 761 | ||
| 762 | int tipc_bclink_set_queue_limits(u32 limit) | 762 | int tipc_bclink_set_queue_limits(u32 limit) |
| @@ -769,7 +769,7 @@ int tipc_bclink_set_queue_limits(u32 limit) | |||
| 769 | spin_lock_bh(&bc_lock); | 769 | spin_lock_bh(&bc_lock); |
| 770 | tipc_link_set_queue_limits(bcl, limit); | 770 | tipc_link_set_queue_limits(bcl, limit); |
| 771 | spin_unlock_bh(&bc_lock); | 771 | spin_unlock_bh(&bc_lock); |
| 772 | return TIPC_OK; | 772 | return 0; |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | int tipc_bclink_init(void) | 775 | int tipc_bclink_init(void) |
| @@ -810,7 +810,7 @@ int tipc_bclink_init(void) | |||
| 810 | tipc_printbuf_init(&bcl->print_buf, pb, BCLINK_LOG_BUF_SIZE); | 810 | tipc_printbuf_init(&bcl->print_buf, pb, BCLINK_LOG_BUF_SIZE); |
| 811 | } | 811 | } |
| 812 | 812 | ||
| 813 | return TIPC_OK; | 813 | return 0; |
| 814 | } | 814 | } |
| 815 | 815 | ||
| 816 | void tipc_bclink_stop(void) | 816 | void tipc_bclink_stop(void) |
