aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2011-01-25 14:39:59 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-02-23 18:05:22 -0500
commit2e07dda1659095115e5e36a2fed0fddc1e3ea1c8 (patch)
tree718f50cde6b29067f011744ed994addb21b2bb0e /net
parent741de3e9ff6e07e908e1cad2eb03e29677fde093 (diff)
tipc: Remove unused message header field for requested number of links
Eliminates support for the "number of requested links" field in a neighbor discovery message. This field was never used and has been removed from the TIPC 2.0 protocol specification. Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/bearer.c2
-rw-r--r--net/tipc/discover.c11
-rw-r--r--net/tipc/discover.h3
-rw-r--r--net/tipc/msg.c1
-rw-r--r--net/tipc/msg.h10
5 files changed, 5 insertions, 22 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 9e2ff0ed017b..f2839b0f6b65 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -566,7 +566,7 @@ restart:
566 INIT_LIST_HEAD(&b_ptr->links); 566 INIT_LIST_HEAD(&b_ptr->links);
567 if (m_ptr->bcast) { 567 if (m_ptr->bcast) {
568 b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, 568 b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr,
569 bcast_scope, 2); 569 bcast_scope);
570 } 570 }
571 spin_lock_init(&b_ptr->lock); 571 spin_lock_init(&b_ptr->lock);
572 write_unlock_bh(&tipc_net_lock); 572 write_unlock_bh(&tipc_net_lock);
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index 59a86fc5b6d0..09ce2318b89e 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -67,13 +67,11 @@ struct link_req {
67/** 67/**
68 * tipc_disc_init_msg - initialize a link setup message 68 * tipc_disc_init_msg - initialize a link setup message
69 * @type: message type (request or response) 69 * @type: message type (request or response)
70 * @req_links: number of links associated with message
71 * @dest_domain: network domain of node(s) which should respond to message 70 * @dest_domain: network domain of node(s) which should respond to message
72 * @b_ptr: ptr to bearer issuing message 71 * @b_ptr: ptr to bearer issuing message
73 */ 72 */
74 73
75static struct sk_buff *tipc_disc_init_msg(u32 type, 74static struct sk_buff *tipc_disc_init_msg(u32 type,
76 u32 req_links,
77 u32 dest_domain, 75 u32 dest_domain,
78 struct tipc_bearer *b_ptr) 76 struct tipc_bearer *b_ptr)
79{ 77{
@@ -84,7 +82,6 @@ static struct sk_buff *tipc_disc_init_msg(u32 type,
84 msg = buf_msg(buf); 82 msg = buf_msg(buf);
85 tipc_msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain); 83 tipc_msg_init(msg, LINK_CONFIG, type, DSC_H_SIZE, dest_domain);
86 msg_set_non_seq(msg, 1); 84 msg_set_non_seq(msg, 1);
87 msg_set_req_links(msg, req_links);
88 msg_set_dest_domain(msg, dest_domain); 85 msg_set_dest_domain(msg, dest_domain);
89 msg_set_bc_netid(msg, tipc_net_id); 86 msg_set_bc_netid(msg, tipc_net_id);
90 msg_set_media_addr(msg, &b_ptr->addr); 87 msg_set_media_addr(msg, &b_ptr->addr);
@@ -191,7 +188,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct tipc_bearer *b_ptr)
191 spin_unlock_bh(&n_ptr->lock); 188 spin_unlock_bh(&n_ptr->lock);
192 if ((type == DSC_RESP_MSG) || link_fully_up) 189 if ((type == DSC_RESP_MSG) || link_fully_up)
193 return; 190 return;
194 rbuf = tipc_disc_init_msg(DSC_RESP_MSG, 1, orig, b_ptr); 191 rbuf = tipc_disc_init_msg(DSC_RESP_MSG, orig, b_ptr);
195 if (rbuf != NULL) { 192 if (rbuf != NULL) {
196 b_ptr->media->send_msg(rbuf, b_ptr, &media_addr); 193 b_ptr->media->send_msg(rbuf, b_ptr, &media_addr);
197 buf_discard(rbuf); 194 buf_discard(rbuf);
@@ -274,15 +271,13 @@ static void disc_timeout(struct link_req *req)
274 * @b_ptr: ptr to bearer issuing requests 271 * @b_ptr: ptr to bearer issuing requests
275 * @dest: destination address for request messages 272 * @dest: destination address for request messages
276 * @dest_domain: network domain of node(s) which should respond to message 273 * @dest_domain: network domain of node(s) which should respond to message
277 * @req_links: max number of desired links
278 * 274 *
279 * Returns pointer to link request structure, or NULL if unable to create. 275 * Returns pointer to link request structure, or NULL if unable to create.
280 */ 276 */
281 277
282struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr, 278struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
283 const struct tipc_media_addr *dest, 279 const struct tipc_media_addr *dest,
284 u32 dest_domain, 280 u32 dest_domain)
285 u32 req_links)
286{ 281{
287 struct link_req *req; 282 struct link_req *req;
288 283
@@ -290,7 +285,7 @@ struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
290 if (!req) 285 if (!req)
291 return NULL; 286 return NULL;
292 287
293 req->buf = tipc_disc_init_msg(DSC_REQ_MSG, req_links, dest_domain, b_ptr); 288 req->buf = tipc_disc_init_msg(DSC_REQ_MSG, dest_domain, b_ptr);
294 if (!req->buf) { 289 if (!req->buf) {
295 kfree(req); 290 kfree(req);
296 return NULL; 291 return NULL;
diff --git a/net/tipc/discover.h b/net/tipc/discover.h
index 4046d7743f07..e48a167e47b2 100644
--- a/net/tipc/discover.h
+++ b/net/tipc/discover.h
@@ -41,8 +41,7 @@ struct link_req;
41 41
42struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr, 42struct link_req *tipc_disc_init_link_req(struct tipc_bearer *b_ptr,
43 const struct tipc_media_addr *dest, 43 const struct tipc_media_addr *dest,
44 u32 dest_domain, 44 u32 dest_domain);
45 u32 req_links);
46void tipc_disc_update_link_req(struct link_req *req); 45void tipc_disc_update_link_req(struct link_req *req);
47void tipc_disc_stop_link_req(struct link_req *req); 46void tipc_disc_stop_link_req(struct link_req *req);
48 47
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index e56b9b87547d..0787e12423b8 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -390,7 +390,6 @@ void tipc_msg_dbg(struct print_buf *buf, struct tipc_msg *msg, const char *str)
390 if (msg_user(msg) == LINK_CONFIG) { 390 if (msg_user(msg) == LINK_CONFIG) {
391 u32 *raw = (u32 *)msg; 391 u32 *raw = (u32 *)msg;
392 struct tipc_media_addr *orig = (struct tipc_media_addr *)&raw[5]; 392 struct tipc_media_addr *orig = (struct tipc_media_addr *)&raw[5];
393 tipc_printf(buf, ":REQL(%u):", msg_req_links(msg));
394 tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg)); 393 tipc_printf(buf, ":DDOM(%x):", msg_dest_domain(msg));
395 tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg)); 394 tipc_printf(buf, ":NETID(%u):", msg_bc_netid(msg));
396 tipc_media_addr_printf(buf, orig); 395 tipc_media_addr_printf(buf, orig);
diff --git a/net/tipc/msg.h b/net/tipc/msg.h
index b1438c779455..9d643a1b7d22 100644
--- a/net/tipc/msg.h
+++ b/net/tipc/msg.h
@@ -567,16 +567,6 @@ static inline void msg_set_seq_gap(struct tipc_msg *m, u32 n)
567 msg_set_bits(m, 1, 16, 0x1fff, n); 567 msg_set_bits(m, 1, 16, 0x1fff, n);
568} 568}
569 569
570static inline u32 msg_req_links(struct tipc_msg *m)
571{
572 return msg_bits(m, 1, 16, 0xfff);
573}
574
575static inline void msg_set_req_links(struct tipc_msg *m, u32 n)
576{
577 msg_set_bits(m, 1, 16, 0xfff, n);
578}
579
580 570
581/* 571/*
582 * Word 2 572 * Word 2