aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index be21e6ac73fe..a84d5c67997e 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -941,6 +941,7 @@ static void link_retransmit_failure(struct tipc_link *l_ptr,
941 struct sk_buff *buf) 941 struct sk_buff *buf)
942{ 942{
943 struct tipc_msg *msg = buf_msg(buf); 943 struct tipc_msg *msg = buf_msg(buf);
944 struct net *net = l_ptr->owner->net;
944 945
945 pr_warn("Retransmission failure on link <%s>\n", l_ptr->name); 946 pr_warn("Retransmission failure on link <%s>\n", l_ptr->name);
946 947
@@ -958,7 +959,7 @@ static void link_retransmit_failure(struct tipc_link *l_ptr,
958 pr_cont("Outstanding acks: %lu\n", 959 pr_cont("Outstanding acks: %lu\n",
959 (unsigned long) TIPC_SKB_CB(buf)->handle); 960 (unsigned long) TIPC_SKB_CB(buf)->handle);
960 961
961 n_ptr = tipc_bclink_retransmit_to(); 962 n_ptr = tipc_bclink_retransmit_to(net);
962 tipc_node_lock(n_ptr); 963 tipc_node_lock(n_ptr);
963 964
964 tipc_addr_string_fill(addr_string, n_ptr->addr); 965 tipc_addr_string_fill(addr_string, n_ptr->addr);
@@ -973,7 +974,7 @@ static void link_retransmit_failure(struct tipc_link *l_ptr,
973 974
974 tipc_node_unlock(n_ptr); 975 tipc_node_unlock(n_ptr);
975 976
976 tipc_bclink_set_flags(TIPC_BCLINK_RESET); 977 tipc_bclink_set_flags(net, TIPC_BCLINK_RESET);
977 l_ptr->stale_count = 0; 978 l_ptr->stale_count = 0;
978 } 979 }
979} 980}
@@ -1404,7 +1405,7 @@ void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg,
1404 msg_set_type(msg, msg_typ); 1405 msg_set_type(msg, msg_typ);
1405 msg_set_net_plane(msg, l_ptr->net_plane); 1406 msg_set_net_plane(msg, l_ptr->net_plane);
1406 msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in); 1407 msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in);
1407 msg_set_last_bcast(msg, tipc_bclink_get_last_sent()); 1408 msg_set_last_bcast(msg, tipc_bclink_get_last_sent(l_ptr->owner->net));
1408 1409
1409 if (msg_typ == STATE_MSG) { 1410 if (msg_typ == STATE_MSG) {
1410 u32 next_sent = mod(l_ptr->next_out_no); 1411 u32 next_sent = mod(l_ptr->next_out_no);
@@ -2105,7 +2106,7 @@ struct sk_buff *tipc_link_cmd_config(struct net *net, const void *req_tlv_area,
2105 2106
2106 if (!strcmp(args->name, tipc_bclink_name)) { 2107 if (!strcmp(args->name, tipc_bclink_name)) {
2107 if ((cmd == TIPC_CMD_SET_LINK_WINDOW) && 2108 if ((cmd == TIPC_CMD_SET_LINK_WINDOW) &&
2108 (tipc_bclink_set_queue_limits(new_value) == 0)) 2109 (tipc_bclink_set_queue_limits(net, new_value) == 0))
2109 return tipc_cfg_reply_none(); 2110 return tipc_cfg_reply_none();
2110 return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED 2111 return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED
2111 " (cannot change setting on broadcast link)"); 2112 " (cannot change setting on broadcast link)");
@@ -2143,7 +2144,7 @@ struct sk_buff *tipc_link_cmd_reset_stats(struct net *net,
2143 2144
2144 link_name = (char *)TLV_DATA(req_tlv_area); 2145 link_name = (char *)TLV_DATA(req_tlv_area);
2145 if (!strcmp(link_name, tipc_bclink_name)) { 2146 if (!strcmp(link_name, tipc_bclink_name)) {
2146 if (tipc_bclink_reset_stats()) 2147 if (tipc_bclink_reset_stats(net))
2147 return tipc_cfg_reply_error_string("link not found"); 2148 return tipc_cfg_reply_error_string("link not found");
2148 return tipc_cfg_reply_none(); 2149 return tipc_cfg_reply_none();
2149 } 2150 }
@@ -2191,7 +2192,7 @@ static int tipc_link_stats(struct net *net, const char *name, char *buf,
2191 int ret; 2192 int ret;
2192 2193
2193 if (!strcmp(name, tipc_bclink_name)) 2194 if (!strcmp(name, tipc_bclink_name))
2194 return tipc_bclink_stats(buf, buf_size); 2195 return tipc_bclink_stats(net, buf, buf_size);
2195 2196
2196 node = tipc_link_find_owner(net, name, &bearer_id); 2197 node = tipc_link_find_owner(net, name, &bearer_id);
2197 if (!node) 2198 if (!node)
@@ -2640,7 +2641,7 @@ int tipc_nl_link_dump(struct sk_buff *skb, struct netlink_callback *cb)
2640 prev_node = node->addr; 2641 prev_node = node->addr;
2641 } 2642 }
2642 } else { 2643 } else {
2643 err = tipc_nl_add_bc_link(&msg); 2644 err = tipc_nl_add_bc_link(net, &msg);
2644 if (err) 2645 if (err)
2645 goto out; 2646 goto out;
2646 2647
@@ -2739,7 +2740,7 @@ int tipc_nl_link_reset_stats(struct sk_buff *skb, struct genl_info *info)
2739 link_name = nla_data(attrs[TIPC_NLA_LINK_NAME]); 2740 link_name = nla_data(attrs[TIPC_NLA_LINK_NAME]);
2740 2741
2741 if (strcmp(link_name, tipc_bclink_name) == 0) { 2742 if (strcmp(link_name, tipc_bclink_name) == 0) {
2742 err = tipc_bclink_reset_stats(); 2743 err = tipc_bclink_reset_stats(net);
2743 if (err) 2744 if (err)
2744 return err; 2745 return err;
2745 return 0; 2746 return 0;