diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-29 20:58:42 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-29 21:53:30 -0500 |
commit | a18c4bc3ea3c23f658655b1eee4f62cb71d51efd (patch) | |
tree | 573ab87dd9826f1956bb3a17e481842284ad8321 | |
parent | 7f9ab6ac2e79b9658eba7c8e3ad8a4392d308057 (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>
-rw-r--r-- | net/tipc/bcast.c | 6 | ||||
-rw-r--r-- | net/tipc/bearer.c | 20 | ||||
-rw-r--r-- | net/tipc/bearer.h | 11 | ||||
-rw-r--r-- | net/tipc/discover.c | 20 | ||||
-rw-r--r-- | net/tipc/discover.h | 8 | ||||
-rw-r--r-- | net/tipc/link.c | 153 | ||||
-rw-r--r-- | net/tipc/link.h | 52 | ||||
-rw-r--r-- | net/tipc/name_distr.c | 2 | ||||
-rw-r--r-- | net/tipc/node.c | 18 | ||||
-rw-r--r-- | net/tipc/node.h | 12 |
10 files changed, 156 insertions, 146 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index c24690fbaa7f..8eb87b11d100 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -94,7 +94,7 @@ struct tipc_bcbearer { | |||
94 | */ | 94 | */ |
95 | 95 | ||
96 | struct tipc_bclink { | 96 | struct tipc_bclink { |
97 | struct link link; | 97 | struct tipc_link link; |
98 | struct tipc_node node; | 98 | struct tipc_node node; |
99 | struct tipc_node_map bcast_nodes; | 99 | struct tipc_node_map bcast_nodes; |
100 | struct tipc_node *retransmit_to; | 100 | struct tipc_node *retransmit_to; |
@@ -105,7 +105,7 @@ static struct tipc_bclink bcast_link; | |||
105 | 105 | ||
106 | static struct tipc_bcbearer *bcbearer = &bcast_bearer; | 106 | static struct tipc_bcbearer *bcbearer = &bcast_bearer; |
107 | static struct tipc_bclink *bclink = &bcast_link; | 107 | static struct tipc_bclink *bclink = &bcast_link; |
108 | static struct link *bcl = &bcast_link.link; | 108 | static struct tipc_link *bcl = &bcast_link.link; |
109 | 109 | ||
110 | static DEFINE_SPINLOCK(bc_lock); | 110 | static DEFINE_SPINLOCK(bc_lock); |
111 | 111 | ||
@@ -308,7 +308,7 @@ exit: | |||
308 | 308 | ||
309 | static void bclink_send_ack(struct tipc_node *n_ptr) | 309 | static void bclink_send_ack(struct tipc_node *n_ptr) |
310 | { | 310 | { |
311 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; | 311 | struct tipc_link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; |
312 | 312 | ||
313 | if (l_ptr != NULL) | 313 | if (l_ptr != NULL) |
314 | tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0); | 314 | tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0); |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index cddec3d9ee17..eab4201d4312 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -318,7 +318,7 @@ void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest) | |||
318 | static int bearer_push(struct tipc_bearer *b_ptr) | 318 | static int bearer_push(struct tipc_bearer *b_ptr) |
319 | { | 319 | { |
320 | u32 res = 0; | 320 | u32 res = 0; |
321 | struct link *ln, *tln; | 321 | struct tipc_link *ln, *tln; |
322 | 322 | ||
323 | if (b_ptr->blocked) | 323 | if (b_ptr->blocked) |
324 | return 0; | 324 | return 0; |
@@ -364,7 +364,8 @@ void tipc_continue(struct tipc_bearer *b_ptr) | |||
364 | * bearer.lock is busy | 364 | * bearer.lock is busy |
365 | */ | 365 | */ |
366 | 366 | ||
367 | static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link *l_ptr) | 367 | static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, |
368 | struct tipc_link *l_ptr) | ||
368 | { | 369 | { |
369 | list_move_tail(&l_ptr->link_list, &b_ptr->cong_links); | 370 | list_move_tail(&l_ptr->link_list, &b_ptr->cong_links); |
370 | } | 371 | } |
@@ -377,7 +378,7 @@ static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link | |||
377 | * bearer.lock is free | 378 | * bearer.lock is free |
378 | */ | 379 | */ |
379 | 380 | ||
380 | void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr) | 381 | void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr) |
381 | { | 382 | { |
382 | spin_lock_bh(&b_ptr->lock); | 383 | spin_lock_bh(&b_ptr->lock); |
383 | tipc_bearer_schedule_unlocked(b_ptr, l_ptr); | 384 | tipc_bearer_schedule_unlocked(b_ptr, l_ptr); |
@@ -390,7 +391,8 @@ void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr) | |||
390 | * and if there is, try to resolve it before returning. | 391 | * and if there is, try to resolve it before returning. |
391 | * 'tipc_net_lock' is read_locked when this function is called | 392 | * 'tipc_net_lock' is read_locked when this function is called |
392 | */ | 393 | */ |
393 | int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr) | 394 | int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, |
395 | struct tipc_link *l_ptr) | ||
394 | { | 396 | { |
395 | int res = 1; | 397 | int res = 1; |
396 | 398 | ||
@@ -409,7 +411,7 @@ int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr | |||
409 | * tipc_bearer_congested - determines if bearer is currently congested | 411 | * tipc_bearer_congested - determines if bearer is currently congested |
410 | */ | 412 | */ |
411 | 413 | ||
412 | int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr) | 414 | int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr) |
413 | { | 415 | { |
414 | if (unlikely(b_ptr->blocked)) | 416 | if (unlikely(b_ptr->blocked)) |
415 | return 1; | 417 | return 1; |
@@ -544,8 +546,8 @@ exit: | |||
544 | int tipc_block_bearer(const char *name) | 546 | int tipc_block_bearer(const char *name) |
545 | { | 547 | { |
546 | struct tipc_bearer *b_ptr = NULL; | 548 | struct tipc_bearer *b_ptr = NULL; |
547 | struct link *l_ptr; | 549 | struct tipc_link *l_ptr; |
548 | struct link *temp_l_ptr; | 550 | struct tipc_link *temp_l_ptr; |
549 | 551 | ||
550 | read_lock_bh(&tipc_net_lock); | 552 | read_lock_bh(&tipc_net_lock); |
551 | b_ptr = tipc_bearer_find(name); | 553 | b_ptr = tipc_bearer_find(name); |
@@ -579,8 +581,8 @@ int tipc_block_bearer(const char *name) | |||
579 | 581 | ||
580 | static void bearer_disable(struct tipc_bearer *b_ptr) | 582 | static void bearer_disable(struct tipc_bearer *b_ptr) |
581 | { | 583 | { |
582 | struct link *l_ptr; | 584 | struct tipc_link *l_ptr; |
583 | struct link *temp_l_ptr; | 585 | struct tipc_link *temp_l_ptr; |
584 | 586 | ||
585 | info("Disabling bearer <%s>\n", b_ptr->name); | 587 | info("Disabling bearer <%s>\n", b_ptr->name); |
586 | spin_lock_bh(&b_ptr->lock); | 588 | spin_lock_bh(&b_ptr->lock); |
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index af01ca23a6d7..348065480f2e 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
@@ -144,7 +144,7 @@ struct tipc_bearer { | |||
144 | u32 window; | 144 | u32 window; |
145 | u32 tolerance; | 145 | u32 tolerance; |
146 | u32 identity; | 146 | u32 identity; |
147 | struct link_req *link_req; | 147 | struct tipc_link_req *link_req; |
148 | struct list_head links; | 148 | struct list_head links; |
149 | struct list_head cong_links; | 149 | struct list_head cong_links; |
150 | int active; | 150 | int active; |
@@ -157,7 +157,7 @@ struct bearer_name { | |||
157 | char if_name[TIPC_MAX_IF_NAME]; | 157 | char if_name[TIPC_MAX_IF_NAME]; |
158 | }; | 158 | }; |
159 | 159 | ||
160 | struct link; | 160 | struct tipc_link; |
161 | 161 | ||
162 | extern struct tipc_bearer tipc_bearers[]; | 162 | extern struct tipc_bearer tipc_bearers[]; |
163 | 163 | ||
@@ -188,12 +188,13 @@ struct sk_buff *tipc_media_get_names(void); | |||
188 | struct sk_buff *tipc_bearer_get_names(void); | 188 | struct sk_buff *tipc_bearer_get_names(void); |
189 | void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); | 189 | void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); |
190 | void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); | 190 | void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); |
191 | void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr); | 191 | void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr); |
192 | struct tipc_bearer *tipc_bearer_find(const char *name); | 192 | struct tipc_bearer *tipc_bearer_find(const char *name); |
193 | struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); | 193 | struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); |
194 | struct tipc_media *tipc_media_find(const char *name); | 194 | struct tipc_media *tipc_media_find(const char *name); |
195 | int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr); | 195 | int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, |
196 | int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr); | 196 | struct tipc_link *l_ptr); |
197 | int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr); | ||
197 | void tipc_bearer_stop(void); | 198 | void tipc_bearer_stop(void); |
198 | void tipc_bearer_lock_push(struct tipc_bearer *b_ptr); | 199 | void tipc_bearer_lock_push(struct tipc_bearer *b_ptr); |
199 | 200 | ||
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index 420e0329036b..a00e5f811569 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * struct link_req - information about an ongoing link setup request | 48 | * struct tipc_link_req - information about an ongoing link setup request |
49 | * @bearer: bearer issuing requests | 49 | * @bearer: bearer issuing requests |
50 | * @dest: destination address for request messages | 50 | * @dest: destination address for request messages |
51 | * @domain: network domain to which links can be established | 51 | * @domain: network domain to which links can be established |
@@ -54,7 +54,7 @@ | |||
54 | * @timer: timer governing period between requests | 54 | * @timer: timer governing period between requests |
55 | * @timer_intv: current interval between requests (in ms) | 55 | * @timer_intv: current interval between requests (in ms) |
56 | */ | 56 | */ |
57 | struct link_req { | 57 | struct tipc_link_req { |
58 | struct tipc_bearer *bearer; | 58 | struct tipc_bearer *bearer; |
59 | struct tipc_media_addr dest; | 59 | struct tipc_media_addr dest; |
60 | u32 domain; | 60 | u32 domain; |
@@ -120,7 +120,7 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr, | |||
120 | void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) | 120 | void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) |
121 | { | 121 | { |
122 | struct tipc_node *n_ptr; | 122 | struct tipc_node *n_ptr; |
123 | struct link *link; | 123 | struct tipc_link *link; |
124 | struct tipc_media_addr media_addr, *addr; | 124 | struct tipc_media_addr media_addr, *addr; |
125 | struct sk_buff *rbuf; | 125 | struct sk_buff *rbuf; |
126 | struct tipc_msg *msg = buf_msg(buf); | 126 | struct tipc_msg *msg = buf_msg(buf); |
@@ -218,7 +218,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) | |||
218 | * and is either not currently searching or is searching at a slow rate | 218 | * and is either not currently searching or is searching at a slow rate |
219 | */ | 219 | */ |
220 | 220 | ||
221 | static void disc_update(struct link_req *req) | 221 | static void disc_update(struct tipc_link_req *req) |
222 | { | 222 | { |
223 | if (!req->num_nodes) { | 223 | if (!req->num_nodes) { |
224 | if ((req->timer_intv == TIPC_LINK_REQ_INACTIVE) || | 224 | if ((req->timer_intv == TIPC_LINK_REQ_INACTIVE) || |
@@ -234,7 +234,7 @@ static void disc_update(struct link_req *req) | |||
234 | * @req: ptr to link request structure | 234 | * @req: ptr to link request structure |
235 | */ | 235 | */ |
236 | 236 | ||
237 | void tipc_disc_add_dest(struct link_req *req) | 237 | void tipc_disc_add_dest(struct tipc_link_req *req) |
238 | { | 238 | { |
239 | req->num_nodes++; | 239 | req->num_nodes++; |
240 | } | 240 | } |
@@ -244,7 +244,7 @@ void tipc_disc_add_dest(struct link_req *req) | |||
244 | * @req: ptr to link request structure | 244 | * @req: ptr to link request structure |
245 | */ | 245 | */ |
246 | 246 | ||
247 | void tipc_disc_remove_dest(struct link_req *req) | 247 | void tipc_disc_remove_dest(struct tipc_link_req *req) |
248 | { | 248 | { |
249 | req->num_nodes--; | 249 | req->num_nodes--; |
250 | disc_update(req); | 250 | disc_update(req); |
@@ -255,7 +255,7 @@ void tipc_disc_remove_dest(struct link_req *req) | |||
255 | * @req: ptr to link request structure | 255 | * @req: ptr to link request structure |
256 | */ | 256 | */ |
257 | 257 | ||
258 | static void disc_send_msg(struct link_req *req) | 258 | static void disc_send_msg(struct tipc_link_req *req) |
259 | { | 259 | { |
260 | if (!req->bearer->blocked) | 260 | if (!req->bearer->blocked) |
261 | tipc_bearer_send(req->bearer, req->buf, &req->dest); | 261 | tipc_bearer_send(req->bearer, req->buf, &req->dest); |
@@ -268,7 +268,7 @@ static void disc_send_msg(struct link_req *req) | |||
268 | * Called whenever a link setup request timer associated with a bearer expires. | 268 | * Called whenever a link setup request timer associated with a bearer expires. |
269 | */ | 269 | */ |
270 | 270 | ||
271 | static void disc_timeout(struct link_req *req) | 271 | static void disc_timeout(struct tipc_link_req *req) |
272 | { | 272 | { |
273 | int max_delay; | 273 | int max_delay; |
274 | 274 | ||
@@ -316,7 +316,7 @@ exit: | |||
316 | int tipc_disc_create(struct tipc_bearer *b_ptr, | 316 | int tipc_disc_create(struct tipc_bearer *b_ptr, |
317 | struct tipc_media_addr *dest, u32 dest_domain) | 317 | struct tipc_media_addr *dest, u32 dest_domain) |
318 | { | 318 | { |
319 | struct link_req *req; | 319 | struct tipc_link_req *req; |
320 | 320 | ||
321 | req = kmalloc(sizeof(*req), GFP_ATOMIC); | 321 | req = kmalloc(sizeof(*req), GFP_ATOMIC); |
322 | if (!req) | 322 | if (!req) |
@@ -345,7 +345,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr, | |||
345 | * @req: ptr to link request structure | 345 | * @req: ptr to link request structure |
346 | */ | 346 | */ |
347 | 347 | ||
348 | void tipc_disc_delete(struct link_req *req) | 348 | void tipc_disc_delete(struct tipc_link_req *req) |
349 | { | 349 | { |
350 | k_cancel_timer(&req->timer); | 350 | k_cancel_timer(&req->timer); |
351 | k_term_timer(&req->timer); | 351 | k_term_timer(&req->timer); |
diff --git a/net/tipc/discover.h b/net/tipc/discover.h index a3af595b86cb..75b67c403aa3 100644 --- a/net/tipc/discover.h +++ b/net/tipc/discover.h | |||
@@ -37,13 +37,13 @@ | |||
37 | #ifndef _TIPC_DISCOVER_H | 37 | #ifndef _TIPC_DISCOVER_H |
38 | #define _TIPC_DISCOVER_H | 38 | #define _TIPC_DISCOVER_H |
39 | 39 | ||
40 | struct link_req; | 40 | struct tipc_link_req; |
41 | 41 | ||
42 | int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest, | 42 | int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest, |
43 | u32 dest_domain); | 43 | u32 dest_domain); |
44 | void tipc_disc_delete(struct link_req *req); | 44 | void tipc_disc_delete(struct tipc_link_req *req); |
45 | void tipc_disc_add_dest(struct link_req *req); | 45 | void tipc_disc_add_dest(struct tipc_link_req *req); |
46 | void tipc_disc_remove_dest(struct link_req *req); | 46 | void tipc_disc_remove_dest(struct tipc_link_req *req); |
47 | void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr); | 47 | void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr); |
48 | 48 | ||
49 | #endif | 49 | #endif |
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 | ||
81 | struct link_name { | 81 | struct 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 | ||
88 | static void link_handle_out_of_seq_msg(struct link *l_ptr, | 88 | static void link_handle_out_of_seq_msg(struct tipc_link *l_ptr, |
89 | struct sk_buff *buf); | 89 | struct sk_buff *buf); |
90 | static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf); | 90 | static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf); |
91 | static int link_recv_changeover_msg(struct link **l_ptr, struct sk_buff **buf); | 91 | static int link_recv_changeover_msg(struct tipc_link **l_ptr, |
92 | static void link_set_supervision_props(struct link *l_ptr, u32 tolerance); | 92 | struct sk_buff **buf); |
93 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance); | ||
93 | static int link_send_sections_long(struct tipc_port *sender, | 94 | static 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); |
97 | static void link_check_defragm_bufs(struct link *l_ptr); | 98 | static void link_check_defragm_bufs(struct tipc_link *l_ptr); |
98 | static void link_state_event(struct link *l_ptr, u32 event); | 99 | static void link_state_event(struct tipc_link *l_ptr, u32 event); |
99 | static void link_reset_statistics(struct link *l_ptr); | 100 | static void link_reset_statistics(struct tipc_link *l_ptr); |
100 | static void link_print(struct link *l_ptr, const char *str); | 101 | static void link_print(struct tipc_link *l_ptr, const char *str); |
101 | static void link_start(struct link *l_ptr); | 102 | static void link_start(struct tipc_link *l_ptr); |
102 | static int link_send_long_buf(struct link *l_ptr, struct sk_buff *buf); | 103 | static 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 | ||
113 | static void link_init_max_pkt(struct link *l_ptr) | 114 | static 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 | ||
130 | static u32 link_next_sent(struct link *l_ptr) | 131 | static 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 | ||
137 | static u32 link_last_sent(struct link *l_ptr) | 138 | static 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 | ||
146 | int tipc_link_is_up(struct link *l_ptr) | 147 | int 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 | ||
153 | int tipc_link_is_active(struct link *l_ptr) | 154 | int 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 | ||
167 | static int link_name_validate(const char *name, struct link_name *name_parts) | 168 | static 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 | ||
241 | static void link_timeout(struct link *l_ptr) | 243 | static 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 | ||
290 | static void link_set_timer(struct link *l_ptr, u32 time) | 292 | static 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 | ||
304 | struct link *tipc_link_create(struct tipc_node *n_ptr, | 306 | struct 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 | ||
385 | void tipc_link_delete(struct link *l_ptr) | 387 | void 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 | ||
404 | static void link_start(struct link *l_ptr) | 406 | static 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 | ||
421 | static int link_schedule_port(struct link *l_ptr, u32 origport, u32 sz) | 423 | static 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 | ||
443 | void tipc_link_wakeup_ports(struct link *l_ptr, int all) | 445 | void 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 | ||
478 | static void link_release_outqueue(struct link *l_ptr) | 480 | static 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 | ||
497 | void tipc_link_reset_fragments(struct link *l_ptr) | 499 | void 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 | ||
515 | void tipc_link_stop(struct link *l_ptr) | 517 | void 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 | ||
540 | void tipc_link_reset(struct link *l_ptr) | 542 | void 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 | ||
600 | static void link_activate(struct link *l_ptr) | 602 | static 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 | ||
613 | static void link_state_event(struct link *l_ptr, unsigned event) | 615 | static 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 | ||
787 | static int link_bundle_buf(struct link *l_ptr, | 789 | static 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 | ||
816 | static void link_add_to_outqueue(struct link *l_ptr, | 818 | static 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 | ||
837 | static void link_add_chain_to_outqueue(struct link *l_ptr, | 839 | static 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 | ||
862 | int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | 864 | int 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 | ||
955 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) | 957 | int 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) | |||
988 | void tipc_link_send_names(struct list_head *message_list, u32 dest) | 990 | void 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 | ||
1030 | static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, | 1032 | static 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 | */ |
1062 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) | 1064 | int 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 | */ |
1345 | u32 tipc_link_push_packet(struct link *l_ptr) | 1347 | u32 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 | */ |
1429 | void tipc_link_push_queue(struct link *l_ptr) | 1431 | void 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 | ||
1473 | static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | 1475 | static 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 | ||
1517 | void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, | 1520 | void 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 | ||
1574 | static struct sk_buff *link_insert_deferred_queue(struct link *l_ptr, | 1577 | static 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 | ||
1909 | static void link_handle_out_of_seq_msg(struct link *l_ptr, | 1912 | static 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 | */ |
1947 | void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int probe_msg, | 1950 | void 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 | ||
2065 | static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf) | 2069 | static 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 | */ |
2198 | static void tipc_link_tunnel(struct link *l_ptr, | 2202 | static 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 | ||
2232 | void tipc_link_changeover(struct link *l_ptr) | 2236 | void 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 | ||
2295 | void tipc_link_send_duplicate(struct link *l_ptr, struct link *tunnel) | 2299 | void 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 | ||
2359 | static int link_recv_changeover_msg(struct link **l_ptr, | 2363 | static 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 | */ |
2463 | static int link_send_long_buf(struct link *l_ptr, struct sk_buff *buf) | 2467 | static 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 | ||
2659 | static void link_check_defragm_bufs(struct link *l_ptr) | 2663 | static 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 | ||
2689 | static void link_set_supervision_props(struct link *l_ptr, u32 tolerance) | 2693 | static 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 | ||
2701 | void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) | 2705 | void 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 | ||
2731 | static struct link *link_find_link(const char *name, struct tipc_node **node) | 2735 | static 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) | |||
2791 | static int link_cmd_set_value(const char *name, u32 new_value, u16 cmd) | 2796 | static 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 | ||
2896 | static void link_reset_statistics(struct link *l_ptr) | 2901 | static 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) | |||
2903 | struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space) | 2908 | struct 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) | |||
2951 | static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) | 2956 | static 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 | |||
3073 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) | 3078 | u32 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 | ||
3095 | static void link_print(struct link *l_ptr, const char *str) | 3100 | static 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; |
diff --git a/net/tipc/link.h b/net/tipc/link.h index d35b0f3045ea..73c18c140e1d 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
@@ -67,7 +67,7 @@ | |||
67 | #define MAX_PKT_DEFAULT 1500 | 67 | #define MAX_PKT_DEFAULT 1500 |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * struct link - TIPC link data structure | 70 | * struct tipc_link - TIPC link data structure |
71 | * @addr: network address of link's peer node | 71 | * @addr: network address of link's peer node |
72 | * @name: link name character string | 72 | * @name: link name character string |
73 | * @media_addr: media address to use when sending messages over link | 73 | * @media_addr: media address to use when sending messages over link |
@@ -115,7 +115,7 @@ | |||
115 | * @stats: collects statistics regarding link activity | 115 | * @stats: collects statistics regarding link activity |
116 | */ | 116 | */ |
117 | 117 | ||
118 | struct link { | 118 | struct tipc_link { |
119 | u32 addr; | 119 | u32 addr; |
120 | char name[TIPC_MAX_LINK_NAME]; | 120 | char name[TIPC_MAX_LINK_NAME]; |
121 | struct tipc_media_addr media_addr; | 121 | struct tipc_media_addr media_addr; |
@@ -213,24 +213,24 @@ struct link { | |||
213 | 213 | ||
214 | struct tipc_port; | 214 | struct tipc_port; |
215 | 215 | ||
216 | struct link *tipc_link_create(struct tipc_node *n_ptr, | 216 | struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, |
217 | struct tipc_bearer *b_ptr, | 217 | struct tipc_bearer *b_ptr, |
218 | const struct tipc_media_addr *media_addr); | 218 | const struct tipc_media_addr *media_addr); |
219 | void tipc_link_delete(struct link *l_ptr); | 219 | void tipc_link_delete(struct tipc_link *l_ptr); |
220 | void tipc_link_changeover(struct link *l_ptr); | 220 | void tipc_link_changeover(struct tipc_link *l_ptr); |
221 | void tipc_link_send_duplicate(struct link *l_ptr, struct link *dest); | 221 | void tipc_link_send_duplicate(struct tipc_link *l_ptr, struct tipc_link *dest); |
222 | void tipc_link_reset_fragments(struct link *l_ptr); | 222 | void tipc_link_reset_fragments(struct tipc_link *l_ptr); |
223 | int tipc_link_is_up(struct link *l_ptr); | 223 | int tipc_link_is_up(struct tipc_link *l_ptr); |
224 | int tipc_link_is_active(struct link *l_ptr); | 224 | int tipc_link_is_active(struct tipc_link *l_ptr); |
225 | u32 tipc_link_push_packet(struct link *l_ptr); | 225 | u32 tipc_link_push_packet(struct tipc_link *l_ptr); |
226 | void tipc_link_stop(struct link *l_ptr); | 226 | void tipc_link_stop(struct tipc_link *l_ptr); |
227 | struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space, u16 cmd); | 227 | struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space, u16 cmd); |
228 | struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, int req_tlv_space); | 228 | struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, int req_tlv_space); |
229 | struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space); | 229 | struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space); |
230 | void tipc_link_reset(struct link *l_ptr); | 230 | void tipc_link_reset(struct tipc_link *l_ptr); |
231 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector); | 231 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector); |
232 | void tipc_link_send_names(struct list_head *message_list, u32 dest); | 232 | void tipc_link_send_names(struct list_head *message_list, u32 dest); |
233 | int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf); | 233 | int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf); |
234 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector); | 234 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector); |
235 | int tipc_link_send_sections_fast(struct tipc_port *sender, | 235 | int tipc_link_send_sections_fast(struct tipc_port *sender, |
236 | struct iovec const *msg_sect, | 236 | struct iovec const *msg_sect, |
@@ -241,14 +241,16 @@ void tipc_link_recv_bundle(struct sk_buff *buf); | |||
241 | int tipc_link_recv_fragment(struct sk_buff **pending, | 241 | int tipc_link_recv_fragment(struct sk_buff **pending, |
242 | struct sk_buff **fb, | 242 | struct sk_buff **fb, |
243 | struct tipc_msg **msg); | 243 | struct tipc_msg **msg); |
244 | void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int prob, u32 gap, | 244 | void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ, int prob, |
245 | u32 tolerance, u32 priority, u32 acked_mtu); | 245 | u32 gap, u32 tolerance, u32 priority, |
246 | void tipc_link_push_queue(struct link *l_ptr); | 246 | u32 acked_mtu); |
247 | void tipc_link_push_queue(struct tipc_link *l_ptr); | ||
247 | u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail, | 248 | u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail, |
248 | struct sk_buff *buf); | 249 | struct sk_buff *buf); |
249 | void tipc_link_wakeup_ports(struct link *l_ptr, int all); | 250 | void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all); |
250 | void tipc_link_set_queue_limits(struct link *l_ptr, u32 window); | 251 | void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window); |
251 | void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *start, u32 retransmits); | 252 | void tipc_link_retransmit(struct tipc_link *l_ptr, |
253 | struct sk_buff *start, u32 retransmits); | ||
252 | 254 | ||
253 | /* | 255 | /* |
254 | * Link sequence number manipulation routines (uses modulo 2**16 arithmetic) | 256 | * Link sequence number manipulation routines (uses modulo 2**16 arithmetic) |
@@ -293,32 +295,32 @@ static inline u32 lesser(u32 left, u32 right) | |||
293 | * Link status checking routines | 295 | * Link status checking routines |
294 | */ | 296 | */ |
295 | 297 | ||
296 | static inline int link_working_working(struct link *l_ptr) | 298 | static inline int link_working_working(struct tipc_link *l_ptr) |
297 | { | 299 | { |
298 | return l_ptr->state == WORKING_WORKING; | 300 | return l_ptr->state == WORKING_WORKING; |
299 | } | 301 | } |
300 | 302 | ||
301 | static inline int link_working_unknown(struct link *l_ptr) | 303 | static inline int link_working_unknown(struct tipc_link *l_ptr) |
302 | { | 304 | { |
303 | return l_ptr->state == WORKING_UNKNOWN; | 305 | return l_ptr->state == WORKING_UNKNOWN; |
304 | } | 306 | } |
305 | 307 | ||
306 | static inline int link_reset_unknown(struct link *l_ptr) | 308 | static inline int link_reset_unknown(struct tipc_link *l_ptr) |
307 | { | 309 | { |
308 | return l_ptr->state == RESET_UNKNOWN; | 310 | return l_ptr->state == RESET_UNKNOWN; |
309 | } | 311 | } |
310 | 312 | ||
311 | static inline int link_reset_reset(struct link *l_ptr) | 313 | static inline int link_reset_reset(struct tipc_link *l_ptr) |
312 | { | 314 | { |
313 | return l_ptr->state == RESET_RESET; | 315 | return l_ptr->state == RESET_RESET; |
314 | } | 316 | } |
315 | 317 | ||
316 | static inline int link_blocked(struct link *l_ptr) | 318 | static inline int link_blocked(struct tipc_link *l_ptr) |
317 | { | 319 | { |
318 | return l_ptr->exp_msg_count || l_ptr->blocked; | 320 | return l_ptr->exp_msg_count || l_ptr->blocked; |
319 | } | 321 | } |
320 | 322 | ||
321 | static inline int link_congested(struct link *l_ptr) | 323 | static inline int link_congested(struct tipc_link *l_ptr) |
322 | { | 324 | { |
323 | return l_ptr->out_queue_size >= l_ptr->queue_limit[0]; | 325 | return l_ptr->out_queue_size >= l_ptr->queue_limit[0]; |
324 | } | 326 | } |
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index be8306f9139e..98ebb37f1808 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c | |||
@@ -176,7 +176,7 @@ void tipc_named_withdraw(struct publication *publ) | |||
176 | void tipc_named_node_up(unsigned long nodearg) | 176 | void tipc_named_node_up(unsigned long nodearg) |
177 | { | 177 | { |
178 | struct tipc_node *n_ptr; | 178 | struct tipc_node *n_ptr; |
179 | struct link *l_ptr; | 179 | struct tipc_link *l_ptr; |
180 | struct publication *publ; | 180 | struct publication *publ; |
181 | struct distr_item *item = NULL; | 181 | struct distr_item *item = NULL; |
182 | struct sk_buff *buf = NULL; | 182 | struct sk_buff *buf = NULL; |
diff --git a/net/tipc/node.c b/net/tipc/node.c index e530de279be9..6b226faad89f 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -136,9 +136,9 @@ void tipc_node_delete(struct tipc_node *n_ptr) | |||
136 | * Link becomes active (alone or shared) or standby, depending on its priority. | 136 | * Link becomes active (alone or shared) or standby, depending on its priority. |
137 | */ | 137 | */ |
138 | 138 | ||
139 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) | 139 | void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr) |
140 | { | 140 | { |
141 | struct link **active = &n_ptr->active_links[0]; | 141 | struct tipc_link **active = &n_ptr->active_links[0]; |
142 | 142 | ||
143 | n_ptr->working_links++; | 143 | n_ptr->working_links++; |
144 | 144 | ||
@@ -171,14 +171,14 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) | |||
171 | 171 | ||
172 | static void node_select_active_links(struct tipc_node *n_ptr) | 172 | static void node_select_active_links(struct tipc_node *n_ptr) |
173 | { | 173 | { |
174 | struct link **active = &n_ptr->active_links[0]; | 174 | struct tipc_link **active = &n_ptr->active_links[0]; |
175 | u32 i; | 175 | u32 i; |
176 | u32 highest_prio = 0; | 176 | u32 highest_prio = 0; |
177 | 177 | ||
178 | active[0] = active[1] = NULL; | 178 | active[0] = active[1] = NULL; |
179 | 179 | ||
180 | for (i = 0; i < MAX_BEARERS; i++) { | 180 | for (i = 0; i < MAX_BEARERS; i++) { |
181 | struct link *l_ptr = n_ptr->links[i]; | 181 | struct tipc_link *l_ptr = n_ptr->links[i]; |
182 | 182 | ||
183 | if (!l_ptr || !tipc_link_is_up(l_ptr) || | 183 | if (!l_ptr || !tipc_link_is_up(l_ptr) || |
184 | (l_ptr->priority < highest_prio)) | 184 | (l_ptr->priority < highest_prio)) |
@@ -197,9 +197,9 @@ static void node_select_active_links(struct tipc_node *n_ptr) | |||
197 | * tipc_node_link_down - handle loss of link | 197 | * tipc_node_link_down - handle loss of link |
198 | */ | 198 | */ |
199 | 199 | ||
200 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr) | 200 | void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr) |
201 | { | 201 | { |
202 | struct link **active; | 202 | struct tipc_link **active; |
203 | 203 | ||
204 | n_ptr->working_links--; | 204 | n_ptr->working_links--; |
205 | 205 | ||
@@ -239,14 +239,14 @@ int tipc_node_is_up(struct tipc_node *n_ptr) | |||
239 | return tipc_node_active_links(n_ptr); | 239 | return tipc_node_active_links(n_ptr); |
240 | } | 240 | } |
241 | 241 | ||
242 | void tipc_node_attach_link(struct tipc_node *n_ptr, struct link *l_ptr) | 242 | void tipc_node_attach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr) |
243 | { | 243 | { |
244 | n_ptr->links[l_ptr->b_ptr->identity] = l_ptr; | 244 | n_ptr->links[l_ptr->b_ptr->identity] = l_ptr; |
245 | atomic_inc(&tipc_num_links); | 245 | atomic_inc(&tipc_num_links); |
246 | n_ptr->link_cnt++; | 246 | n_ptr->link_cnt++; |
247 | } | 247 | } |
248 | 248 | ||
249 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr) | 249 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr) |
250 | { | 250 | { |
251 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; | 251 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; |
252 | atomic_dec(&tipc_num_links); | 252 | atomic_dec(&tipc_num_links); |
@@ -360,7 +360,7 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
360 | 360 | ||
361 | /* Abort link changeover */ | 361 | /* Abort link changeover */ |
362 | for (i = 0; i < MAX_BEARERS; i++) { | 362 | for (i = 0; i < MAX_BEARERS; i++) { |
363 | struct link *l_ptr = n_ptr->links[i]; | 363 | struct tipc_link *l_ptr = n_ptr->links[i]; |
364 | if (!l_ptr) | 364 | if (!l_ptr) |
365 | continue; | 365 | continue; |
366 | l_ptr->reset_checkpoint = l_ptr->next_in_no; | 366 | l_ptr->reset_checkpoint = l_ptr->next_in_no; |
diff --git a/net/tipc/node.h b/net/tipc/node.h index 4f15cb40aaa4..0b1c5f8b6996 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -79,8 +79,8 @@ struct tipc_node { | |||
79 | struct hlist_node hash; | 79 | struct hlist_node hash; |
80 | struct list_head list; | 80 | struct list_head list; |
81 | struct list_head nsub; | 81 | struct list_head nsub; |
82 | struct link *active_links[2]; | 82 | struct tipc_link *active_links[2]; |
83 | struct link *links[MAX_BEARERS]; | 83 | struct tipc_link *links[MAX_BEARERS]; |
84 | int link_cnt; | 84 | int link_cnt; |
85 | int working_links; | 85 | int working_links; |
86 | int block_setup; | 86 | int block_setup; |
@@ -117,10 +117,10 @@ extern u32 tipc_own_tag; | |||
117 | struct tipc_node *tipc_node_find(u32 addr); | 117 | struct tipc_node *tipc_node_find(u32 addr); |
118 | struct tipc_node *tipc_node_create(u32 addr); | 118 | struct tipc_node *tipc_node_create(u32 addr); |
119 | void tipc_node_delete(struct tipc_node *n_ptr); | 119 | void tipc_node_delete(struct tipc_node *n_ptr); |
120 | void tipc_node_attach_link(struct tipc_node *n_ptr, struct link *l_ptr); | 120 | void tipc_node_attach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr); |
121 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr); | 121 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr); |
122 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); | 122 | void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr); |
123 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); | 123 | void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr); |
124 | int tipc_node_active_links(struct tipc_node *n_ptr); | 124 | int tipc_node_active_links(struct tipc_node *n_ptr); |
125 | int tipc_node_redundant_links(struct tipc_node *n_ptr); | 125 | int tipc_node_redundant_links(struct tipc_node *n_ptr); |
126 | int tipc_node_is_up(struct tipc_node *n_ptr); | 126 | int tipc_node_is_up(struct tipc_node *n_ptr); |