From 16cb4b333c9e7a00ce3b1d74ec0c9b4c2e956910 Mon Sep 17 00:00:00 2001 From: Per Liden Date: Fri, 13 Jan 2006 22:22:22 +0100 Subject: [TIPC] Updated link priority macros Added macros for min/default/max link priority in tipc_config.h. Also renamed TIPC_NUM_LINK_PRI to TIPC_MEDIA_LINK_PRI since that is a more accurate description of what it is used for. Signed-off-by: Per Liden --- net/tipc/link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/tipc/link.c') diff --git a/net/tipc/link.c b/net/tipc/link.c index 7265f4be476..d1e1ae66464 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -2812,7 +2812,8 @@ struct sk_buff *link_cmd_config(const void *req_tlv_area, int req_tlv_space, } break; case TIPC_CMD_SET_LINK_PRI: - if (new_value < TIPC_NUM_LINK_PRI) { + if ((new_value >= TIPC_MIN_LINK_PRI) && + (new_value <= TIPC_MAX_LINK_PRI)) { l_ptr->priority = new_value; link_send_proto_msg(l_ptr, STATE_MSG, 0, 0, 0, new_value, 0); -- cgit v1.2.3