Lines Matching refs:sdreq

136 	struct nfc_llcp_sdp_tlv *sdreq;  in nfc_llcp_build_sdreq_tlv()  local
144 sdreq = kzalloc(sizeof(struct nfc_llcp_sdp_tlv), GFP_KERNEL); in nfc_llcp_build_sdreq_tlv()
145 if (sdreq == NULL) in nfc_llcp_build_sdreq_tlv()
148 sdreq->tlv_len = uri_len + 3; in nfc_llcp_build_sdreq_tlv()
151 sdreq->tlv_len--; in nfc_llcp_build_sdreq_tlv()
153 sdreq->tlv = kzalloc(sdreq->tlv_len + 1, GFP_KERNEL); in nfc_llcp_build_sdreq_tlv()
154 if (sdreq->tlv == NULL) { in nfc_llcp_build_sdreq_tlv()
155 kfree(sdreq); in nfc_llcp_build_sdreq_tlv()
159 sdreq->tlv[0] = LLCP_TLV_SDREQ; in nfc_llcp_build_sdreq_tlv()
160 sdreq->tlv[1] = sdreq->tlv_len - 2; in nfc_llcp_build_sdreq_tlv()
161 sdreq->tlv[2] = tid; in nfc_llcp_build_sdreq_tlv()
163 sdreq->tid = tid; in nfc_llcp_build_sdreq_tlv()
164 sdreq->uri = sdreq->tlv + 3; in nfc_llcp_build_sdreq_tlv()
165 memcpy(sdreq->uri, uri, uri_len); in nfc_llcp_build_sdreq_tlv()
167 sdreq->time = jiffies; in nfc_llcp_build_sdreq_tlv()
169 INIT_HLIST_NODE(&sdreq->node); in nfc_llcp_build_sdreq_tlv()
171 return sdreq; in nfc_llcp_build_sdreq_tlv()
575 struct nfc_llcp_sdp_tlv *sdreq; in nfc_llcp_send_snl_sdreq() local
589 hlist_for_each_entry_safe(sdreq, n, tlv_list, node) { in nfc_llcp_send_snl_sdreq()
590 pr_debug("tid %d for %s\n", sdreq->tid, sdreq->uri); in nfc_llcp_send_snl_sdreq()
592 skb_put_data(skb, sdreq->tlv, sdreq->tlv_len); in nfc_llcp_send_snl_sdreq()
594 hlist_del(&sdreq->node); in nfc_llcp_send_snl_sdreq()
596 hlist_add_head(&sdreq->node, &local->pending_sdreqs); in nfc_llcp_send_snl_sdreq()