Lines Matching refs:l2cap

426 static void l2cap_br_get_info(struct bt_l2cap_br *l2cap, uint16_t info_type)  in l2cap_br_get_info()  argument
434 if (atomic_test_bit(l2cap->chan.flags, L2CAP_FLAG_SIG_INFO_PENDING)) { in l2cap_br_get_info()
449 atomic_set_bit(l2cap->chan.flags, L2CAP_FLAG_SIG_INFO_PENDING); in l2cap_br_get_info()
450 l2cap->info_ident = l2cap_br_get_ident(); in l2cap_br_get_info()
454 hdr->ident = l2cap->info_ident; in l2cap_br_get_info()
460 l2cap_br_chan_send_req(&l2cap->chan, buf, L2CAP_BR_INFO_TIMEOUT); in l2cap_br_get_info()
474 static void connect_optional_fixed_channels(struct bt_l2cap_br *l2cap) in connect_optional_fixed_channels() argument
477 if (l2cap->info_fixed_chan & BIT(BT_L2CAP_CID_BR_SMP)) { in connect_optional_fixed_channels()
480 chan = bt_l2cap_br_lookup_rx_cid(l2cap->chan.chan.conn, in connect_optional_fixed_channels()
488 static int l2cap_br_info_rsp(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_info_rsp() argument
495 if (atomic_test_bit(l2cap->chan.flags, L2CAP_FLAG_SIG_INFO_DONE)) { in l2cap_br_info_rsp()
499 if (atomic_test_and_clear_bit(l2cap->chan.flags, in l2cap_br_info_rsp()
505 k_work_cancel_delayable(&l2cap->chan.rtx_work); in l2cap_br_info_rsp()
514 if (ident != l2cap->info_ident) { in l2cap_br_info_rsp()
537 l2cap->info_feat_mask = net_buf_pull_le32(buf); in l2cap_br_info_rsp()
538 LOG_DBG("remote info mask 0x%08x", l2cap->info_feat_mask); in l2cap_br_info_rsp()
540 if (!(l2cap->info_feat_mask & L2CAP_FEAT_FIXED_CHAN_MASK)) { in l2cap_br_info_rsp()
544 l2cap_br_get_info(l2cap, BT_L2CAP_INFO_FIXED_CHAN); in l2cap_br_info_rsp()
560 l2cap->info_fixed_chan = net_buf_pull_u8(buf); in l2cap_br_info_rsp()
561 LOG_DBG("remote fixed channel mask 0x%02x", l2cap->info_fixed_chan); in l2cap_br_info_rsp()
563 connect_optional_fixed_channels(l2cap); in l2cap_br_info_rsp()
572 atomic_set_bit(l2cap->chan.flags, L2CAP_FLAG_SIG_INFO_DONE); in l2cap_br_info_rsp()
573 l2cap->info_ident = 0U; in l2cap_br_info_rsp()
589 static int l2cap_br_info_req(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_info_req() argument
592 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_info_req()
984 static void l2cap_br_conn_req(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_conn_req() argument
987 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_conn_req()
1095 static void l2cap_br_conf_rsp(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_conf_rsp() argument
1098 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_conf_rsp()
1354 static void l2cap_br_conf_req(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_conf_req() argument
1357 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_conf_req()
1539 static void l2cap_br_disconn_req(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_disconn_req() argument
1542 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_disconn_req()
1644 static void l2cap_br_disconn_rsp(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_disconn_rsp() argument
1647 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_disconn_rsp()
1752 static void l2cap_br_conn_rsp(struct bt_l2cap_br *l2cap, uint8_t ident, in l2cap_br_conn_rsp() argument
1755 struct bt_conn *conn = l2cap->chan.chan.conn; in l2cap_br_conn_rsp()
1840 static void l2cap_br_sig_handle(struct bt_l2cap_br *l2cap, struct bt_l2cap_sig_hdr *hdr, in l2cap_br_sig_handle() argument
1852 l2cap_br_info_rsp(l2cap, hdr->ident, buf); in l2cap_br_sig_handle()
1855 l2cap_br_info_req(l2cap, hdr->ident, buf); in l2cap_br_sig_handle()
1858 l2cap_br_disconn_req(l2cap, hdr->ident, buf); in l2cap_br_sig_handle()
1861 l2cap_br_conn_req(l2cap, hdr->ident, buf); in l2cap_br_sig_handle()
1864 l2cap_br_conf_rsp(l2cap, hdr->ident, len, buf); in l2cap_br_sig_handle()
1867 l2cap_br_conf_req(l2cap, hdr->ident, len, buf); in l2cap_br_sig_handle()
1870 l2cap_br_disconn_rsp(l2cap, hdr->ident, buf); in l2cap_br_sig_handle()
1873 l2cap_br_conn_rsp(l2cap, hdr->ident, buf); in l2cap_br_sig_handle()
1877 l2cap_br_send_reject(l2cap->chan.chan.conn, hdr->ident, in l2cap_br_sig_handle()
1888 struct bt_l2cap_br *l2cap = CONTAINER_OF(chan, struct bt_l2cap_br, chan.chan); in l2cap_br_recv() local
1914 l2cap_br_sig_handle(l2cap, hdr, buf); in l2cap_br_recv()
2047 struct bt_l2cap_br *l2cap = &bt_l2cap_br_pool[i]; in l2cap_br_accept() local
2049 if (l2cap->chan.chan.conn) { in l2cap_br_accept()
2053 l2cap->chan.chan.ops = &ops; in l2cap_br_accept()
2054 *chan = &l2cap->chan.chan; in l2cap_br_accept()
2055 atomic_set(l2cap->chan.flags, 0); in l2cap_br_accept()