Lines Matching refs:parent
216 static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent)
223 if (parent) {
224 bt_accept_enqueue(parent, sk, true);
228 static int sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent)
236 __sco_chan_add(conn, sk, parent);
392 static void sco_sock_cleanup_listen(struct sock *parent)
396 BT_DBG("parent %p", parent);
399 while ((sk = bt_accept_dequeue(parent, NULL))) {
404 parent->sk_state = BT_CLOSED;
405 sock_set_flag(parent, SOCK_ZAPPED);
477 static void sco_sock_init(struct sock *sk, struct sock *parent)
481 if (parent) {
482 sk->sk_type = parent->sk_type;
483 bt_sk(sk)->flags = bt_sk(parent)->flags;
484 security_sk_clone(parent, sk);
1119 struct sock *parent;
1138 parent = sco_get_sock_listen(&conn->hcon->src);
1139 if (!parent) {
1144 bh_lock_sock(parent);
1146 sk = sco_sock_alloc(sock_net(parent), NULL, BTPROTO_SCO, GFP_ATOMIC, 0);
1148 bh_unlock_sock(parent);
1153 sco_sock_init(sk, parent);
1159 __sco_chan_add(conn, sk, parent);
1161 if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags)) {
1167 /* Wake up parent */
1168 parent->sk_data_ready(parent);
1170 bh_unlock_sock(parent);