aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif/caif_socket.c
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2011-05-12 22:44:05 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-15 17:45:55 -0400
commitbee925db9a77a5736596dcf6f91d0879f5ee915b (patch)
tree57a3b499d5b8ec3cb9d36be674e165fa1e7eed42 /net/caif/caif_socket.c
parentb3ccfbe4098a5542177d0f34e8979f32e7d606e1 (diff)
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index 01f612df7df1..653db759eb7e 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,
810 sk->sk_state == CAIF_DISCONNECTED); 810 sk->sk_state == CAIF_DISCONNECTED);
811 if (sk->sk_shutdown & SHUTDOWN_MASK) { 811 if (sk->sk_shutdown & SHUTDOWN_MASK) {
812 /* Allow re-connect after SHUTDOWN_IND */ 812 /* Allow re-connect after SHUTDOWN_IND */
813 caif_disconnect_client(&cf_sk->layer); 813 caif_disconnect_client(sock_net(sk), &cf_sk->layer);
814 break; 814 break;
815 } 815 }
816 /* No reconnect on a seqpacket socket */ 816 /* No reconnect on a seqpacket socket */
@@ -851,7 +851,7 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
851 dbfs_atomic_inc(&cnt.num_connect_req); 851 dbfs_atomic_inc(&cnt.num_connect_req);
852 cf_sk->layer.receive = caif_sktrecv_cb; 852 cf_sk->layer.receive = caif_sktrecv_cb;
853 853
854 err = caif_connect_client(&cf_sk->conn_req, 854 err = caif_connect_client(sock_net(sk), &cf_sk->conn_req,
855 &cf_sk->layer, &ifindex, &headroom, &tailroom); 855 &cf_sk->layer, &ifindex, &headroom, &tailroom);
856 856
857 if (err < 0) { 857 if (err < 0) {
@@ -949,7 +949,7 @@ static int caif_release(struct socket *sock)
949 949
950 if (cf_sk->sk.sk_socket->state == SS_CONNECTED || 950 if (cf_sk->sk.sk_socket->state == SS_CONNECTED ||
951 cf_sk->sk.sk_socket->state == SS_CONNECTING) 951 cf_sk->sk.sk_socket->state == SS_CONNECTING)
952 res = caif_disconnect_client(&cf_sk->layer); 952 res = caif_disconnect_client(sock_net(sk), &cf_sk->layer);
953 953
954 cf_sk->sk.sk_socket->state = SS_DISCONNECTING; 954 cf_sk->sk.sk_socket->state = SS_DISCONNECTING;
955 wake_up_interruptible_poll(sk_sleep(sk), POLLERR|POLLHUP); 955 wake_up_interruptible_poll(sk_sleep(sk), POLLERR|POLLHUP);