Lines Matching refs:l2cap_pi

203 		if (l2cap_pi(sk)->psm == psm) {  in __l2cap_get_sock_by_psm()
283 struct l2cap_conn *conn = l2cap_pi(sk)->conn; in __l2cap_sock_close()
289 req.dcid = __cpu_to_le16(l2cap_pi(sk)->dcid); in __l2cap_sock_close()
290 req.scid = __cpu_to_le16(l2cap_pi(sk)->scid); in __l2cap_sock_close()
320 struct l2cap_pinfo *pi = l2cap_pi(sk); in l2cap_sock_init()
326 pi->imtu = l2cap_pi(parent)->imtu; in l2cap_sock_init()
327 pi->omtu = l2cap_pi(parent)->omtu; in l2cap_sock_init()
328 pi->link_mode = l2cap_pi(parent)->link_mode; in l2cap_sock_init()
412 l2cap_pi(sk)->psm = la->l2_psm; in l2cap_sock_bind()
440 BT_DBG("%s -> %s psm 0x%2.2x", batostr(src), batostr(dst), l2cap_pi(sk)->psm); in l2cap_do_connect()
472 req.scid = __cpu_to_le16(l2cap_pi(sk)->scid); in l2cap_do_connect()
473 req.psm = l2cap_pi(sk)->psm; in l2cap_do_connect()
530 l2cap_pi(sk)->psm = la->l2_psm; in l2cap_sock_connect()
558 if (!l2cap_pi(sk)->psm) { in l2cap_sock_listen()
643 la->l2_psm = l2cap_pi(sk)->psm; in l2cap_sock_getname()
661 if (len > l2cap_pi(sk)->omtu) in l2cap_sock_sendmsg()
688 opts.imtu = l2cap_pi(sk)->imtu; in l2cap_sock_setsockopt()
689 opts.omtu = l2cap_pi(sk)->omtu; in l2cap_sock_setsockopt()
690 opts.flush_to = l2cap_pi(sk)->flush_to; in l2cap_sock_setsockopt()
697 l2cap_pi(sk)->imtu = opts.imtu; in l2cap_sock_setsockopt()
698 l2cap_pi(sk)->omtu = opts.omtu; in l2cap_sock_setsockopt()
707 l2cap_pi(sk)->link_mode = opt; in l2cap_sock_setsockopt()
733 opts.imtu = l2cap_pi(sk)->imtu; in l2cap_sock_getsockopt()
734 opts.omtu = l2cap_pi(sk)->omtu; in l2cap_sock_getsockopt()
735 opts.flush_to = l2cap_pi(sk)->flush_to; in l2cap_sock_getsockopt()
744 if (put_user(l2cap_pi(sk)->link_mode, (__u32 *)optval)) in l2cap_sock_getsockopt()
754 cinfo.hci_handle = l2cap_pi(sk)->conn->hcon->handle; in l2cap_sock_getsockopt()
813 for (s = l->head; s; s = l2cap_pi(s)->next_c) { in __l2cap_get_chan_by_dcid()
814 if (l2cap_pi(s)->dcid == cid) in __l2cap_get_chan_by_dcid()
823 for (s = l->head; s; s = l2cap_pi(s)->next_c) { in __l2cap_get_chan_by_scid()
824 if (l2cap_pi(s)->scid == cid) in __l2cap_get_chan_by_scid()
859 l2cap_pi(l->head)->prev_c = sk; in __l2cap_chan_link()
861 l2cap_pi(sk)->next_c = l->head; in __l2cap_chan_link()
862 l2cap_pi(sk)->prev_c = NULL; in __l2cap_chan_link()
868 struct sock *next = l2cap_pi(sk)->next_c, *prev = l2cap_pi(sk)->prev_c; in l2cap_chan_unlink()
875 l2cap_pi(next)->prev_c = prev; in l2cap_chan_unlink()
877 l2cap_pi(prev)->next_c = next; in l2cap_chan_unlink()
887 BT_DBG("conn %p, psm 0x%2.2x, dcid 0x%4.4x", conn, l2cap_pi(sk)->psm, l2cap_pi(sk)->dcid); in __l2cap_chan_add()
889 l2cap_pi(sk)->conn = conn; in __l2cap_chan_add()
893 l2cap_pi(sk)->scid = l2cap_alloc_cid(l); in __l2cap_chan_add()
896 l2cap_pi(sk)->scid = 0x0002; in __l2cap_chan_add()
897 l2cap_pi(sk)->dcid = 0x0002; in __l2cap_chan_add()
898 l2cap_pi(sk)->omtu = L2CAP_DEFAULT_MTU; in __l2cap_chan_add()
901 l2cap_pi(sk)->scid = 0x0001; in __l2cap_chan_add()
902 l2cap_pi(sk)->dcid = 0x0001; in __l2cap_chan_add()
903 l2cap_pi(sk)->omtu = L2CAP_DEFAULT_MTU; in __l2cap_chan_add()
916 struct l2cap_conn *conn = l2cap_pi(sk)->conn; in l2cap_chan_del()
926 l2cap_pi(sk)->conn = NULL; in l2cap_chan_del()
951 for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { in l2cap_conn_ready()
960 req.scid = __cpu_to_le16(l2cap_pi(sk)->scid); in l2cap_conn_ready()
961 req.psm = l2cap_pi(sk)->psm; in l2cap_conn_ready()
980 for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { in l2cap_conn_unreliable()
981 if (l2cap_pi(sk)->link_mode & L2CAP_LM_RELIABLE) in l2cap_conn_unreliable()
993 l2cap_pi(sk)->conf_state = 0; in l2cap_chan_ready()
1020 for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { in l2cap_raw_recv()
1039 struct l2cap_conn *conn = l2cap_pi(sk)->conn; in l2cap_chan_send()
1061 lh->cid = __cpu_to_le16(l2cap_pi(sk)->dcid); in l2cap_chan_send()
1065 put_unaligned(l2cap_pi(sk)->psm, (__u16 *) skb_put(skb, 2)); in l2cap_chan_send()
1257 l2cap_pi(sk)->conf_mtu = val; in l2cap_parse_conf_req()
1261 l2cap_pi(sk)->flush_to = val; in l2cap_parse_conf_req()
1309 struct l2cap_pinfo *pi = l2cap_pi(sk); in l2cap_build_conf_req()
1330 struct l2cap_pinfo *pi = l2cap_pi(sk); in l2cap_conf_output()
1360 rsp->scid = __cpu_to_le16(l2cap_pi(sk)->dcid); in l2cap_build_conf_rsp()
1414 l2cap_pi(sk)->psm = psm; in l2cap_connect_req()
1415 l2cap_pi(sk)->dcid = scid; in l2cap_connect_req()
1418 dcid = l2cap_pi(sk)->scid; in l2cap_connect_req()
1426 l2cap_pi(sk)->ident = cmd->ident; in l2cap_connect_req()
1428 if (l2cap_pi(sk)->link_mode & L2CAP_LM_ENCRYPT) { in l2cap_connect_req()
1431 } else if (l2cap_pi(sk)->link_mode & L2CAP_LM_AUTH) { in l2cap_connect_req()
1474 l2cap_pi(sk)->dcid = dcid; in l2cap_connect_rsp()
1475 l2cap_pi(sk)->conf_state |= L2CAP_CONF_REQ_SENT; in l2cap_connect_rsp()
1523 l2cap_pi(sk)->conf_state |= L2CAP_CONF_OUTPUT_DONE; in l2cap_config_req()
1525 if (l2cap_pi(sk)->conf_state & L2CAP_CONF_INPUT_DONE) { in l2cap_config_req()
1528 } else if (!(l2cap_pi(sk)->conf_state & L2CAP_CONF_REQ_SENT)) { in l2cap_config_req()
1559 if (++l2cap_pi(sk)->conf_retry < L2CAP_CONF_MAX_RETRIES) { in l2cap_config_rsp()
1578 req.dcid = __cpu_to_le16(l2cap_pi(sk)->dcid); in l2cap_config_rsp()
1579 req.scid = __cpu_to_le16(l2cap_pi(sk)->scid); in l2cap_config_rsp()
1589 l2cap_pi(sk)->conf_state |= L2CAP_CONF_INPUT_DONE; in l2cap_config_rsp()
1591 if (l2cap_pi(sk)->conf_state & L2CAP_CONF_OUTPUT_DONE) { in l2cap_config_rsp()
1616 rsp.dcid = __cpu_to_le16(l2cap_pi(sk)->scid); in l2cap_disconnect_req()
1617 rsp.scid = __cpu_to_le16(l2cap_pi(sk)->dcid); in l2cap_disconnect_req()
1782 if (l2cap_pi(sk)->imtu < skb->len) in l2cap_data_channel()
1814 if (l2cap_pi(sk)->imtu < skb->len) in l2cap_conless_channel()
1875 lm1 |= (HCI_LM_ACCEPT | l2cap_pi(sk)->link_mode); in l2cap_connect_ind()
1878 lm2 |= (HCI_LM_ACCEPT | l2cap_pi(sk)->link_mode); in l2cap_connect_ind()
1931 for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { in l2cap_auth_cfm()
1935 (l2cap_pi(sk)->link_mode & L2CAP_LM_ENCRYPT)) { in l2cap_auth_cfm()
1949 rsp.scid = __cpu_to_le16(l2cap_pi(sk)->dcid); in l2cap_auth_cfm()
1950 rsp.dcid = __cpu_to_le16(l2cap_pi(sk)->scid); in l2cap_auth_cfm()
1953 l2cap_send_rsp(conn, l2cap_pi(sk)->ident, L2CAP_CONN_RSP, in l2cap_auth_cfm()
1979 for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { in l2cap_encrypt_cfm()
1996 rsp.scid = __cpu_to_le16(l2cap_pi(sk)->dcid); in l2cap_encrypt_cfm()
1997 rsp.dcid = __cpu_to_le16(l2cap_pi(sk)->scid); in l2cap_encrypt_cfm()
2000 l2cap_send_rsp(conn, l2cap_pi(sk)->ident, L2CAP_CONN_RSP, in l2cap_encrypt_cfm()
2106 pi = l2cap_pi(sk); in l2cap_sock_dump()