summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/conn_event.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-06-27 10:32:02 +0100
committerDavid Howells <dhowells@redhat.com>2016-07-06 10:43:51 +0100
commitbba304db34ec3ca0d13e7f48e5a4e9896536cacc (patch)
tree722839772527934ad566e728e729c3d0290a892c /net/rxrpc/conn_event.c
parent5acbee4648789ba1fe9e7942280fb1966c76bd6f (diff)
downloadop-kernel-dev-bba304db34ec3ca0d13e7f48e5a4e9896536cacc.zip
op-kernel-dev-bba304db34ec3ca0d13e7f48e5a4e9896536cacc.tar.gz
rxrpc: Turn connection #defines into enums and put outside struct def
Turn the connection event and state #define lists into enums and move outside of the struct definition. Whilst we're at it, change _SERVER to _SERVICE in those identifiers and add EV_ into the event name to distinguish them from flags and states. Also add a symbol indicating the number of states and use that in the state text array. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/conn_event.c')
-rw-r--r--net/rxrpc/conn_event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c
index d7e183c..b9c39b8 100644
--- a/net/rxrpc/conn_event.c
+++ b/net/rxrpc/conn_event.c
@@ -195,8 +195,8 @@ static int rxrpc_process_event(struct rxrpc_connection *conn,
read_lock_bh(&conn->lock);
spin_lock(&conn->state_lock);
- if (conn->state == RXRPC_CONN_SERVER_CHALLENGING) {
- conn->state = RXRPC_CONN_SERVER;
+ if (conn->state == RXRPC_CONN_SERVICE_CHALLENGING) {
+ conn->state = RXRPC_CONN_SERVICE;
for (loop = 0; loop < RXRPC_MAXCALLS; loop++)
rxrpc_call_is_secure(conn->channels[loop]);
}
@@ -268,7 +268,7 @@ void rxrpc_process_connection(struct work_struct *work)
rxrpc_get_connection(conn);
- if (test_and_clear_bit(RXRPC_CONN_CHALLENGE, &conn->events)) {
+ if (test_and_clear_bit(RXRPC_CONN_EV_CHALLENGE, &conn->events)) {
rxrpc_secure_connection(conn);
rxrpc_put_connection(conn);
}
OpenPOWER on IntegriCloud