diff options
author | sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> | 2011-05-13 02:44:05 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-15 21:45:55 (GMT) |
commit | bee925db9a77a5736596dcf6f91d0879f5ee915b (patch) | |
tree | 57a3b499d5b8ec3cb9d36be674e165fa1e7eed42 /net/caif/caif_socket.c | |
parent | b3ccfbe4098a5542177d0f34e8979f32e7d606e1 (diff) | |
download | linux-bee925db9a77a5736596dcf6f91d0879f5ee915b.tar.xz |
caif: prepare support for namespaces
Use struct net to reference CAIF configuration object instead of static variables.
Refactor functions caif_connect_client, caif_disconnect_client and squach
files cfcnfg.c and caif_config_utils.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/caif_socket.c')
-rw-r--r-- | net/caif/caif_socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c index 01f612d..653db75 100644 --- a/net/caif/caif_socket.c +++ b/net/caif/caif_socket.c @@ -810,7 +810,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr, sk->sk_state == CAIF_DISCONNECTED); if (sk->sk_shutdown & SHUTDOWN_MASK) { /* Allow re-connect after SHUTDOWN_IND */ - caif_disconnect_client(&cf_sk->layer); + caif_disconnect_client(sock_net(sk), &cf_sk->layer); break; } /* No reconnect on a seqpacket socket */ @@ -851,7 +851,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr, dbfs_atomic_inc(&cnt.num_connect_req); cf_sk->layer.receive = caif_sktrecv_cb; - err = caif_connect_client(&cf_sk->conn_req, + err = caif_connect_client(sock_net(sk), &cf_sk->conn_req, &cf_sk->layer, &ifindex, &headroom, &tailroom); if (err < 0) { @@ -949,7 +949,7 @@ static int caif_release(struct socket *sock) if (cf_sk->sk.sk_socket->state == SS_CONNECTED || cf_sk->sk.sk_socket->state == SS_CONNECTING) - res = caif_disconnect_client(&cf_sk->layer); + res = caif_disconnect_client(sock_net(sk), &cf_sk->layer); cf_sk->sk.sk_socket->state = SS_DISCONNECTING; wake_up_interruptible_poll(sk_sleep(sk), POLLERR|POLLHUP); |