Commit 25b660c7 authored by Jon Paul Maloy's avatar Jon Paul Maloy Committed by David S. Miller

tipc: let internal link users call the new link send function

We convert the link internal users (changeover protocol, broadcast
synchronization) to use the new packet send function.
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dbdf6d24
...@@ -999,7 +999,7 @@ int tipc_link_xmit2(struct sk_buff *buf, u32 dnode, u32 selector) ...@@ -999,7 +999,7 @@ int tipc_link_xmit2(struct sk_buff *buf, u32 dnode, u32 selector)
* *
* Called with node locked * Called with node locked
*/ */
static void tipc_link_sync_xmit(struct tipc_link *l) static void tipc_link_sync_xmit(struct tipc_link *link)
{ {
struct sk_buff *buf; struct sk_buff *buf;
struct tipc_msg *msg; struct tipc_msg *msg;
...@@ -1009,10 +1009,9 @@ static void tipc_link_sync_xmit(struct tipc_link *l) ...@@ -1009,10 +1009,9 @@ static void tipc_link_sync_xmit(struct tipc_link *l)
return; return;
msg = buf_msg(buf); msg = buf_msg(buf);
tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE, l->addr); tipc_msg_init(msg, BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE, link->addr);
msg_set_last_bcast(msg, l->owner->bclink.acked); msg_set_last_bcast(msg, link->owner->bclink.acked);
link_add_chain_to_outqueue(l, buf, 0); __tipc_link_xmit2(link, buf);
tipc_link_push_queue(l);
} }
/* /*
...@@ -1859,7 +1858,7 @@ static void tipc_link_tunnel_xmit(struct tipc_link *l_ptr, ...@@ -1859,7 +1858,7 @@ static void tipc_link_tunnel_xmit(struct tipc_link *l_ptr,
} }
skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE); skb_copy_to_linear_data(buf, tunnel_hdr, INT_H_SIZE);
skb_copy_to_linear_data_offset(buf, INT_H_SIZE, msg, length); skb_copy_to_linear_data_offset(buf, INT_H_SIZE, msg, length);
__tipc_link_xmit(tunnel, buf); __tipc_link_xmit2(tunnel, buf);
} }
...@@ -1892,7 +1891,7 @@ void tipc_link_failover_send_queue(struct tipc_link *l_ptr) ...@@ -1892,7 +1891,7 @@ void tipc_link_failover_send_queue(struct tipc_link *l_ptr)
if (buf) { if (buf) {
skb_copy_to_linear_data(buf, &tunnel_hdr, INT_H_SIZE); skb_copy_to_linear_data(buf, &tunnel_hdr, INT_H_SIZE);
msg_set_size(&tunnel_hdr, INT_H_SIZE); msg_set_size(&tunnel_hdr, INT_H_SIZE);
__tipc_link_xmit(tunnel, buf); __tipc_link_xmit2(tunnel, buf);
} else { } else {
pr_warn("%sunable to send changeover msg\n", pr_warn("%sunable to send changeover msg\n",
link_co_err); link_co_err);
...@@ -1965,7 +1964,7 @@ void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, ...@@ -1965,7 +1964,7 @@ void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr,
skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE); skb_copy_to_linear_data(outbuf, &tunnel_hdr, INT_H_SIZE);
skb_copy_to_linear_data_offset(outbuf, INT_H_SIZE, iter->data, skb_copy_to_linear_data_offset(outbuf, INT_H_SIZE, iter->data,
length); length);
__tipc_link_xmit(tunnel, outbuf); __tipc_link_xmit2(tunnel, outbuf);
if (!tipc_link_is_up(l_ptr)) if (!tipc_link_is_up(l_ptr))
return; return;
iter = iter->next; iter = iter->next;
......
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