diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-02-13 23:29:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-13 23:57:05 +0100 |
commit | 135daee6d3959a6d7c4f59b448ed6f854d88ce27 (patch) | |
tree | b79670bd960e4985a63d5d1e3967caf298658e22 /net/tipc/link.c | |
parent | tipc: move code for deleting links from bearer.c to link.c (diff) | |
download | linux-135daee6d3959a6d7c4f59b448ed6f854d88ce27.tar.xz linux-135daee6d3959a6d7c4f59b448ed6f854d88ce27.zip |
tipc: redefine 'started' flag in struct link to bitmap
Currently, the 'started' field in struct tipc_link represents only a
binary state, 'started' or 'not started'. We need it to represent
more link execution states in the coming commits in this series.
Hence, we rename the field to 'flags', and define the current
started/non-started state to be represented by the LSB bit of
that field.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 424e9f3acd81..2070d032c923 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -500,7 +500,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) struct tipc_link *other; u32 cont_intv = l_ptr->continuity_interval; - if (!l_ptr->started && (event != STARTING_EVT)) + if (!(l_ptr->flags & LINK_STARTED) && (event != STARTING_EVT)) return; /* Not yet. */ /* Check whether changeover is going on */ @@ -626,7 +626,7 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event) link_set_timer(l_ptr, cont_intv); break; case STARTING_EVT: - l_ptr->started = 1; + l_ptr->flags |= LINK_STARTED; /* fall through */ case TIMEOUT_EVT: tipc_link_send_proto_msg(l_ptr, RESET_MSG, 0, 0, 0, 0, 0); |