diff options
Diffstat (limited to 'net/tipc/config.c')
-rw-r--r-- | net/tipc/config.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c index a056a3852f71..f67866c765dd 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * net/tipc/config.c: TIPC configuration management code | 2 | * net/tipc/config.c: TIPC configuration management code |
3 | * | 3 | * |
4 | * Copyright (c) 2002-2006, Ericsson AB | 4 | * Copyright (c) 2002-2006, Ericsson AB |
5 | * Copyright (c) 2004-2007, 2010-2011, Wind River Systems | 5 | * Copyright (c) 2004-2007, 2010-2012, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
@@ -208,36 +208,6 @@ static struct sk_buff *cfg_set_remote_mng(void) | |||
208 | return tipc_cfg_reply_none(); | 208 | return tipc_cfg_reply_none(); |
209 | } | 209 | } |
210 | 210 | ||
211 | static struct sk_buff *cfg_set_max_publications(void) | ||
212 | { | ||
213 | u32 value; | ||
214 | |||
215 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED)) | ||
216 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | ||
217 | |||
218 | value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); | ||
219 | if (value < 1 || value > 65535) | ||
220 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE | ||
221 | " (max publications must be 1-65535)"); | ||
222 | tipc_max_publications = value; | ||
223 | return tipc_cfg_reply_none(); | ||
224 | } | ||
225 | |||
226 | static struct sk_buff *cfg_set_max_subscriptions(void) | ||
227 | { | ||
228 | u32 value; | ||
229 | |||
230 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED)) | ||
231 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | ||
232 | |||
233 | value = ntohl(*(__be32 *)TLV_DATA(req_tlv_area)); | ||
234 | if (value < 1 || value > 65535) | ||
235 | return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE | ||
236 | " (max subscriptions must be 1-65535"); | ||
237 | tipc_max_subscriptions = value; | ||
238 | return tipc_cfg_reply_none(); | ||
239 | } | ||
240 | |||
241 | static struct sk_buff *cfg_set_max_ports(void) | 211 | static struct sk_buff *cfg_set_max_ports(void) |
242 | { | 212 | { |
243 | u32 value; | 213 | u32 value; |
@@ -357,12 +327,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
357 | case TIPC_CMD_SET_MAX_PORTS: | 327 | case TIPC_CMD_SET_MAX_PORTS: |
358 | rep_tlv_buf = cfg_set_max_ports(); | 328 | rep_tlv_buf = cfg_set_max_ports(); |
359 | break; | 329 | break; |
360 | case TIPC_CMD_SET_MAX_PUBL: | ||
361 | rep_tlv_buf = cfg_set_max_publications(); | ||
362 | break; | ||
363 | case TIPC_CMD_SET_MAX_SUBSCR: | ||
364 | rep_tlv_buf = cfg_set_max_subscriptions(); | ||
365 | break; | ||
366 | case TIPC_CMD_SET_NETID: | 330 | case TIPC_CMD_SET_NETID: |
367 | rep_tlv_buf = cfg_set_netid(); | 331 | rep_tlv_buf = cfg_set_netid(); |
368 | break; | 332 | break; |
@@ -372,12 +336,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
372 | case TIPC_CMD_GET_MAX_PORTS: | 336 | case TIPC_CMD_GET_MAX_PORTS: |
373 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports); | 337 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_ports); |
374 | break; | 338 | break; |
375 | case TIPC_CMD_GET_MAX_PUBL: | ||
376 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_publications); | ||
377 | break; | ||
378 | case TIPC_CMD_GET_MAX_SUBSCR: | ||
379 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_max_subscriptions); | ||
380 | break; | ||
381 | case TIPC_CMD_GET_NETID: | 339 | case TIPC_CMD_GET_NETID: |
382 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id); | 340 | rep_tlv_buf = tipc_cfg_reply_unsigned(tipc_net_id); |
383 | break; | 341 | break; |
@@ -393,6 +351,10 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
393 | case TIPC_CMD_GET_MAX_CLUSTERS: | 351 | case TIPC_CMD_GET_MAX_CLUSTERS: |
394 | case TIPC_CMD_SET_MAX_NODES: | 352 | case TIPC_CMD_SET_MAX_NODES: |
395 | case TIPC_CMD_GET_MAX_NODES: | 353 | case TIPC_CMD_GET_MAX_NODES: |
354 | case TIPC_CMD_SET_MAX_SUBSCR: | ||
355 | case TIPC_CMD_GET_MAX_SUBSCR: | ||
356 | case TIPC_CMD_SET_MAX_PUBL: | ||
357 | case TIPC_CMD_GET_MAX_PUBL: | ||
396 | case TIPC_CMD_SET_LOG_SIZE: | 358 | case TIPC_CMD_SET_LOG_SIZE: |
397 | case TIPC_CMD_DUMP_LOG: | 359 | case TIPC_CMD_DUMP_LOG: |
398 | rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED | 360 | rep_tlv_buf = tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED |