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()
881 if (chan->psm == cpu_to_le16(L2CAP_PSM_3DSP)) { in l2cap_get_auth_type()
892 if (chan->psm == cpu_to_le16(L2CAP_PSM_SDP)) { in l2cap_get_auth_type()
1280 req.psm = chan->psm; in l2cap_send_conn_req()
1293 req.psm = chan->psm; in l2cap_send_create_chan_req()
1399 req.psm = chan->psm; in l2cap_le_connect()
1435 if (conn->pid != pid || chan->psm != conn->chan->psm || chan->ident || in l2cap_ecred_defer_connect()
1467 data.pdu.req.psm = chan->psm; in l2cap_ecred_connect()
1493 if (!chan->psm) { in l2cap_le_start()
1970 static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, in l2cap_global_chan_by_psm() argument
1989 if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) { in l2cap_global_chan_by_psm()
2398 __le16_to_cpu(chan->psm), len); in l2cap_create_connless_pdu()
2411 put_unaligned(chan->psm, (__le16 *) skb_put(skb, L2CAP_PSMLEN_SIZE)); in l2cap_create_connless_pdu()
4139 __le16 psm = req->psm; in l2cap_connect() local
4141 BT_DBG("psm 0x%2.2x scid 0x%4.4x", __le16_to_cpu(psm), scid); in l2cap_connect()
4144 pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, in l2cap_connect()
4155 if (psm != cpu_to_le16(L2CAP_PSM_SDP) && in l2cap_connect()
4191 chan->psm = psm; in l2cap_connect()
4852 u16 psm, scid; in l2cap_create_channel_req() local
4860 psm = le16_to_cpu(req->psm); in l2cap_create_channel_req()
4863 BT_DBG("psm 0x%2.2x, scid 0x%4.4x, amp_id %d", psm, scid, req->amp_id); in l2cap_create_channel_req()
5814 __le16 psm; in l2cap_le_connect_req() local
5823 psm = req->psm; in l2cap_le_connect_req()
5830 BT_DBG("psm 0x%2.2x scid 0x%4.4x mtu %u mps %u", __le16_to_cpu(psm), in l2cap_le_connect_req()
5840 if (!psm || __le16_to_cpu(psm) > L2CAP_PSM_LE_DYN_END) { in l2cap_le_connect_req()
5847 pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, in l2cap_le_connect_req()
5889 chan->psm = psm; in l2cap_le_connect_req()
6003 __le16 psm; in l2cap_ecred_conn_req() local
6032 psm = req->psm; in l2cap_ecred_conn_req()
6041 if (!psm || __le16_to_cpu(psm) > L2CAP_PSM_LE_DYN_END) { in l2cap_ecred_conn_req()
6046 BT_DBG("psm 0x%2.2x mtu %u mps %u", __le16_to_cpu(psm), mtu, mps); in l2cap_ecred_conn_req()
6051 pchan = l2cap_global_chan_by_psm(BT_LISTEN, psm, &conn->hcon->src, in l2cap_ecred_conn_req()
6099 chan->psm = psm; in l2cap_ecred_conn_req()
7729 static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, in l2cap_conless_channel() argument
7738 chan = l2cap_global_chan_by_psm(0, psm, &hcon->src, &hcon->dst, in l2cap_conless_channel()
7753 bt_cb(skb)->l2cap.psm = psm; in l2cap_conless_channel()
7771 __le16 psm; in l2cap_recv_frame() local
7806 psm = get_unaligned((__le16 *) skb->data); in l2cap_recv_frame()
7808 l2cap_conless_channel(conn, psm, skb); in l2cap_recv_frame()
7900 static bool is_valid_psm(u16 psm, u8 dst_type) in is_valid_psm() argument
7902 if (!psm) in is_valid_psm()
7906 return (psm <= 0x00ff); in is_valid_psm()
7909 return ((psm & 0x0101) == 0x0001); in is_valid_psm()
7932 if (d->pid != pid || chan->psm != d->chan->psm || chan->ident || in l2cap_chan_by_pid()
7939 int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, in l2cap_chan_connect() argument
7948 dst, dst_type, __le16_to_cpu(psm), chan->mode); in l2cap_chan_connect()
7956 if (!is_valid_psm(__le16_to_cpu(psm), dst_type) && !cid && in l2cap_chan_connect()
7962 if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED && !psm) { in l2cap_chan_connect()
8020 chan->psm = psm; in l2cap_chan_connect()
8603 c->state, __le16_to_cpu(c->psm), in l2cap_debugfs_show()