Commit a18c4bc3 authored by Paul Gortmaker's avatar Paul Gortmaker

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: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 7f9ab6ac
...@@ -94,7 +94,7 @@ struct tipc_bcbearer { ...@@ -94,7 +94,7 @@ struct tipc_bcbearer {
*/ */
struct tipc_bclink { struct tipc_bclink {
struct link link; struct tipc_link link;
struct tipc_node node; struct tipc_node node;
struct tipc_node_map bcast_nodes; struct tipc_node_map bcast_nodes;
struct tipc_node *retransmit_to; struct tipc_node *retransmit_to;
...@@ -105,7 +105,7 @@ static struct tipc_bclink bcast_link; ...@@ -105,7 +105,7 @@ static struct tipc_bclink bcast_link;
static struct tipc_bcbearer *bcbearer = &bcast_bearer; static struct tipc_bcbearer *bcbearer = &bcast_bearer;
static struct tipc_bclink *bclink = &bcast_link; static struct tipc_bclink *bclink = &bcast_link;
static struct link *bcl = &bcast_link.link; static struct tipc_link *bcl = &bcast_link.link;
static DEFINE_SPINLOCK(bc_lock); static DEFINE_SPINLOCK(bc_lock);
...@@ -308,7 +308,7 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) ...@@ -308,7 +308,7 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
static void bclink_send_ack(struct tipc_node *n_ptr) static void bclink_send_ack(struct tipc_node *n_ptr)
{ {
struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; struct tipc_link *l_ptr = n_ptr->active_links[n_ptr->addr & 1];
if (l_ptr != NULL) if (l_ptr != NULL)
tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0); tipc_link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, 0, 0);
......
...@@ -318,7 +318,7 @@ void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest) ...@@ -318,7 +318,7 @@ void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest)
static int bearer_push(struct tipc_bearer *b_ptr) static int bearer_push(struct tipc_bearer *b_ptr)
{ {
u32 res = 0; u32 res = 0;
struct link *ln, *tln; struct tipc_link *ln, *tln;
if (b_ptr->blocked) if (b_ptr->blocked)
return 0; return 0;
...@@ -364,7 +364,8 @@ void tipc_continue(struct tipc_bearer *b_ptr) ...@@ -364,7 +364,8 @@ void tipc_continue(struct tipc_bearer *b_ptr)
* bearer.lock is busy * bearer.lock is busy
*/ */
static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link *l_ptr) static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr,
struct tipc_link *l_ptr)
{ {
list_move_tail(&l_ptr->link_list, &b_ptr->cong_links); list_move_tail(&l_ptr->link_list, &b_ptr->cong_links);
} }
...@@ -377,7 +378,7 @@ static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link ...@@ -377,7 +378,7 @@ static void tipc_bearer_schedule_unlocked(struct tipc_bearer *b_ptr, struct link
* bearer.lock is free * bearer.lock is free
*/ */
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr) void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr)
{ {
spin_lock_bh(&b_ptr->lock); spin_lock_bh(&b_ptr->lock);
tipc_bearer_schedule_unlocked(b_ptr, l_ptr); 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,7 +391,8 @@ void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr)
* and if there is, try to resolve it before returning. * and if there is, try to resolve it before returning.
* 'tipc_net_lock' is read_locked when this function is called * 'tipc_net_lock' is read_locked when this function is called
*/ */
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr) int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr,
struct tipc_link *l_ptr)
{ {
int res = 1; int res = 1;
...@@ -409,7 +411,7 @@ int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr ...@@ -409,7 +411,7 @@ int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr
* tipc_bearer_congested - determines if bearer is currently congested * tipc_bearer_congested - determines if bearer is currently congested
*/ */
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr) int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr)
{ {
if (unlikely(b_ptr->blocked)) if (unlikely(b_ptr->blocked))
return 1; return 1;
...@@ -544,8 +546,8 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority) ...@@ -544,8 +546,8 @@ int tipc_enable_bearer(const char *name, u32 disc_domain, u32 priority)
int tipc_block_bearer(const char *name) int tipc_block_bearer(const char *name)
{ {
struct tipc_bearer *b_ptr = NULL; struct tipc_bearer *b_ptr = NULL;
struct link *l_ptr; struct tipc_link *l_ptr;
struct link *temp_l_ptr; struct tipc_link *temp_l_ptr;
read_lock_bh(&tipc_net_lock); read_lock_bh(&tipc_net_lock);
b_ptr = tipc_bearer_find(name); b_ptr = tipc_bearer_find(name);
...@@ -579,8 +581,8 @@ int tipc_block_bearer(const char *name) ...@@ -579,8 +581,8 @@ int tipc_block_bearer(const char *name)
static void bearer_disable(struct tipc_bearer *b_ptr) static void bearer_disable(struct tipc_bearer *b_ptr)
{ {
struct link *l_ptr; struct tipc_link *l_ptr;
struct link *temp_l_ptr; struct tipc_link *temp_l_ptr;
info("Disabling bearer <%s>\n", b_ptr->name); info("Disabling bearer <%s>\n", b_ptr->name);
spin_lock_bh(&b_ptr->lock); spin_lock_bh(&b_ptr->lock);
......
...@@ -144,7 +144,7 @@ struct tipc_bearer { ...@@ -144,7 +144,7 @@ struct tipc_bearer {
u32 window; u32 window;
u32 tolerance; u32 tolerance;
u32 identity; u32 identity;
struct link_req *link_req; struct tipc_link_req *link_req;
struct list_head links; struct list_head links;
struct list_head cong_links; struct list_head cong_links;
int active; int active;
...@@ -157,7 +157,7 @@ struct bearer_name { ...@@ -157,7 +157,7 @@ struct bearer_name {
char if_name[TIPC_MAX_IF_NAME]; char if_name[TIPC_MAX_IF_NAME];
}; };
struct link; struct tipc_link;
extern struct tipc_bearer tipc_bearers[]; extern struct tipc_bearer tipc_bearers[];
...@@ -188,12 +188,13 @@ struct sk_buff *tipc_media_get_names(void); ...@@ -188,12 +188,13 @@ struct sk_buff *tipc_media_get_names(void);
struct sk_buff *tipc_bearer_get_names(void); struct sk_buff *tipc_bearer_get_names(void);
void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest); void tipc_bearer_add_dest(struct tipc_bearer *b_ptr, u32 dest);
void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest); void tipc_bearer_remove_dest(struct tipc_bearer *b_ptr, u32 dest);
void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct link *l_ptr); void tipc_bearer_schedule(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr);
struct tipc_bearer *tipc_bearer_find(const char *name); struct tipc_bearer *tipc_bearer_find(const char *name);
struct tipc_bearer *tipc_bearer_find_interface(const char *if_name); struct tipc_bearer *tipc_bearer_find_interface(const char *if_name);
struct tipc_media *tipc_media_find(const char *name); struct tipc_media *tipc_media_find(const char *name);
int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr, struct link *l_ptr); int tipc_bearer_resolve_congestion(struct tipc_bearer *b_ptr,
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct link *l_ptr); struct tipc_link *l_ptr);
int tipc_bearer_congested(struct tipc_bearer *b_ptr, struct tipc_link *l_ptr);
void tipc_bearer_stop(void); void tipc_bearer_stop(void);
void tipc_bearer_lock_push(struct tipc_bearer *b_ptr); void tipc_bearer_lock_push(struct tipc_bearer *b_ptr);
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
/** /**
* struct link_req - information about an ongoing link setup request * struct tipc_link_req - information about an ongoing link setup request
* @bearer: bearer issuing requests * @bearer: bearer issuing requests
* @dest: destination address for request messages * @dest: destination address for request messages
* @domain: network domain to which links can be established * @domain: network domain to which links can be established
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* @timer: timer governing period between requests * @timer: timer governing period between requests
* @timer_intv: current interval between requests (in ms) * @timer_intv: current interval between requests (in ms)
*/ */
struct link_req { struct tipc_link_req {
struct tipc_bearer *bearer; struct tipc_bearer *bearer;
struct tipc_media_addr dest; struct tipc_media_addr dest;
u32 domain; u32 domain;
...@@ -120,7 +120,7 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr, ...@@ -120,7 +120,7 @@ static void disc_dupl_alert(struct tipc_bearer *b_ptr, u32 node_addr,
void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr) void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
{ {
struct tipc_node *n_ptr; struct tipc_node *n_ptr;
struct link *link; struct tipc_link *link;
struct tipc_media_addr media_addr, *addr; struct tipc_media_addr media_addr, *addr;
struct sk_buff *rbuf; struct sk_buff *rbuf;
struct tipc_msg *msg = buf_msg(buf); 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,7 +218,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
* and is either not currently searching or is searching at a slow rate * and is either not currently searching or is searching at a slow rate
*/ */
static void disc_update(struct link_req *req) static void disc_update(struct tipc_link_req *req)
{ {
if (!req->num_nodes) { if (!req->num_nodes) {
if ((req->timer_intv == TIPC_LINK_REQ_INACTIVE) || if ((req->timer_intv == TIPC_LINK_REQ_INACTIVE) ||
...@@ -234,7 +234,7 @@ static void disc_update(struct link_req *req) ...@@ -234,7 +234,7 @@ static void disc_update(struct link_req *req)
* @req: ptr to link request structure * @req: ptr to link request structure
*/ */
void tipc_disc_add_dest(struct link_req *req) void tipc_disc_add_dest(struct tipc_link_req *req)
{ {
req->num_nodes++; req->num_nodes++;
} }
...@@ -244,7 +244,7 @@ void tipc_disc_add_dest(struct link_req *req) ...@@ -244,7 +244,7 @@ void tipc_disc_add_dest(struct link_req *req)
* @req: ptr to link request structure * @req: ptr to link request structure
*/ */
void tipc_disc_remove_dest(struct link_req *req) void tipc_disc_remove_dest(struct tipc_link_req *req)
{ {
req->num_nodes--; req->num_nodes--;
disc_update(req); disc_update(req);
...@@ -255,7 +255,7 @@ void tipc_disc_remove_dest(struct link_req *req) ...@@ -255,7 +255,7 @@ void tipc_disc_remove_dest(struct link_req *req)
* @req: ptr to link request structure * @req: ptr to link request structure
*/ */
static void disc_send_msg(struct link_req *req) static void disc_send_msg(struct tipc_link_req *req)
{ {
if (!req->bearer->blocked) if (!req->bearer->blocked)
tipc_bearer_send(req->bearer, req->buf, &req->dest); tipc_bearer_send(req->bearer, req->buf, &req->dest);
...@@ -268,7 +268,7 @@ static void disc_send_msg(struct link_req *req) ...@@ -268,7 +268,7 @@ static void disc_send_msg(struct link_req *req)
* Called whenever a link setup request timer associated with a bearer expires. * Called whenever a link setup request timer associated with a bearer expires.
*/ */
static void disc_timeout(struct link_req *req) static void disc_timeout(struct tipc_link_req *req)
{ {
int max_delay; int max_delay;
...@@ -316,7 +316,7 @@ static void disc_timeout(struct link_req *req) ...@@ -316,7 +316,7 @@ static void disc_timeout(struct link_req *req)
int tipc_disc_create(struct tipc_bearer *b_ptr, int tipc_disc_create(struct tipc_bearer *b_ptr,
struct tipc_media_addr *dest, u32 dest_domain) struct tipc_media_addr *dest, u32 dest_domain)
{ {
struct link_req *req; struct tipc_link_req *req;
req = kmalloc(sizeof(*req), GFP_ATOMIC); req = kmalloc(sizeof(*req), GFP_ATOMIC);
if (!req) if (!req)
...@@ -345,7 +345,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr, ...@@ -345,7 +345,7 @@ int tipc_disc_create(struct tipc_bearer *b_ptr,
* @req: ptr to link request structure * @req: ptr to link request structure
*/ */
void tipc_disc_delete(struct link_req *req) void tipc_disc_delete(struct tipc_link_req *req)
{ {
k_cancel_timer(&req->timer); k_cancel_timer(&req->timer);
k_term_timer(&req->timer); k_term_timer(&req->timer);
......
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
#ifndef _TIPC_DISCOVER_H #ifndef _TIPC_DISCOVER_H
#define _TIPC_DISCOVER_H #define _TIPC_DISCOVER_H
struct link_req; struct tipc_link_req;
int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest, int tipc_disc_create(struct tipc_bearer *b_ptr, struct tipc_media_addr *dest,
u32 dest_domain); u32 dest_domain);
void tipc_disc_delete(struct link_req *req); void tipc_disc_delete(struct tipc_link_req *req);
void tipc_disc_add_dest(struct link_req *req); void tipc_disc_add_dest(struct tipc_link_req *req);
void tipc_disc_remove_dest(struct link_req *req); void tipc_disc_remove_dest(struct tipc_link_req *req);
void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr); void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr);
#endif #endif
This diff is collapsed.
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#define MAX_PKT_DEFAULT 1500 #define MAX_PKT_DEFAULT 1500
/** /**
* struct link - TIPC link data structure * struct tipc_link - TIPC link data structure
* @addr: network address of link's peer node * @addr: network address of link's peer node
* @name: link name character string * @name: link name character string
* @media_addr: media address to use when sending messages over link * @media_addr: media address to use when sending messages over link
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
* @stats: collects statistics regarding link activity * @stats: collects statistics regarding link activity
*/ */
struct link { struct tipc_link {
u32 addr; u32 addr;
char name[TIPC_MAX_LINK_NAME]; char name[TIPC_MAX_LINK_NAME];
struct tipc_media_addr media_addr; struct tipc_media_addr media_addr;
...@@ -213,24 +213,24 @@ struct link { ...@@ -213,24 +213,24 @@ struct link {
struct tipc_port; struct tipc_port;
struct link *tipc_link_create(struct tipc_node *n_ptr, struct tipc_link *tipc_link_create(struct tipc_node *n_ptr,
struct tipc_bearer *b_ptr, struct tipc_bearer *b_ptr,
const struct tipc_media_addr *media_addr); const struct tipc_media_addr *media_addr);
void tipc_link_delete(struct link *l_ptr); void tipc_link_delete(struct tipc_link *l_ptr);
void tipc_link_changeover(struct link *l_ptr); void tipc_link_changeover(struct tipc_link *l_ptr);
void tipc_link_send_duplicate(struct link *l_ptr, struct link *dest); void tipc_link_send_duplicate(struct tipc_link *l_ptr, struct tipc_link *dest);
void tipc_link_reset_fragments(struct link *l_ptr); void tipc_link_reset_fragments(struct tipc_link *l_ptr);
int tipc_link_is_up(struct link *l_ptr); int tipc_link_is_up(struct tipc_link *l_ptr);
int tipc_link_is_active(struct link *l_ptr); int tipc_link_is_active(struct tipc_link *l_ptr);
u32 tipc_link_push_packet(struct link *l_ptr); u32 tipc_link_push_packet(struct tipc_link *l_ptr);
void tipc_link_stop(struct link *l_ptr); void tipc_link_stop(struct tipc_link *l_ptr);
struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space, u16 cmd); struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space, u16 cmd);
struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, int req_tlv_space); struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, int req_tlv_space);
struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space); struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_space);
void tipc_link_reset(struct link *l_ptr); void tipc_link_reset(struct tipc_link *l_ptr);
int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector); int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector);
void tipc_link_send_names(struct list_head *message_list, u32 dest); void tipc_link_send_names(struct list_head *message_list, u32 dest);
int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf); int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf);
u32 tipc_link_get_max_pkt(u32 dest, u32 selector); u32 tipc_link_get_max_pkt(u32 dest, u32 selector);
int tipc_link_send_sections_fast(struct tipc_port *sender, int tipc_link_send_sections_fast(struct tipc_port *sender,
struct iovec const *msg_sect, struct iovec const *msg_sect,
...@@ -241,14 +241,16 @@ void tipc_link_recv_bundle(struct sk_buff *buf); ...@@ -241,14 +241,16 @@ void tipc_link_recv_bundle(struct sk_buff *buf);
int tipc_link_recv_fragment(struct sk_buff **pending, int tipc_link_recv_fragment(struct sk_buff **pending,
struct sk_buff **fb, struct sk_buff **fb,
struct tipc_msg **msg); struct tipc_msg **msg);
void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int prob, u32 gap, void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ, int prob,
u32 tolerance, u32 priority, u32 acked_mtu); u32 gap, u32 tolerance, u32 priority,
void tipc_link_push_queue(struct link *l_ptr); u32 acked_mtu);
void tipc_link_push_queue(struct tipc_link *l_ptr);
u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail, u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail,
struct sk_buff *buf); struct sk_buff *buf);
void tipc_link_wakeup_ports(struct link *l_ptr, int all); void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all);
void tipc_link_set_queue_limits(struct link *l_ptr, u32 window); void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window);
void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *start, u32 retransmits); void tipc_link_retransmit(struct tipc_link *l_ptr,
struct sk_buff *start, u32 retransmits);
/* /*
* Link sequence number manipulation routines (uses modulo 2**16 arithmetic) * Link sequence number manipulation routines (uses modulo 2**16 arithmetic)
...@@ -293,32 +295,32 @@ static inline u32 lesser(u32 left, u32 right) ...@@ -293,32 +295,32 @@ static inline u32 lesser(u32 left, u32 right)
* Link status checking routines * Link status checking routines
*/ */
static inline int link_working_working(struct link *l_ptr) static inline int link_working_working(struct tipc_link *l_ptr)
{ {
return l_ptr->state == WORKING_WORKING; return l_ptr->state == WORKING_WORKING;
} }
static inline int link_working_unknown(struct link *l_ptr) static inline int link_working_unknown(struct tipc_link *l_ptr)
{ {
return l_ptr->state == WORKING_UNKNOWN; return l_ptr->state == WORKING_UNKNOWN;
} }
static inline int link_reset_unknown(struct link *l_ptr) static inline int link_reset_unknown(struct tipc_link *l_ptr)
{ {
return l_ptr->state == RESET_UNKNOWN; return l_ptr->state == RESET_UNKNOWN;
} }
static inline int link_reset_reset(struct link *l_ptr) static inline int link_reset_reset(struct tipc_link *l_ptr)
{ {
return l_ptr->state == RESET_RESET; return l_ptr->state == RESET_RESET;
} }
static inline int link_blocked(struct link *l_ptr) static inline int link_blocked(struct tipc_link *l_ptr)
{ {
return l_ptr->exp_msg_count || l_ptr->blocked; return l_ptr->exp_msg_count || l_ptr->blocked;
} }
static inline int link_congested(struct link *l_ptr) static inline int link_congested(struct tipc_link *l_ptr)
{ {
return l_ptr->out_queue_size >= l_ptr->queue_limit[0]; return l_ptr->out_queue_size >= l_ptr->queue_limit[0];
} }
......
...@@ -176,7 +176,7 @@ void tipc_named_withdraw(struct publication *publ) ...@@ -176,7 +176,7 @@ void tipc_named_withdraw(struct publication *publ)
void tipc_named_node_up(unsigned long nodearg) void tipc_named_node_up(unsigned long nodearg)
{ {
struct tipc_node *n_ptr; struct tipc_node *n_ptr;
struct link *l_ptr; struct tipc_link *l_ptr;
struct publication *publ; struct publication *publ;
struct distr_item *item = NULL; struct distr_item *item = NULL;
struct sk_buff *buf = NULL; struct sk_buff *buf = NULL;
......
...@@ -136,9 +136,9 @@ void tipc_node_delete(struct tipc_node *n_ptr) ...@@ -136,9 +136,9 @@ void tipc_node_delete(struct tipc_node *n_ptr)
* Link becomes active (alone or shared) or standby, depending on its priority. * Link becomes active (alone or shared) or standby, depending on its priority.
*/ */
void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
{ {
struct link **active = &n_ptr->active_links[0]; struct tipc_link **active = &n_ptr->active_links[0];
n_ptr->working_links++; n_ptr->working_links++;
...@@ -171,14 +171,14 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) ...@@ -171,14 +171,14 @@ void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr)
static void node_select_active_links(struct tipc_node *n_ptr) static void node_select_active_links(struct tipc_node *n_ptr)
{ {
struct link **active = &n_ptr->active_links[0]; struct tipc_link **active = &n_ptr->active_links[0];
u32 i; u32 i;
u32 highest_prio = 0; u32 highest_prio = 0;
active[0] = active[1] = NULL; active[0] = active[1] = NULL;
for (i = 0; i < MAX_BEARERS; i++) { for (i = 0; i < MAX_BEARERS; i++) {
struct link *l_ptr = n_ptr->links[i]; struct tipc_link *l_ptr = n_ptr->links[i];
if (!l_ptr || !tipc_link_is_up(l_ptr) || if (!l_ptr || !tipc_link_is_up(l_ptr) ||
(l_ptr->priority < highest_prio)) (l_ptr->priority < highest_prio))
...@@ -197,9 +197,9 @@ static void node_select_active_links(struct tipc_node *n_ptr) ...@@ -197,9 +197,9 @@ static void node_select_active_links(struct tipc_node *n_ptr)
* tipc_node_link_down - handle loss of link * tipc_node_link_down - handle loss of link
*/ */
void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr) void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
{ {
struct link **active; struct tipc_link **active;
n_ptr->working_links--; n_ptr->working_links--;
...@@ -239,14 +239,14 @@ int tipc_node_is_up(struct tipc_node *n_ptr) ...@@ -239,14 +239,14 @@ int tipc_node_is_up(struct tipc_node *n_ptr)
return tipc_node_active_links(n_ptr); return tipc_node_active_links(n_ptr);
} }
void tipc_node_attach_link(struct tipc_node *n_ptr, struct link *l_ptr) void tipc_node_attach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
{ {
n_ptr->links[l_ptr->b_ptr->identity] = l_ptr; n_ptr->links[l_ptr->b_ptr->identity] = l_ptr;
atomic_inc(&tipc_num_links); atomic_inc(&tipc_num_links);
n_ptr->link_cnt++; n_ptr->link_cnt++;
} }
void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr) void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr)
{ {
n_ptr->links[l_ptr->b_ptr->identity] = NULL; n_ptr->links[l_ptr->b_ptr->identity] = NULL;
atomic_dec(&tipc_num_links); atomic_dec(&tipc_num_links);
...@@ -360,7 +360,7 @@ static void node_lost_contact(struct tipc_node *n_ptr) ...@@ -360,7 +360,7 @@ static void node_lost_contact(struct tipc_node *n_ptr)
/* Abort link changeover */ /* Abort link changeover */
for (i = 0; i < MAX_BEARERS; i++) { for (i = 0; i < MAX_BEARERS; i++) {
struct link *l_ptr = n_ptr->links[i]; struct tipc_link *l_ptr = n_ptr->links[i];
if (!l_ptr) if (!l_ptr)
continue; continue;
l_ptr->reset_checkpoint = l_ptr->next_in_no; l_ptr->reset_checkpoint = l_ptr->next_in_no;
......
...@@ -79,8 +79,8 @@ struct tipc_node { ...@@ -79,8 +79,8 @@ struct tipc_node {
struct hlist_node hash; struct hlist_node hash;
struct list_head list; struct list_head list;
struct list_head nsub; struct list_head nsub;
struct link *active_links[2]; struct tipc_link *active_links[2];
struct link *links[MAX_BEARERS]; struct tipc_link *links[MAX_BEARERS];
int link_cnt; int link_cnt;
int working_links; int working_links;
int block_setup; int block_setup;
...@@ -117,10 +117,10 @@ extern u32 tipc_own_tag; ...@@ -117,10 +117,10 @@ extern u32 tipc_own_tag;
struct tipc_node *tipc_node_find(u32 addr); struct tipc_node *tipc_node_find(u32 addr);
struct tipc_node *tipc_node_create(u32 addr); struct tipc_node *tipc_node_create(u32 addr);
void tipc_node_delete(struct tipc_node *n_ptr); void tipc_node_delete(struct tipc_node *n_ptr);
void tipc_node_attach_link(struct tipc_node *n_ptr, struct link *l_ptr); void tipc_node_attach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr); void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); void tipc_node_link_down(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); void tipc_node_link_up(struct tipc_node *n_ptr, struct tipc_link *l_ptr);
int tipc_node_active_links(struct tipc_node *n_ptr); int tipc_node_active_links(struct tipc_node *n_ptr);
int tipc_node_redundant_links(struct tipc_node *n_ptr); int tipc_node_redundant_links(struct tipc_node *n_ptr);
int tipc_node_is_up(struct tipc_node *n_ptr); int tipc_node_is_up(struct tipc_node *n_ptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment