H A D | llcp_core.c | 83 struct nfc_llcp_sock *llcp_sock; nfc_llcp_socket_release() local 90 llcp_sock = nfc_llcp_sock(sk); nfc_llcp_socket_release() 94 nfc_llcp_socket_purge(llcp_sock); nfc_llcp_socket_release() 97 nfc_put_device(llcp_sock->dev); nfc_llcp_socket_release() 104 &llcp_sock->accept_queue, nfc_llcp_socket_release() 139 llcp_sock = nfc_llcp_sock(sk); nfc_llcp_socket_release() 143 nfc_llcp_socket_purge(llcp_sock); nfc_llcp_socket_release() 202 struct nfc_llcp_sock *llcp_sock, *tmp_sock; nfc_llcp_sock_get() local 211 llcp_sock = NULL; nfc_llcp_sock_get() 217 llcp_sock = tmp_sock; nfc_llcp_sock_get() 224 if (llcp_sock == NULL) nfc_llcp_sock_get() 227 sock_hold(&llcp_sock->sk); nfc_llcp_sock_get() 229 return llcp_sock; nfc_llcp_sock_get() 343 struct nfc_llcp_sock *llcp_sock, *tmp_sock; nfc_llcp_sock_from_sn() local 352 llcp_sock = NULL; nfc_llcp_sock_from_sn() 375 llcp_sock = tmp_sock; nfc_llcp_sock_from_sn() 382 pr_debug("Found llcp sock %p\n", llcp_sock); nfc_llcp_sock_from_sn() 384 return llcp_sock; nfc_llcp_sock_from_sn() 716 struct nfc_llcp_sock *llcp_sock; nfc_llcp_tx_work() local 721 llcp_sock = nfc_llcp_sock(sk); nfc_llcp_tx_work() 723 if (llcp_sock == NULL && nfc_llcp_ptype(skb) == LLCP_PDU_I) { nfc_llcp_tx_work() 726 } else if (llcp_sock && !llcp_sock->remote_ready) { nfc_llcp_tx_work() 763 skb_queue_tail(&llcp_sock->tx_pending_queue, nfc_llcp_tx_work() 779 struct nfc_llcp_sock *llcp_sock; nfc_llcp_connecting_sock_get() local 784 llcp_sock = nfc_llcp_sock(sk); nfc_llcp_connecting_sock_get() 786 if (llcp_sock->ssap == ssap) { nfc_llcp_connecting_sock_get() 787 sock_hold(&llcp_sock->sk); nfc_llcp_connecting_sock_get() 792 llcp_sock = NULL; nfc_llcp_connecting_sock_get() 797 return llcp_sock; nfc_llcp_connecting_sock_get() 803 struct nfc_llcp_sock *llcp_sock; nfc_llcp_sock_get_sn() local 805 llcp_sock = nfc_llcp_sock_from_sn(local, sn, sn_len); nfc_llcp_sock_get_sn() 807 if (llcp_sock == NULL) nfc_llcp_sock_get_sn() 810 sock_hold(&llcp_sock->sk); nfc_llcp_sock_get_sn() 812 return llcp_sock; nfc_llcp_sock_get_sn() 841 struct nfc_llcp_sock *llcp_sock; nfc_llcp_recv_ui() local 855 llcp_sock = nfc_llcp_sock_get(local, dsap, LLCP_SAP_SDP); nfc_llcp_recv_ui() 856 if (llcp_sock == NULL || llcp_sock->sk.sk_type != SOCK_DGRAM) nfc_llcp_recv_ui() 861 if (!sock_queue_rcv_skb(&llcp_sock->sk, skb)) { nfc_llcp_recv_ui() 871 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_ui() 1027 struct nfc_llcp_sock *llcp_sock; nfc_llcp_recv_hdlc() local 1039 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); nfc_llcp_recv_hdlc() 1040 if (llcp_sock == NULL) { nfc_llcp_recv_hdlc() 1045 sk = &llcp_sock->sk; nfc_llcp_recv_hdlc() 1049 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_hdlc() 1054 pr_debug("I frame, queueing on %p\n", &llcp_sock->sk); nfc_llcp_recv_hdlc() 1056 if (ns == llcp_sock->recv_n) nfc_llcp_recv_hdlc() 1057 llcp_sock->recv_n = (llcp_sock->recv_n + 1) % 16; nfc_llcp_recv_hdlc() 1062 if (!sock_queue_rcv_skb(&llcp_sock->sk, skb)) { nfc_llcp_recv_hdlc() 1074 if (llcp_sock->send_ack_n != nr) { nfc_llcp_recv_hdlc() 1078 llcp_sock->send_ack_n = nr; nfc_llcp_recv_hdlc() 1081 skb_queue_walk_safe(&llcp_sock->tx_pending_queue, s, tmp) { nfc_llcp_recv_hdlc() 1084 skb_unlink(s, &llcp_sock->tx_pending_queue); nfc_llcp_recv_hdlc() 1092 skb_queue_reverse_walk_safe(&llcp_sock->tx_pending_queue, nfc_llcp_recv_hdlc() 1094 skb_unlink(s, &llcp_sock->tx_pending_queue); nfc_llcp_recv_hdlc() 1100 llcp_sock->remote_ready = true; nfc_llcp_recv_hdlc() 1102 llcp_sock->remote_ready = false; nfc_llcp_recv_hdlc() 1104 if (nfc_llcp_queue_i_frames(llcp_sock) == 0 && ptype == LLCP_PDU_I) nfc_llcp_recv_hdlc() 1105 nfc_llcp_send_rr(llcp_sock); nfc_llcp_recv_hdlc() 1108 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_hdlc() 1114 struct nfc_llcp_sock *llcp_sock; nfc_llcp_recv_disc() local 1127 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); nfc_llcp_recv_disc() 1128 if (llcp_sock == NULL) { nfc_llcp_recv_disc() 1133 sk = &llcp_sock->sk; nfc_llcp_recv_disc() 1136 nfc_llcp_socket_purge(llcp_sock); nfc_llcp_recv_disc() 1140 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_disc() 1152 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_disc() 1157 struct nfc_llcp_sock *llcp_sock; nfc_llcp_recv_cc() local 1164 llcp_sock = nfc_llcp_connecting_sock_get(local, dsap); nfc_llcp_recv_cc() 1165 if (llcp_sock == NULL) { nfc_llcp_recv_cc() 1172 sk = &llcp_sock->sk; nfc_llcp_recv_cc() 1177 llcp_sock->dsap = ssap; nfc_llcp_recv_cc() 1179 nfc_llcp_parse_connection_tlv(llcp_sock, &skb->data[LLCP_HEADER_SIZE], nfc_llcp_recv_cc() 1185 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_cc() 1190 struct nfc_llcp_sock *llcp_sock; nfc_llcp_recv_dm() local 1203 llcp_sock = nfc_llcp_connecting_sock_get(local, dsap); nfc_llcp_recv_dm() 1207 llcp_sock = nfc_llcp_sock_get(local, dsap, ssap); nfc_llcp_recv_dm() 1211 if (llcp_sock == NULL) { nfc_llcp_recv_dm() 1216 sk = &llcp_sock->sk; nfc_llcp_recv_dm() 1222 nfc_llcp_sock_put(llcp_sock); nfc_llcp_recv_dm() 1228 struct nfc_llcp_sock *llcp_sock; nfc_llcp_recv_snl() local 1272 llcp_sock = nfc_llcp_sock_from_sn(local, service_name, nfc_llcp_recv_snl() 1274 if (!llcp_sock) { nfc_llcp_recv_snl() 1284 if (llcp_sock->ssap == LLCP_SDP_UNBOUND) { nfc_llcp_recv_snl() 1302 llcp_sock->ssap = sap; nfc_llcp_recv_snl() 1303 llcp_sock->reserved_ssap = sap; nfc_llcp_recv_snl() 1305 sap = llcp_sock->ssap; nfc_llcp_recv_snl() 1308 pr_debug("%p %d\n", llcp_sock, sap); nfc_llcp_recv_snl()
|