Lines Matching refs:rx
128 if (ch->rx.cid > 0) { in l2cap_chan_alloc_cid()
134 ch->rx.cid = cid; in l2cap_chan_alloc_cid()
349 if (L2CAP_LE_CID_IS_DYN(ch->rx.cid)) { in l2cap_chan_add()
382 ch->rx.cid = fchan->cid; in bt_l2cap_connected()
473 req->scid = sys_cpu_to_le16(ch->rx.cid); in l2cap_le_conn_req()
474 req->mtu = sys_cpu_to_le16(ch->rx.mtu); in l2cap_le_conn_req()
475 req->mps = sys_cpu_to_le16(ch->rx.mps); in l2cap_le_conn_req()
476 req->credits = sys_cpu_to_le16(ch->rx.init_credits); in l2cap_le_conn_req()
507 req->mtu = sys_cpu_to_le16(ch->rx.mtu); in l2cap_ecred_conn_req()
508 req->mps = sys_cpu_to_le16(ch->rx.mps); in l2cap_ecred_conn_req()
509 req->credits = sys_cpu_to_le16(ch->rx.init_credits); in l2cap_ecred_conn_req()
516 net_buf_add_le16(buf, ch->rx.cid); in l2cap_ecred_conn_req()
706 if (BT_L2CAP_LE_CHAN(chan)->rx.cid == cid) { in bt_l2cap_le_lookup_rx_cid()
783 if (!chan->rx.mtu) { in l2cap_chan_rx_init()
784 chan->rx.mtu = L2CAP_MAX_LE_MTU; in l2cap_chan_rx_init()
788 if (!chan->rx.init_credits) { in l2cap_chan_rx_init()
791 chan->rx.init_credits = (chan->rx.mtu + in l2cap_chan_rx_init()
795 chan->rx.init_credits = L2CAP_LE_MAX_CREDITS; in l2cap_chan_rx_init()
802 chan->rx.mps = MIN(chan->rx.mtu + 2, L2CAP_MAX_LE_MPS); in l2cap_chan_rx_init()
803 atomic_set(&chan->rx.credits, 0); in l2cap_chan_rx_init()
806 chan->rx.init_credits * chan->rx.mps < chan->rx.mtu + 2) { in l2cap_chan_rx_init()
879 atomic_add(&chan->rx.credits, credits); in l2cap_chan_rx_give_credits()
887 BT_DBG("chan %p cid 0x%04x", ch, ch->rx.cid); in l2cap_chan_destroy()
980 l2cap_chan_rx_give_credits(ch, ch->rx.init_credits); in l2cap_chan_accept()
1058 rsp->dcid = sys_cpu_to_le16(ch->rx.cid); in le_conn_req()
1059 rsp->mps = sys_cpu_to_le16(ch->rx.mps); in le_conn_req()
1060 rsp->mtu = sys_cpu_to_le16(ch->rx.mtu); in le_conn_req()
1061 rsp->credits = sys_cpu_to_le16(ch->rx.init_credits); in le_conn_req()
1122 dcid[i++] = sys_cpu_to_le16(ch->rx.cid); in le_ecred_conn_req()
1158 rsp->mps = sys_cpu_to_le16(ch->rx.mps); in le_ecred_conn_req()
1159 rsp->mtu = sys_cpu_to_le16(ch->rx.mtu); in le_ecred_conn_req()
1160 rsp->credits = sys_cpu_to_le16(ch->rx.init_credits); in le_ecred_conn_req()
1257 if (BT_L2CAP_LE_CHAN(chan)->rx.cid == cid) { in l2cap_remove_rx_cid()
1305 rsp->dcid = sys_cpu_to_le16(chan->rx.cid); in le_disconn_req()
1450 l2cap_chan_rx_give_credits(chan, chan->rx.init_credits); in le_ecred_conn_rsp()
1519 l2cap_chan_rx_give_credits(chan, chan->rx.init_credits); in le_conn_rsp()
1983 if (credits > chan->rx.init_credits) { in l2cap_chan_send_credits()
1984 credits = chan->rx.init_credits; in l2cap_chan_send_credits()
2001 ev->cid = sys_cpu_to_le16(chan->rx.cid); in l2cap_chan_send_credits()
2006 BT_DBG("chan %p credits %u", chan, atomic_get(&chan->rx.credits)); in l2cap_chan_send_credits()
2013 atomic_val_t old_credits = atomic_get(&chan->rx.credits); in l2cap_chan_update_credits()
2017 (chan->rx.mps - 1)) / chan->rx.mps; in l2cap_chan_update_credits()
2131 if (!atomic_get(&chan->rx.credits) && in l2cap_chan_le_recv_seg()
2132 seg == chan->rx.init_credits) { in l2cap_chan_le_recv_seg()
2151 if (!test_and_dec(&chan->rx.credits)) { in l2cap_chan_le_recv()
2167 if (sdu_len > chan->rx.mtu) { in l2cap_chan_le_recv()
2229 if (L2CAP_LE_CID_IS_DYN(ch->rx.cid)) { in l2cap_chan_recv()
2300 BT_L2CAP_LE_CHAN(chan)->rx.cid); in l2cap_connected()
2306 BT_L2CAP_LE_CHAN(chan)->rx.cid); in l2cap_disconnected()
2389 ch->rx.mtu, ch->rx.mps, ch->rx.init_credits); in l2cap_ecred_init()
2477 BT_DBG("chan %p scid 0x%04x dcid 0x%04x", chan, ch->rx.cid, in bt_l2cap_chan_disconnect()
2489 req->dcid = sys_cpu_to_le16(ch->rx.cid); in bt_l2cap_chan_disconnect()