Lines Matching refs:psm

188 static struct l2cap_chan *__l2cap_global_chan_by_addr(__le16 psm, bdaddr_t *src,  in __l2cap_global_chan_by_addr()  argument
200 if (c->sport == psm && !bacmp(&c->src, src)) in __l2cap_global_chan_by_addr()
206 int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm) in l2cap_add_psm() argument
212 if (psm && __l2cap_global_chan_by_addr(psm, src, chan->src_type)) { in l2cap_add_psm()
217 if (psm) { in l2cap_add_psm()
218 chan->psm = psm; in l2cap_add_psm()
219 chan->sport = psm; in l2cap_add_psm()
238 chan->psm = cpu_to_le16(p); in l2cap_add_psm()
586 __le16_to_cpu(chan->psm), chan->dcid); in __l2cap_chan_add()
884 if (chan->psm == cpu_to_le16(L2CAP_PSM_3DSP)) { in l2cap_get_auth_type()
895 if (chan->psm == cpu_to_le16(L2CAP_PSM_SDP)) { in l2cap_get_auth_type()
1283 req.psm = chan->psm; in l2cap_send_conn_req()
1296 req.psm = chan->psm; in l2cap_send_create_chan_req()
1402 req.psm = chan->psm; in l2cap_le_connect()
1438 if (conn->pid != pid || chan->psm != conn->chan->psm || chan->ident || in l2cap_ecred_defer_connect()
1470 data.pdu.req.psm = chan->psm; in l2cap_ecred_connect()
1496 if (!chan->psm) { in l2cap_le_start()
1974 static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, in l2cap_global_chan_by_psm() argument
1993 if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) { in l2cap_global_chan_by_psm()
2402 __le16_to_cpu(chan->psm), len); in l2cap_create_connless_pdu()
2415 put_unaligned(chan->psm, (__le16 *) skb_put(skb, L2CAP_PSMLEN_SIZE)); in l2cap_create_connless_pdu()
4124 __le16 psm = req->psm; in l2cap_connect() local
4126 BT_DBG("psm 0x%2.2x scid 0x%4.4x", __le16_to_cpu(psm), scid); in l2cap_connect()
4129 pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, in l2cap_connect()
4140 if (psm != cpu_to_le16(L2CAP_PSM_SDP) && in l2cap_connect()
4176 chan->psm = psm; in l2cap_connect()
4837 u16 psm, scid; in l2cap_create_channel_req() local
4845 psm = le16_to_cpu(req->psm); in l2cap_create_channel_req()
4848 BT_DBG("psm 0x%2.2x, scid 0x%4.4x, amp_id %d", psm, scid, req->amp_id); in l2cap_create_channel_req()
5799 __le16 psm; in l2cap_le_connect_req() local
5808 psm = req->psm; in l2cap_le_connect_req()
5815 BT_DBG("psm 0x%2.2x scid 0x%4.4x mtu %u mps %u", __le16_to_cpu(psm), in l2cap_le_connect_req()
5825 if (!psm || __le16_to_cpu(psm) > L2CAP_PSM_LE_DYN_END) { in l2cap_le_connect_req()
5832 pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, in l2cap_le_connect_req()
5874 chan->psm = psm; in l2cap_le_connect_req()
5988 __le16 psm; in l2cap_ecred_conn_req() local
6017 psm = req->psm; in l2cap_ecred_conn_req()
6026 if (!psm || __le16_to_cpu(psm) > L2CAP_PSM_LE_DYN_END) { in l2cap_ecred_conn_req()
6031 BT_DBG("psm 0x%2.2x mtu %u mps %u", __le16_to_cpu(psm), mtu, mps); in l2cap_ecred_conn_req()
6036 pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, in l2cap_ecred_conn_req()
6084 chan->psm = psm; in l2cap_ecred_conn_req()
7708 static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, in l2cap_conless_channel() argument
7717 chan = l2cap_global_chan_by_psm(0, psm, &hcon->src, &hcon->dst, in l2cap_conless_channel()
7732 bt_cb(skb)->l2cap.psm = psm; in l2cap_conless_channel()
7750 __le16 psm; in l2cap_recv_frame() local
7785 psm = get_unaligned((__le16 *) skb->data); in l2cap_recv_frame()
7787 l2cap_conless_channel(conn, psm, skb); in l2cap_recv_frame()
7879 static bool is_valid_psm(u16 psm, u8 dst_type) in is_valid_psm() argument
7881 if (!psm) in is_valid_psm()
7885 return (psm <= 0x00ff); in is_valid_psm()
7888 return ((psm & 0x0101) == 0x0001); in is_valid_psm()
7911 if (d->pid != pid || chan->psm != d->chan->psm || chan->ident || in l2cap_chan_by_pid()
7918 int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, in l2cap_chan_connect() argument
7927 dst, dst_type, __le16_to_cpu(psm), chan->mode); in l2cap_chan_connect()
7935 if (!is_valid_psm(__le16_to_cpu(psm), dst_type) && !cid && in l2cap_chan_connect()
7941 if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED && !psm) { in l2cap_chan_connect()
7999 chan->psm = psm; in l2cap_chan_connect()
8582 c->state, __le16_to_cpu(c->psm), in l2cap_debugfs_show()