• Home
  • Raw
  • Download

Lines Matching refs:sock

242 int nfc_llcp_parse_connection_tlv(struct nfc_llcp_sock *sock,  in nfc_llcp_parse_connection_tlv()  argument
250 if (sock == NULL) in nfc_llcp_parse_connection_tlv()
261 sock->remote_miu = llcp_tlv_miux(tlv) + 128; in nfc_llcp_parse_connection_tlv()
264 sock->remote_rw = llcp_tlv_rw(tlv); in nfc_llcp_parse_connection_tlv()
277 pr_debug("sock %p rw %d miu %d\n", sock, in nfc_llcp_parse_connection_tlv()
278 sock->remote_rw, sock->remote_miu); in nfc_llcp_parse_connection_tlv()
313 static struct sk_buff *llcp_allocate_pdu(struct nfc_llcp_sock *sock, in llcp_allocate_pdu() argument
319 if (sock->ssap == 0) in llcp_allocate_pdu()
322 skb = nfc_alloc_send_skb(sock->dev, &sock->sk, MSG_DONTWAIT, in llcp_allocate_pdu()
329 skb = llcp_add_header(skb, sock->dsap, sock->ssap, cmd); in llcp_allocate_pdu()
334 int nfc_llcp_send_disconnect(struct nfc_llcp_sock *sock) in nfc_llcp_send_disconnect() argument
342 local = sock->local; in nfc_llcp_send_disconnect()
346 dev = sock->dev; in nfc_llcp_send_disconnect()
350 skb = llcp_allocate_pdu(sock, LLCP_PDU_DISC, 0); in nfc_llcp_send_disconnect()
396 int nfc_llcp_send_connect(struct nfc_llcp_sock *sock) in nfc_llcp_send_connect() argument
411 local = sock->local; in nfc_llcp_send_connect()
415 if (sock->service_name != NULL) { in nfc_llcp_send_connect()
417 sock->service_name, in nfc_llcp_send_connect()
418 sock->service_name_len, in nfc_llcp_send_connect()
428 miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? in nfc_llcp_send_connect()
429 local->miux : sock->miux; in nfc_llcp_send_connect()
430 rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw; in nfc_llcp_send_connect()
447 pr_debug("SKB size %d SN length %zu\n", size, sock->service_name_len); in nfc_llcp_send_connect()
449 skb = llcp_allocate_pdu(sock, LLCP_PDU_CONNECT, size); in nfc_llcp_send_connect()
474 int nfc_llcp_send_cc(struct nfc_llcp_sock *sock) in nfc_llcp_send_cc() argument
487 local = sock->local; in nfc_llcp_send_cc()
492 miux = be16_to_cpu(sock->miux) > LLCP_MAX_MIUX ? in nfc_llcp_send_cc()
493 local->miux : sock->miux; in nfc_llcp_send_cc()
494 rw = sock->rw > LLCP_MAX_RW ? local->rw : sock->rw; in nfc_llcp_send_cc()
511 skb = llcp_allocate_pdu(sock, LLCP_PDU_CC, size); in nfc_llcp_send_cc()
654 int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock, in nfc_llcp_send_i_frame() argument
658 struct sock *sk = &sock->sk; in nfc_llcp_send_i_frame()
666 local = sock->local; in nfc_llcp_send_i_frame()
671 if((sock->remote_ready && in nfc_llcp_send_i_frame()
672 skb_queue_len(&sock->tx_pending_queue) >= sock->remote_rw && in nfc_llcp_send_i_frame()
673 skb_queue_len(&sock->tx_queue) >= 2 * sock->remote_rw)) { in nfc_llcp_send_i_frame()
675 skb_queue_len(&sock->tx_pending_queue)); in nfc_llcp_send_i_frame()
680 if ((!sock->remote_ready && in nfc_llcp_send_i_frame()
681 skb_queue_len(&sock->tx_queue) >= 2 * sock->remote_rw)) { in nfc_llcp_send_i_frame()
683 skb_queue_len(&sock->tx_queue)); in nfc_llcp_send_i_frame()
700 remote_miu = sock->remote_miu > LLCP_MAX_MIU ? in nfc_llcp_send_i_frame()
701 LLCP_DEFAULT_MIU : sock->remote_miu; in nfc_llcp_send_i_frame()
708 pdu = llcp_allocate_pdu(sock, LLCP_PDU_I, in nfc_llcp_send_i_frame()
720 skb_queue_tail(&sock->tx_queue, pdu); in nfc_llcp_send_i_frame()
724 nfc_llcp_queue_i_frames(sock); in nfc_llcp_send_i_frame()
737 int nfc_llcp_send_ui_frame(struct nfc_llcp_sock *sock, u8 ssap, u8 dsap, in nfc_llcp_send_ui_frame() argument
749 local = sock->local; in nfc_llcp_send_ui_frame()
766 remote_miu = sock->remote_miu > LLCP_MAX_MIU ? in nfc_llcp_send_ui_frame()
767 local->remote_miu : sock->remote_miu; in nfc_llcp_send_ui_frame()
774 pdu = nfc_alloc_send_skb(sock->dev, &sock->sk, 0, in nfc_llcp_send_ui_frame()
801 int nfc_llcp_send_rr(struct nfc_llcp_sock *sock) in nfc_llcp_send_rr() argument
806 pr_debug("Send rr nr %d\n", sock->recv_n); in nfc_llcp_send_rr()
808 local = sock->local; in nfc_llcp_send_rr()
812 skb = llcp_allocate_pdu(sock, LLCP_PDU_RR, LLCP_SEQUENCE_SIZE); in nfc_llcp_send_rr()
818 skb->data[2] = sock->recv_n; in nfc_llcp_send_rr()