aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-29 20:58:42 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-29 21:53:30 -0500
commita18c4bc3ea3c23f658655b1eee4f62cb71d51efd (patch)
tree573ab87dd9826f1956bb3a17e481842284ad8321 /net/tipc/link.c
parent7f9ab6ac2e79b9658eba7c8e3ad8a4392d308057 (diff)
tipc: rename struct link* to struct tipc_link*
This converts the following: struct link -> struct tipc_link struct link_req -> struct tipc_link_req struct link_name -> struct tipc_link_name Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c153
1 files changed, 79 insertions, 74 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 515dfe4fd4ce..ac1832a66f8a 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -71,35 +71,36 @@
71#define START_CHANGEOVER 100000u 71#define START_CHANGEOVER 100000u
72 72
73/** 73/**
74 * struct link_name - deconstructed link name 74 * struct tipc_link_name - deconstructed link name
75 * @addr_local: network address of node at this end 75 * @addr_local: network address of node at this end
76 * @if_local: name of interface at this end 76 * @if_local: name of interface at this end
77 * @addr_peer: network address of node at far end 77 * @addr_peer: network address of node at far end
78 * @if_peer: name of interface at far end 78 * @if_peer: name of interface at far end
79 */ 79 */
80 80
81struct link_name { 81struct tipc_link_name {
82 u32 addr_local; 82 u32 addr_local;
83 char if_local[TIPC_MAX_IF_NAME]; 83 char if_local[TIPC_MAX_IF_NAME];
84 u32 addr_peer; 84 u32 addr_peer;
85 char if_peer[TIPC_MAX_IF_NAME]; 85 char if_peer[TIPC_MAX_IF_NAME];
86}; 86};
87 87
88static void link_handle_out_of_seq_msg(struct link *l_ptr, 88static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
89 struct sk_buff *buf); 89 struct sk_buff *buf);
90static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf); 90static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf);
91static int link_recv_changeover_msg(struct link **l_ptr, struct sk_buff **buf); 91static int link_recv_changeover_msg(struct tipc_link **l_ptr,
92static void link_set_supervision_props(struct link *l_ptr, u32 tolerance); 92 struct sk_buff **buf);
93static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance);
93static int link_send_sections_long(struct tipc_port *sender, 94static int link_send_sections_long(struct tipc_port *sender,
94 struct iovec const *msg_sect, 95 struct iovec const *msg_sect,
95 u32 num_sect, unsigned int total_len, 96 u32 num_sect, unsigned int total_len,
96 u32 destnode); 97 u32 destnode);
97static void link_check_defragm_bufs(struct link *l_ptr); 98static void link_check_defragm_bufs(struct tipc_link *l_ptr);
98static void link_state_event(struct link *l_ptr, u32 event); 99static void link_state_event(struct tipc_link *l_ptr, u32 event);
99static void link_reset_statistics(struct link *l_ptr); 100static void link_reset_statistics(struct tipc_link *l_ptr);
100static void link_print(struct link *l_ptr, const char *str); 101static void link_print(struct tipc_link *l_ptr, const char *str);
101static void link_start(struct link *l_ptr); 102static void link_start(struct tipc_link *l_ptr);
102static int link_send_long_buf(struct link *l_ptr, struct sk_buff *buf); 103static int link_send_long_buf(struct tipc_link *l_ptr, struct sk_buff *buf);
103 104
104/* 105/*
105 * Simple link routines 106 * Simple link routines
@@ -110,7 +111,7 @@ static unsigned int align(unsigned int i)
110 return (i + 3) & ~3u; 111 return (i + 3) & ~3u;
111} 112}
112 113
113static void link_init_max_pkt(struct link *l_ptr) 114static void link_init_max_pkt(struct tipc_link *l_ptr)
114{ 115{
115 u32 max_pkt; 116 u32 max_pkt;
116 117
@@ -127,14 +128,14 @@ static void link_init_max_pkt(struct link *l_ptr)
127 l_ptr->max_pkt_probes = 0; 128 l_ptr->max_pkt_probes = 0;
128} 129}
129 130
130static u32 link_next_sent(struct link *l_ptr) 131static u32 link_next_sent(struct tipc_link *l_ptr)
131{ 132{
132 if (l_ptr->next_out) 133 if (l_ptr->next_out)
133 return buf_seqno(l_ptr->next_out); 134 return buf_seqno(l_ptr->next_out);
134 return mod(l_ptr->next_out_no); 135 return mod(l_ptr->next_out_no);
135} 136}
136 137
137static u32 link_last_sent(struct link *l_ptr) 138static u32 link_last_sent(struct tipc_link *l_ptr)
138{ 139{
139 return mod(link_next_sent(l_ptr) - 1); 140 return mod(link_next_sent(l_ptr) - 1);
140} 141}
@@ -143,28 +144,29 @@ static u32 link_last_sent(struct link *l_ptr)
143 * Simple non-static link routines (i.e. referenced outside this file) 144 * Simple non-static link routines (i.e. referenced outside this file)
144 */ 145 */
145 146
146int tipc_link_is_up(struct link *l_ptr) 147int tipc_link_is_up(struct tipc_link *l_ptr)
147{ 148{
148 if (!l_ptr) 149 if (!l_ptr)
149 return 0; 150 return 0;
150 return link_working_working(l_ptr) || link_working_unknown(l_ptr); 151 return link_working_working(l_ptr) || link_working_unknown(l_ptr);
151} 152}
152 153
153int tipc_link_is_active(struct link *l_ptr) 154int tipc_link_is_active(struct tipc_link *l_ptr)
154{ 155{
155 return (l_ptr->owner->active_links[0] == l_ptr) || 156 return (l_ptr->owner->active_links[0] == l_ptr) ||
156 (l_ptr->owner->active_links[1] == l_ptr); 157 (l_ptr->owner->active_links[1] == l_ptr);
157} 158}
158 159
159/** 160/**
160 * link_name_validate - validate & (optionally) deconstruct link name 161 * link_name_validate - validate & (optionally) deconstruct tipc_link name
161 * @name - ptr to link name string 162 * @name - ptr to link name string
162 * @name_parts - ptr to area for link name components (or NULL if not needed) 163 * @name_parts - ptr to area for link name components (or NULL if not needed)
163 * 164 *
164 * Returns 1 if link name is valid, otherwise 0. 165 * Returns 1 if link name is valid, otherwise 0.
165 */ 166 */
166 167
167static int link_name_validate(const char *name, struct link_name *name_parts) 168static int link_name_validate(const char *name,
169 struct tipc_link_name *name_parts)
168{ 170{
169 char name_copy[TIPC_MAX_LINK_NAME]; 171 char name_copy[TIPC_MAX_LINK_NAME];
170 char *addr_local; 172 char *addr_local;
@@ -238,7 +240,7 @@ static int link_name_validate(const char *name, struct link_name *name_parts)
238 * tipc_node_delete() is called.) 240 * tipc_node_delete() is called.)
239 */ 241 */
240 242
241static void link_timeout(struct link *l_ptr) 243static void link_timeout(struct tipc_link *l_ptr)
242{ 244{
243 tipc_node_lock(l_ptr->owner); 245 tipc_node_lock(l_ptr->owner);
244 246
@@ -287,7 +289,7 @@ static void link_timeout(struct link *l_ptr)
287 tipc_node_unlock(l_ptr->owner); 289 tipc_node_unlock(l_ptr->owner);
288} 290}
289 291
290static void link_set_timer(struct link *l_ptr, u32 time) 292static void link_set_timer(struct tipc_link *l_ptr, u32 time)
291{ 293{
292 k_start_timer(&l_ptr->timer, time); 294 k_start_timer(&l_ptr->timer, time);
293} 295}
@@ -301,11 +303,11 @@ static void link_set_timer(struct link *l_ptr, u32 time)
301 * Returns pointer to link. 303 * Returns pointer to link.
302 */ 304 */
303 305
304struct link *tipc_link_create(struct tipc_node *n_ptr, 306struct tipc_link *tipc_link_create(struct tipc_node *n_ptr,
305 struct tipc_bearer *b_ptr, 307 struct tipc_bearer *b_ptr,
306 const struct tipc_media_addr *media_addr) 308 const struct tipc_media_addr *media_addr)
307{ 309{
308 struct link *l_ptr; 310 struct tipc_link *l_ptr;
309 struct tipc_msg *msg; 311 struct tipc_msg *msg;
310 char *if_name; 312 char *if_name;
311 char addr_string[16]; 313 char addr_string[16];
@@ -382,7 +384,7 @@ struct link *tipc_link_create(struct tipc_node *n_ptr,
382 * to avoid a potential deadlock situation. 384 * to avoid a potential deadlock situation.
383 */ 385 */
384 386
385void tipc_link_delete(struct link *l_ptr) 387void tipc_link_delete(struct tipc_link *l_ptr)
386{ 388{
387 if (!l_ptr) { 389 if (!l_ptr) {
388 err("Attempt to delete non-existent link\n"); 390 err("Attempt to delete non-existent link\n");
@@ -401,7 +403,7 @@ void tipc_link_delete(struct link *l_ptr)
401 kfree(l_ptr); 403 kfree(l_ptr);
402} 404}
403 405
404static void link_start(struct link *l_ptr) 406static void link_start(struct tipc_link *l_ptr)
405{ 407{
406 tipc_node_lock(l_ptr->owner); 408 tipc_node_lock(l_ptr->owner);
407 link_state_event(l_ptr, STARTING_EVT); 409 link_state_event(l_ptr, STARTING_EVT);
@@ -418,7 +420,7 @@ static void link_start(struct link *l_ptr)
418 * has abated. 420 * has abated.
419 */ 421 */
420 422
421static int link_schedule_port(struct link *l_ptr, u32 origport, u32 sz) 423static int link_schedule_port(struct tipc_link *l_ptr, u32 origport, u32 sz)
422{ 424{
423 struct tipc_port *p_ptr; 425 struct tipc_port *p_ptr;
424 426
@@ -440,7 +442,7 @@ exit:
440 return -ELINKCONG; 442 return -ELINKCONG;
441} 443}
442 444
443void tipc_link_wakeup_ports(struct link *l_ptr, int all) 445void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all)
444{ 446{
445 struct tipc_port *p_ptr; 447 struct tipc_port *p_ptr;
446 struct tipc_port *temp_p_ptr; 448 struct tipc_port *temp_p_ptr;
@@ -475,7 +477,7 @@ exit:
475 * @l_ptr: pointer to link 477 * @l_ptr: pointer to link
476 */ 478 */
477 479
478static void link_release_outqueue(struct link *l_ptr) 480static void link_release_outqueue(struct tipc_link *l_ptr)
479{ 481{
480 struct sk_buff *buf = l_ptr->first_out; 482 struct sk_buff *buf = l_ptr->first_out;
481 struct sk_buff *next; 483 struct sk_buff *next;
@@ -494,7 +496,7 @@ static void link_release_outqueue(struct link *l_ptr)
494 * @l_ptr: pointer to link 496 * @l_ptr: pointer to link
495 */ 497 */
496 498
497void tipc_link_reset_fragments(struct link *l_ptr) 499void tipc_link_reset_fragments(struct tipc_link *l_ptr)
498{ 500{
499 struct sk_buff *buf = l_ptr->defragm_buf; 501 struct sk_buff *buf = l_ptr->defragm_buf;
500 struct sk_buff *next; 502 struct sk_buff *next;
@@ -512,7 +514,7 @@ void tipc_link_reset_fragments(struct link *l_ptr)
512 * @l_ptr: pointer to link 514 * @l_ptr: pointer to link
513 */ 515 */
514 516
515void tipc_link_stop(struct link *l_ptr) 517void tipc_link_stop(struct tipc_link *l_ptr)
516{ 518{
517 struct sk_buff *buf; 519 struct sk_buff *buf;
518 struct sk_buff *next; 520 struct sk_buff *next;
@@ -537,7 +539,7 @@ void tipc_link_stop(struct link *l_ptr)
537 l_ptr->proto_msg_queue = NULL; 539 l_ptr->proto_msg_queue = NULL;
538} 540}
539 541
540void tipc_link_reset(struct link *l_ptr) 542void tipc_link_reset(struct tipc_link *l_ptr)
541{ 543{
542 struct sk_buff *buf; 544 struct sk_buff *buf;
543 u32 prev_state = l_ptr->state; 545 u32 prev_state = l_ptr->state;
@@ -597,7 +599,7 @@ void tipc_link_reset(struct link *l_ptr)
597} 599}
598 600
599 601
600static void link_activate(struct link *l_ptr) 602static void link_activate(struct tipc_link *l_ptr)
601{ 603{
602 l_ptr->next_in_no = l_ptr->stats.recv_info = 1; 604 l_ptr->next_in_no = l_ptr->stats.recv_info = 1;
603 tipc_node_link_up(l_ptr->owner, l_ptr); 605 tipc_node_link_up(l_ptr->owner, l_ptr);
@@ -610,9 +612,9 @@ static void link_activate(struct link *l_ptr)
610 * @event: state machine event to process 612 * @event: state machine event to process
611 */ 613 */
612 614
613static void link_state_event(struct link *l_ptr, unsigned event) 615static void link_state_event(struct tipc_link *l_ptr, unsigned event)
614{ 616{
615 struct link *other; 617 struct tipc_link *other;
616 u32 cont_intv = l_ptr->continuity_interval; 618 u32 cont_intv = l_ptr->continuity_interval;
617 619
618 if (!l_ptr->started && (event != STARTING_EVT)) 620 if (!l_ptr->started && (event != STARTING_EVT))
@@ -784,7 +786,7 @@ static void link_state_event(struct link *l_ptr, unsigned event)
784 * the tail of an existing one. 786 * the tail of an existing one.
785 */ 787 */
786 788
787static int link_bundle_buf(struct link *l_ptr, 789static int link_bundle_buf(struct tipc_link *l_ptr,
788 struct sk_buff *bundler, 790 struct sk_buff *bundler,
789 struct sk_buff *buf) 791 struct sk_buff *buf)
790{ 792{
@@ -813,7 +815,7 @@ static int link_bundle_buf(struct link *l_ptr,
813 return 1; 815 return 1;
814} 816}
815 817
816static void link_add_to_outqueue(struct link *l_ptr, 818static void link_add_to_outqueue(struct tipc_link *l_ptr,
817 struct sk_buff *buf, 819 struct sk_buff *buf,
818 struct tipc_msg *msg) 820 struct tipc_msg *msg)
819{ 821{
@@ -834,7 +836,7 @@ static void link_add_to_outqueue(struct link *l_ptr,
834 l_ptr->stats.max_queue_sz = l_ptr->out_queue_size; 836 l_ptr->stats.max_queue_sz = l_ptr->out_queue_size;
835} 837}
836 838
837static void link_add_chain_to_outqueue(struct link *l_ptr, 839static void link_add_chain_to_outqueue(struct tipc_link *l_ptr,
838 struct sk_buff *buf_chain, 840 struct sk_buff *buf_chain,
839 u32 long_msgno) 841 u32 long_msgno)
840{ 842{
@@ -859,7 +861,7 @@ static void link_add_chain_to_outqueue(struct link *l_ptr,
859 * has failed, and from link_send() 861 * has failed, and from link_send()
860 */ 862 */
861 863
862int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) 864int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf)
863{ 865{
864 struct tipc_msg *msg = buf_msg(buf); 866 struct tipc_msg *msg = buf_msg(buf);
865 u32 size = msg_size(msg); 867 u32 size = msg_size(msg);
@@ -954,7 +956,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf)
954 956
955int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) 957int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
956{ 958{
957 struct link *l_ptr; 959 struct tipc_link *l_ptr;
958 struct tipc_node *n_ptr; 960 struct tipc_node *n_ptr;
959 int res = -ELINKCONG; 961 int res = -ELINKCONG;
960 962
@@ -988,7 +990,7 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
988void tipc_link_send_names(struct list_head *message_list, u32 dest) 990void tipc_link_send_names(struct list_head *message_list, u32 dest)
989{ 991{
990 struct tipc_node *n_ptr; 992 struct tipc_node *n_ptr;
991 struct link *l_ptr; 993 struct tipc_link *l_ptr;
992 struct sk_buff *buf; 994 struct sk_buff *buf;
993 struct sk_buff *temp_buf; 995 struct sk_buff *temp_buf;
994 996
@@ -1027,7 +1029,7 @@ void tipc_link_send_names(struct list_head *message_list, u32 dest)
1027 * Link is locked. Returns user data length. 1029 * Link is locked. Returns user data length.
1028 */ 1030 */
1029 1031
1030static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, 1032static int link_send_buf_fast(struct tipc_link *l_ptr, struct sk_buff *buf,
1031 u32 *used_max_pkt) 1033 u32 *used_max_pkt)
1032{ 1034{
1033 struct tipc_msg *msg = buf_msg(buf); 1035 struct tipc_msg *msg = buf_msg(buf);
@@ -1061,7 +1063,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf,
1061 */ 1063 */
1062int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) 1064int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode)
1063{ 1065{
1064 struct link *l_ptr; 1066 struct tipc_link *l_ptr;
1065 struct tipc_node *n_ptr; 1067 struct tipc_node *n_ptr;
1066 int res; 1068 int res;
1067 u32 selector = msg_origport(buf_msg(buf)) & 1; 1069 u32 selector = msg_origport(buf_msg(buf)) & 1;
@@ -1100,7 +1102,7 @@ int tipc_link_send_sections_fast(struct tipc_port *sender,
1100 u32 destaddr) 1102 u32 destaddr)
1101{ 1103{
1102 struct tipc_msg *hdr = &sender->phdr; 1104 struct tipc_msg *hdr = &sender->phdr;
1103 struct link *l_ptr; 1105 struct tipc_link *l_ptr;
1104 struct sk_buff *buf; 1106 struct sk_buff *buf;
1105 struct tipc_node *node; 1107 struct tipc_node *node;
1106 int res; 1108 int res;
@@ -1195,7 +1197,7 @@ static int link_send_sections_long(struct tipc_port *sender,
1195 unsigned int total_len, 1197 unsigned int total_len,
1196 u32 destaddr) 1198 u32 destaddr)
1197{ 1199{
1198 struct link *l_ptr; 1200 struct tipc_link *l_ptr;
1199 struct tipc_node *node; 1201 struct tipc_node *node;
1200 struct tipc_msg *hdr = &sender->phdr; 1202 struct tipc_msg *hdr = &sender->phdr;
1201 u32 dsz = total_len; 1203 u32 dsz = total_len;
@@ -1342,7 +1344,7 @@ reject:
1342/* 1344/*
1343 * tipc_link_push_packet: Push one unsent packet to the media 1345 * tipc_link_push_packet: Push one unsent packet to the media
1344 */ 1346 */
1345u32 tipc_link_push_packet(struct link *l_ptr) 1347u32 tipc_link_push_packet(struct tipc_link *l_ptr)
1346{ 1348{
1347 struct sk_buff *buf = l_ptr->first_out; 1349 struct sk_buff *buf = l_ptr->first_out;
1348 u32 r_q_size = l_ptr->retransm_queue_size; 1350 u32 r_q_size = l_ptr->retransm_queue_size;
@@ -1426,7 +1428,7 @@ u32 tipc_link_push_packet(struct link *l_ptr)
1426 * push_queue(): push out the unsent messages of a link where 1428 * push_queue(): push out the unsent messages of a link where
1427 * congestion has abated. Node is locked 1429 * congestion has abated. Node is locked
1428 */ 1430 */
1429void tipc_link_push_queue(struct link *l_ptr) 1431void tipc_link_push_queue(struct tipc_link *l_ptr)
1430{ 1432{
1431 u32 res; 1433 u32 res;
1432 1434
@@ -1470,7 +1472,8 @@ static void link_reset_all(unsigned long addr)
1470 read_unlock_bh(&tipc_net_lock); 1472 read_unlock_bh(&tipc_net_lock);
1471} 1473}
1472 1474
1473static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) 1475static void link_retransmit_failure(struct tipc_link *l_ptr,
1476 struct sk_buff *buf)
1474{ 1477{
1475 struct tipc_msg *msg = buf_msg(buf); 1478 struct tipc_msg *msg = buf_msg(buf);
1476 1479
@@ -1514,7 +1517,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf)
1514 } 1517 }
1515} 1518}
1516 1519
1517void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, 1520void tipc_link_retransmit(struct tipc_link *l_ptr, struct sk_buff *buf,
1518 u32 retransmits) 1521 u32 retransmits)
1519{ 1522{
1520 struct tipc_msg *msg; 1523 struct tipc_msg *msg;
@@ -1571,7 +1574,7 @@ void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf,
1571 * link_insert_deferred_queue - insert deferred messages back into receive chain 1574 * link_insert_deferred_queue - insert deferred messages back into receive chain
1572 */ 1575 */
1573 1576
1574static struct sk_buff *link_insert_deferred_queue(struct link *l_ptr, 1577static struct sk_buff *link_insert_deferred_queue(struct tipc_link *l_ptr,
1575 struct sk_buff *buf) 1578 struct sk_buff *buf)
1576{ 1579{
1577 u32 seq_no; 1580 u32 seq_no;
@@ -1653,7 +1656,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *b_ptr)
1653 read_lock_bh(&tipc_net_lock); 1656 read_lock_bh(&tipc_net_lock);
1654 while (head) { 1657 while (head) {
1655 struct tipc_node *n_ptr; 1658 struct tipc_node *n_ptr;
1656 struct link *l_ptr; 1659 struct tipc_link *l_ptr;
1657 struct sk_buff *crs; 1660 struct sk_buff *crs;
1658 struct sk_buff *buf = head; 1661 struct sk_buff *buf = head;
1659 struct tipc_msg *msg; 1662 struct tipc_msg *msg;
@@ -1906,7 +1909,7 @@ u32 tipc_link_defer_pkt(struct sk_buff **head,
1906 * link_handle_out_of_seq_msg - handle arrival of out-of-sequence packet 1909 * link_handle_out_of_seq_msg - handle arrival of out-of-sequence packet
1907 */ 1910 */
1908 1911
1909static void link_handle_out_of_seq_msg(struct link *l_ptr, 1912static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr,
1910 struct sk_buff *buf) 1913 struct sk_buff *buf)
1911{ 1914{
1912 u32 seq_no = buf_seqno(buf); 1915 u32 seq_no = buf_seqno(buf);
@@ -1944,8 +1947,9 @@ static void link_handle_out_of_seq_msg(struct link *l_ptr,
1944/* 1947/*
1945 * Send protocol message to the other endpoint. 1948 * Send protocol message to the other endpoint.
1946 */ 1949 */
1947void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int probe_msg, 1950void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ,
1948 u32 gap, u32 tolerance, u32 priority, u32 ack_mtu) 1951 int probe_msg, u32 gap, u32 tolerance,
1952 u32 priority, u32 ack_mtu)
1949{ 1953{
1950 struct sk_buff *buf = NULL; 1954 struct sk_buff *buf = NULL;
1951 struct tipc_msg *msg = l_ptr->pmsg; 1955 struct tipc_msg *msg = l_ptr->pmsg;
@@ -2062,7 +2066,7 @@ void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int probe_msg,
2062 * change at any time. The node with lowest address rules 2066 * change at any time. The node with lowest address rules
2063 */ 2067 */
2064 2068
2065static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf) 2069static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf)
2066{ 2070{
2067 u32 rec_gap = 0; 2071 u32 rec_gap = 0;
2068 u32 max_pkt_info; 2072 u32 max_pkt_info;
@@ -2195,12 +2199,12 @@ exit:
2195 * tipc_link_tunnel(): Send one message via a link belonging to 2199 * tipc_link_tunnel(): Send one message via a link belonging to
2196 * another bearer. Owner node is locked. 2200 * another bearer. Owner node is locked.
2197 */ 2201 */
2198static void tipc_link_tunnel(struct link *l_ptr, 2202static void tipc_link_tunnel(struct tipc_link *l_ptr,
2199 struct tipc_msg *tunnel_hdr, 2203 struct tipc_msg *tunnel_hdr,
2200 struct tipc_msg *msg, 2204 struct tipc_msg *msg,
2201 u32 selector) 2205 u32 selector)
2202{ 2206{
2203 struct link *tunnel; 2207 struct tipc_link *tunnel;
2204 struct sk_buff *buf; 2208 struct sk_buff *buf;
2205 u32 length = msg_size(msg); 2209 u32 length = msg_size(msg);
2206 2210
@@ -2229,11 +2233,11 @@ static void tipc_link_tunnel(struct link *l_ptr,
2229 * Owner node is locked. 2233 * Owner node is locked.
2230 */ 2234 */
2231 2235
2232void tipc_link_changeover(struct link *l_ptr) 2236void tipc_link_changeover(struct tipc_link *l_ptr)
2233{ 2237{
2234 u32 msgcount = l_ptr->out_queue_size; 2238 u32 msgcount = l_ptr->out_queue_size;
2235 struct sk_buff *crs = l_ptr->first_out; 2239 struct sk_buff *crs = l_ptr->first_out;
2236 struct link *tunnel = l_ptr->owner->active_links[0]; 2240 struct tipc_link *tunnel = l_ptr->owner->active_links[0];
2237 struct tipc_msg tunnel_hdr; 2241 struct tipc_msg tunnel_hdr;
2238 int split_bundles; 2242 int split_bundles;
2239 2243
@@ -2292,7 +2296,7 @@ void tipc_link_changeover(struct link *l_ptr)
2292 } 2296 }
2293} 2297}
2294 2298
2295void tipc_link_send_duplicate(struct link *l_ptr, struct link *tunnel) 2299void tipc_link_send_duplicate(struct tipc_link *l_ptr, struct tipc_link *tunnel)
2296{ 2300{
2297 struct sk_buff *iter; 2301 struct sk_buff *iter;
2298 struct tipc_msg tunnel_hdr; 2302 struct tipc_msg tunnel_hdr;
@@ -2356,11 +2360,11 @@ static struct sk_buff *buf_extract(struct sk_buff *skb, u32 from_pos)
2356 * via other link. Node is locked. Return extracted buffer. 2360 * via other link. Node is locked. Return extracted buffer.
2357 */ 2361 */
2358 2362
2359static int link_recv_changeover_msg(struct link **l_ptr, 2363static int link_recv_changeover_msg(struct tipc_link **l_ptr,
2360 struct sk_buff **buf) 2364 struct sk_buff **buf)
2361{ 2365{
2362 struct sk_buff *tunnel_buf = *buf; 2366 struct sk_buff *tunnel_buf = *buf;
2363 struct link *dest_link; 2367 struct tipc_link *dest_link;
2364 struct tipc_msg *msg; 2368 struct tipc_msg *msg;
2365 struct tipc_msg *tunnel_msg = buf_msg(tunnel_buf); 2369 struct tipc_msg *tunnel_msg = buf_msg(tunnel_buf);
2366 u32 msg_typ = msg_type(tunnel_msg); 2370 u32 msg_typ = msg_type(tunnel_msg);
@@ -2460,7 +2464,7 @@ void tipc_link_recv_bundle(struct sk_buff *buf)
2460 * The buffer is complete, inclusive total message length. 2464 * The buffer is complete, inclusive total message length.
2461 * Returns user data length. 2465 * Returns user data length.
2462 */ 2466 */
2463static int link_send_long_buf(struct link *l_ptr, struct sk_buff *buf) 2467static int link_send_long_buf(struct tipc_link *l_ptr, struct sk_buff *buf)
2464{ 2468{
2465 struct sk_buff *buf_chain = NULL; 2469 struct sk_buff *buf_chain = NULL;
2466 struct sk_buff *buf_chain_tail = (struct sk_buff *)&buf_chain; 2470 struct sk_buff *buf_chain_tail = (struct sk_buff *)&buf_chain;
@@ -2656,7 +2660,7 @@ int tipc_link_recv_fragment(struct sk_buff **pending, struct sk_buff **fb,
2656 * @l_ptr: pointer to link 2660 * @l_ptr: pointer to link
2657 */ 2661 */
2658 2662
2659static void link_check_defragm_bufs(struct link *l_ptr) 2663static void link_check_defragm_bufs(struct tipc_link *l_ptr)
2660{ 2664{
2661 struct sk_buff *prev = NULL; 2665 struct sk_buff *prev = NULL;
2662 struct sk_buff *next = NULL; 2666 struct sk_buff *next = NULL;
@@ -2686,7 +2690,7 @@ static void link_check_defragm_bufs(struct link *l_ptr)
2686 2690
2687 2691
2688 2692
2689static void link_set_supervision_props(struct link *l_ptr, u32 tolerance) 2693static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance)
2690{ 2694{
2691 if ((tolerance < TIPC_MIN_LINK_TOL) || (tolerance > TIPC_MAX_LINK_TOL)) 2695 if ((tolerance < TIPC_MIN_LINK_TOL) || (tolerance > TIPC_MAX_LINK_TOL))
2692 return; 2696 return;
@@ -2698,7 +2702,7 @@ static void link_set_supervision_props(struct link *l_ptr, u32 tolerance)
2698} 2702}
2699 2703
2700 2704
2701void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) 2705void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window)
2702{ 2706{
2703 /* Data messages from this node, inclusive FIRST_FRAGM */ 2707 /* Data messages from this node, inclusive FIRST_FRAGM */
2704 l_ptr->queue_limit[TIPC_LOW_IMPORTANCE] = window; 2708 l_ptr->queue_limit[TIPC_LOW_IMPORTANCE] = window;
@@ -2728,11 +2732,12 @@ void tipc_link_set_queue_limits(struct link *l_ptr, u32 window)
2728 * Returns pointer to link (or 0 if invalid link name). 2732 * Returns pointer to link (or 0 if invalid link name).
2729 */ 2733 */
2730 2734
2731static struct link *link_find_link(const char *name, struct tipc_node **node) 2735static struct tipc_link *link_find_link(const char *name,
2736 struct tipc_node **node)
2732{ 2737{
2733 struct link_name link_name_parts; 2738 struct tipc_link_name link_name_parts;
2734 struct tipc_bearer *b_ptr; 2739 struct tipc_bearer *b_ptr;
2735 struct link *l_ptr; 2740 struct tipc_link *l_ptr;
2736 2741
2737 if (!link_name_validate(name, &link_name_parts)) 2742 if (!link_name_validate(name, &link_name_parts))
2738 return NULL; 2743 return NULL;
@@ -2791,7 +2796,7 @@ static int link_value_is_valid(u16 cmd, u32 new_value)
2791static int link_cmd_set_value(const char *name, u32 new_value, u16 cmd) 2796static int link_cmd_set_value(const char *name, u32 new_value, u16 cmd)
2792{ 2797{
2793 struct tipc_node *node; 2798 struct tipc_node *node;
2794 struct link *l_ptr; 2799 struct tipc_link *l_ptr;
2795 struct tipc_bearer *b_ptr; 2800 struct tipc_bearer *b_ptr;
2796 struct tipc_media *m_ptr; 2801 struct tipc_media *m_ptr;
2797 2802
@@ -2893,7 +2898,7 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space
2893 * @l_ptr: pointer to link 2898 * @l_ptr: pointer to link
2894 */ 2899 */
2895 2900
2896static void link_reset_statistics(struct link *l_ptr) 2901static void link_reset_statistics(struct tipc_link *l_ptr)
2897{ 2902{
2898 memset(&l_ptr->stats, 0, sizeof(l_ptr->stats)); 2903 memset(&l_ptr->stats, 0, sizeof(l_ptr->stats));
2899 l_ptr->stats.sent_info = l_ptr->next_out_no; 2904 l_ptr->stats.sent_info = l_ptr->next_out_no;
@@ -2903,7 +2908,7 @@ static void link_reset_statistics(struct link *l_ptr)
2903struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space) 2908struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space)
2904{ 2909{
2905 char *link_name; 2910 char *link_name;
2906 struct link *l_ptr; 2911 struct tipc_link *l_ptr;
2907 struct tipc_node *node; 2912 struct tipc_node *node;
2908 2913
2909 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) 2914 if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME))
@@ -2951,7 +2956,7 @@ static u32 percent(u32 count, u32 total)
2951static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) 2956static int tipc_link_stats(const char *name, char *buf, const u32 buf_size)
2952{ 2957{
2953 struct print_buf pb; 2958 struct print_buf pb;
2954 struct link *l_ptr; 2959 struct tipc_link *l_ptr;
2955 struct tipc_node *node; 2960 struct tipc_node *node;
2956 char *status; 2961 char *status;
2957 u32 profile_total = 0; 2962 u32 profile_total = 0;
@@ -3073,7 +3078,7 @@ struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, int req_tlv_s
3073u32 tipc_link_get_max_pkt(u32 dest, u32 selector) 3078u32 tipc_link_get_max_pkt(u32 dest, u32 selector)
3074{ 3079{
3075 struct tipc_node *n_ptr; 3080 struct tipc_node *n_ptr;
3076 struct link *l_ptr; 3081 struct tipc_link *l_ptr;
3077 u32 res = MAX_PKT_DEFAULT; 3082 u32 res = MAX_PKT_DEFAULT;
3078 3083
3079 if (dest == tipc_own_addr) 3084 if (dest == tipc_own_addr)
@@ -3092,7 +3097,7 @@ u32 tipc_link_get_max_pkt(u32 dest, u32 selector)
3092 return res; 3097 return res;
3093} 3098}
3094 3099
3095static void link_print(struct link *l_ptr, const char *str) 3100static void link_print(struct tipc_link *l_ptr, const char *str)
3096{ 3101{
3097 char print_area[256]; 3102 char print_area[256];
3098 struct print_buf pb; 3103 struct print_buf pb;