bt_sk
INIT_LIST_HEAD(&bt_sk(sk)->accept_q);
spin_lock_init(&bt_sk(sk)->accept_q_lock);
struct bt_sock *par = bt_sk(parent);
bt_sk(sk)->parent = parent;
list_add_tail(&bt_sk(sk)->accept_q, &par->accept_q);
struct sock *parent = bt_sk(sk)->parent;
spin_lock_bh(&bt_sk(parent)->accept_q_lock);
list_del_init(&bt_sk(sk)->accept_q);
spin_unlock_bh(&bt_sk(parent)->accept_q_lock);
bt_sk(sk)->parent = NULL;
struct bt_sock *bt = bt_sk(parent);
if (bt_sk(sk)->parent != parent)
if (!list_is_last(&bt_sk(sk)->accept_q, &bt->accept_q)) {
next = &list_next_entry(bt_sk(sk), accept_q)->sk;
if (bt_sk(sk)->parent != parent) {
test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags)) {
if (msg->msg_name && bt_sk(sk)->skb_msg_name)
bt_sk(sk)->skb_msg_name(skb, msg->msg_name,
if (test_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags)) {
if (test_bit(BT_SK_PKT_SEQNUM, &bt_sk(sk)->flags)) {
struct bt_sock *bt = bt_sk(parent);
if (!test_bit(BT_SK_SUSPEND, &bt_sk(sk)->flags) && sock_writeable(sk))
while (test_bit(BT_SK_SUSPEND, &bt_sk(sk)->flags)) {
struct bt_sock *bt = bt_sk(sk);
if (bt_sk(sk)->parent && bt_sk(sk)->parent->sk_peer_pid)
sk = bt_sk(sk)->parent;
ctrl = bt_sk(ctrl_sock->sk);
intr = bt_sk(intr_sock->sk);
ctrl = bt_sk(ctrl_sock->sk);
intr = bt_sk(intr_sock->sk);
if (!test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
if (test_and_clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
set_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags);
clear_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags);
set_bit(BT_SK_PKT_SEQNUM, &bt_sk(sk)->flags);
clear_bit(BT_SK_PKT_SEQNUM, &bt_sk(sk)->flags);
val = test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
val = test_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags);
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags))
big_sync = !test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags) &&
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))
parent = bt_sk(sk)->parent;
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
} else if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
} else if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
bt_sk(sk)->flags = bt_sk(parent)->flags;
&bt_sk(sk)->flags)) {
parent = bt_sk(sk)->parent;
parent = bt_sk(sk)->parent;
parent = bt_sk(sk)->parent;
clear_bit(BT_SK_SUSPEND, &bt_sk(sk)->flags);
set_bit(BT_SK_SUSPEND, &bt_sk(sk)->flags);
bt_sk(sk)->flags = bt_sk(parent)->flags;
bt_sk(sk)->skb_msg_name = l2cap_skb_msg_name;
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
opt = test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) ||
set_bit(BT_SK_SUSPEND, &bt_sk(sk)->flags);
set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
if (list_empty(&bt_sk(sock->sk)->accept_q))
&bt_sk(parent)->flags);
set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
parent = bt_sk(sk)->parent;
opt = test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
defer_setup = test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags);
set_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags);
clear_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags);
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))) {
val = test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
val = test_bit(BT_SK_PKT_STATUS, &bt_sk(sk)->flags);
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(parent)->flags))
if (test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags))
bt_sk(sk)->flags = bt_sk(parent)->flags;
test_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) {
set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);