Lines Matching refs:cid
103 uint16_t cid) in bt_l2cap_br_lookup_rx_cid() argument
108 if (BR_CHAN(chan)->rx.cid == cid) { in bt_l2cap_br_lookup_rx_cid()
117 uint16_t cid) in bt_l2cap_br_lookup_tx_cid() argument
122 if (BR_CHAN(chan)->tx.cid == cid) { in bt_l2cap_br_lookup_tx_cid()
149 uint16_t cid; in l2cap_br_chan_alloc_cid() local
155 if (br_chan->rx.cid > 0) { in l2cap_br_chan_alloc_cid()
163 for (cid = L2CAP_BR_CID_DYN_START; cid; cid++) { in l2cap_br_chan_alloc_cid()
164 if (!bt_l2cap_br_lookup_rx_cid(conn, cid)) { in l2cap_br_chan_alloc_cid()
165 br_chan->rx.cid = cid; in l2cap_br_chan_alloc_cid()
183 LOG_DBG("chan %p cid 0x%04x", br_chan, br_chan->rx.cid); in l2cap_br_chan_destroy()
209 if (chan->rx.cid == BT_L2CAP_CID_BR_SIG) { in l2cap_br_rtx_timeout()
215 LOG_DBG("chan %p %s scid 0x%04x", chan, bt_l2cap_chan_state_str(chan->state), chan->rx.cid); in l2cap_br_rtx_timeout()
302 int bt_l2cap_br_send_cb(struct bt_conn *conn, uint16_t cid, struct net_buf *buf, in bt_l2cap_br_send_cb() argument
306 struct bt_l2cap_chan *ch = bt_l2cap_br_lookup_tx_cid(conn, cid); in bt_l2cap_br_send_cb()
313 hdr->cid = sys_cpu_to_le16(cid); in bt_l2cap_br_send_cb()
336 static inline void l2cap_send(struct bt_conn *conn, uint16_t cid, in l2cap_send() argument
339 if (bt_l2cap_br_send_cb(conn, cid, buf, NULL, NULL)) { in l2cap_send()
583 mask |= BIT(fchan->cid); in get_fixed_channels_mask()
660 br_chan->rx.cid = fchan->cid; in bt_l2cap_br_connected()
661 br_chan->tx.cid = fchan->cid; in bt_l2cap_br_connected()
671 if (fchan->cid == BT_L2CAP_CID_BR_SIG) { in bt_l2cap_br_connected()
732 conf->dcid = sys_cpu_to_le16(BR_CHAN(chan)->tx.cid); in l2cap_br_conf()
880 l2cap_br_send_conn_rsp(chan->conn, BR_CHAN(chan)->tx.cid, in l2cap_br_conn_req_reply()
881 BR_CHAN(chan)->rx.cid, BR_CHAN(chan)->ident, result); in l2cap_br_conn_req_reply()
1051 BR_CHAN(chan)->tx.cid = scid; in l2cap_br_conn_req()
1138 LOG_DBG("scid 0x%04x rx MTU %u dcid 0x%04x tx MTU %u", br_chan->rx.cid, in l2cap_br_conf_rsp()
1139 br_chan->rx.mtu, br_chan->tx.cid, br_chan->tx.mtu); in l2cap_br_conf_rsp()
1471 rsp->scid = sys_cpu_to_le16(BR_CHAN(chan)->tx.cid); in l2cap_br_conf_req()
1506 LOG_DBG("scid 0x%04x rx MTU %u dcid 0x%04x tx MTU %u", BR_CHAN(chan)->rx.cid, in l2cap_br_conf_req()
1507 BR_CHAN(chan)->rx.mtu, BR_CHAN(chan)->tx.cid, BR_CHAN(chan)->tx.mtu); in l2cap_br_conf_req()
1517 uint16_t cid) in l2cap_br_remove_tx_cid() argument
1523 if (!L2CAP_BR_CID_IS_DYN(cid)) { in l2cap_br_remove_tx_cid()
1528 if (BR_CHAN(chan)->tx.cid == cid) { in l2cap_br_remove_tx_cid()
1578 rsp->dcid = sys_cpu_to_le16(chan->rx.cid); in l2cap_br_disconn_req()
1579 rsp->scid = sys_cpu_to_le16(chan->tx.cid); in l2cap_br_disconn_req()
1588 LOG_DBG("ch %p cid 0x%04x", BR_CHAN(chan), BR_CHAN(chan)->rx.cid); in l2cap_br_connected()
1595 LOG_DBG("ch %p cid 0x%04x", br_chan, br_chan->rx.cid); in l2cap_br_disconnected()
1625 LOG_DBG("chan %p scid 0x%04x dcid 0x%04x", chan, br_chan->rx.cid, br_chan->tx.cid); in bt_l2cap_br_chan_disconnect()
1635 req->dcid = sys_cpu_to_le16(br_chan->tx.cid); in bt_l2cap_br_chan_disconnect()
1636 req->scid = sys_cpu_to_le16(br_chan->rx.cid); in bt_l2cap_br_chan_disconnect()
1745 req->scid = sys_cpu_to_le16(BR_CHAN(chan)->rx.cid); in bt_l2cap_br_chan_connect()
1793 BR_CHAN(chan)->tx.cid = dcid; in l2cap_br_conn_rsp()
1832 return bt_l2cap_br_send_cb(br_chan->chan.conn, br_chan->tx.cid, buf, cb, user_data); in bt_l2cap_br_chan_send_cb()
1974 req->scid = sys_cpu_to_le16(BR_CHAN(chan)->rx.cid); in l2cap_br_conn_pend()
1998 if (br_chan->rx.cid < L2CAP_BR_CID_DYN_START) { in check_fixed_channel()
2007 uint16_t cid; in bt_l2cap_br_recv() local
2016 cid = sys_le16_to_cpu(hdr->cid); in bt_l2cap_br_recv()
2018 chan = bt_l2cap_br_lookup_rx_cid(conn, cid); in bt_l2cap_br_recv()
2020 LOG_WRN("Ignoring data for unknown channel ID 0x%04x", cid); in bt_l2cap_br_recv()