Lines Matching full:mps

531 	/* Derive MPS from connection MTU to stop HCI fragmentation */  in l2cap_le_flowctl_init()
532 chan->mps = min_t(u16, chan->imtu, chan->conn->mtu - L2CAP_HDR_SIZE); in l2cap_le_flowctl_init()
534 chan->rx_credits = (chan->imtu / chan->mps) + 1; in l2cap_le_flowctl_init()
543 /* L2CAP implementations shall support a minimum MPS of 64 octets */ in l2cap_ecred_init()
544 if (chan->mps < L2CAP_ECRED_MIN_MPS) { in l2cap_ecred_init()
545 chan->mps = L2CAP_ECRED_MIN_MPS; in l2cap_ecred_init()
546 chan->rx_credits = (chan->imtu / chan->mps) + 1; in l2cap_ecred_init()
737 rsp.mps = cpu_to_le16(chan->mps); in l2cap_chan_le_connect_reject()
1373 req.mps = cpu_to_le16(chan->mps); in l2cap_le_connect()
1439 data.pdu.req.mps = cpu_to_le16(chan->mps); in l2cap_ecred_connect()
3870 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_parse_conf_rsp()
3886 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_parse_conf_rsp()
3920 rsp.mps = cpu_to_le16(chan->mps); in __l2cap_le_connect_rsp_defer()
3944 pdu.rsp.mps = cpu_to_le16(chan->mps); in __l2cap_ecred_conn_rsp_defer()
4040 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_conf_rfc_get()
4048 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_conf_rfc_get()
5577 u16 dcid, mtu, mps, credits, result; in l2cap_le_connect_rsp() local
5586 mps = __le16_to_cpu(rsp->mps); in l2cap_le_connect_rsp()
5590 if (result == L2CAP_CR_LE_SUCCESS && (mtu < 23 || mps < 23 || in l2cap_le_connect_rsp()
5595 BT_DBG("dcid 0x%4.4x mtu %u mps %u credits %u result 0x%2.2x", in l2cap_le_connect_rsp()
5596 dcid, mtu, mps, credits, result); in l2cap_le_connect_rsp()
5620 chan->remote_mps = mps; in l2cap_le_connect_rsp()
5745 u16 dcid, scid, credits, mtu, mps; in l2cap_le_connect_req() local
5754 mps = __le16_to_cpu(req->mps); in l2cap_le_connect_req()
5759 if (mtu < 23 || mps < 23) in l2cap_le_connect_req()
5762 BT_DBG("psm 0x%2.2x scid 0x%4.4x mtu %u mps %u", __le16_to_cpu(psm), in l2cap_le_connect_req()
5763 scid, mtu, mps); in l2cap_le_connect_req()
5811 chan->remote_mps = mps; in l2cap_le_connect_req()
5849 rsp.mps = cpu_to_le16(chan->mps); in l2cap_le_connect_req()
5852 rsp.mps = 0; in l2cap_le_connect_req()
5920 u16 mtu, mps; in l2cap_ecred_conn_req() local
5935 mps = __le16_to_cpu(req->mps); in l2cap_ecred_conn_req()
5937 if (mtu < L2CAP_ECRED_MIN_MTU || mps < L2CAP_ECRED_MIN_MPS) { in l2cap_ecred_conn_req()
5944 BT_DBG("psm 0x%2.2x mtu %u mps %u", __le16_to_cpu(psm), mtu, mps); in l2cap_ecred_conn_req()
6002 chan->remote_mps = mps; in l2cap_ecred_conn_req()
6011 pdu.rsp.mps = cpu_to_le16(chan->mps); in l2cap_ecred_conn_req()
6053 u16 mtu, mps, credits, result; in l2cap_ecred_conn_rsp() local
6062 mps = __le16_to_cpu(rsp->mps); in l2cap_ecred_conn_rsp()
6066 BT_DBG("mtu %u mps %u credits %u result 0x%4.4x", mtu, mps, credits, in l2cap_ecred_conn_rsp()
6147 chan->remote_mps = mps; in l2cap_ecred_conn_rsp()
6167 u16 mtu, mps, result; in l2cap_ecred_reconf_req() local
6180 mps = __le16_to_cpu(req->mps); in l2cap_ecred_reconf_req()
6182 BT_DBG("mtu %u mps %u", mtu, mps); in l2cap_ecred_reconf_req()
6189 if (mps < L2CAP_ECRED_MIN_MPS) { in l2cap_ecred_reconf_req()
6220 chan->remote_mps = mps; in l2cap_ecred_reconf_req()
7299 if (len > chan->mps) { in l2cap_data_rcv()
7374 return_credits = (chan->imtu / chan->mps) + 1; in l2cap_chan_le_send_credits()
7427 * if the remote is not using the entire MPS. in l2cap_ecred_data_rcv()
7462 /* Detect if remote is not able to use the selected MPS */ in l2cap_ecred_data_rcv()
7463 if (skb->len + L2CAP_SDULEN_SIZE < chan->mps) { in l2cap_ecred_data_rcv()
7467 BT_DBG("chan->mps %u -> %u", chan->mps, mps_len); in l2cap_ecred_data_rcv()
7468 chan->mps = mps_len; in l2cap_ecred_data_rcv()
7992 pdu.req.mps = cpu_to_le16(chan->mps); in l2cap_ecred_reconfigure()