Lines Matching refs:atr_req
153 struct st21nfca_atr_req *atr_req) in st21nfca_tm_send_atr_res() argument
161 gb_len = atr_req->length - sizeof(struct st21nfca_atr_req); in st21nfca_tm_send_atr_res()
162 skb = alloc_skb(atr_req->length + 1, GFP_KERNEL); in st21nfca_tm_send_atr_res()
171 atr_res->length = atr_req->length + 1; in st21nfca_tm_send_atr_res()
175 memcpy(atr_res->nfcid3, atr_req->nfcid3, 6); in st21nfca_tm_send_atr_res()
185 memcpy(atr_res->gbi, atr_req->gbi, gb_len); in st21nfca_tm_send_atr_res()
203 struct st21nfca_atr_req *atr_req; in st21nfca_tm_recv_atr_req() local
219 atr_req = (struct st21nfca_atr_req *)skb->data; in st21nfca_tm_recv_atr_req()
221 if (atr_req->length < sizeof(struct st21nfca_atr_req)) { in st21nfca_tm_recv_atr_req()
226 r = st21nfca_tm_send_atr_res(hdev, atr_req); in st21nfca_tm_recv_atr_req()
233 NFC_COMM_PASSIVE, atr_req->gbi, gb_len); in st21nfca_tm_recv_atr_req()
526 struct st21nfca_atr_req *atr_req; in st21nfca_im_send_atr_req() local
546 atr_req = (struct st21nfca_atr_req *)skb->data; in st21nfca_im_send_atr_req()
547 memset(atr_req, 0, sizeof(struct st21nfca_atr_req)); in st21nfca_im_send_atr_req()
549 atr_req->cmd0 = ST21NFCA_NFCIP1_REQ; in st21nfca_im_send_atr_req()
550 atr_req->cmd1 = ST21NFCA_NFCIP1_ATR_REQ; in st21nfca_im_send_atr_req()
551 memset(atr_req->nfcid3, 0, NFC_NFCID3_MAXSIZE); in st21nfca_im_send_atr_req()
555 memcpy(atr_req->nfcid3, target->sensf_res, in st21nfca_im_send_atr_req()
558 get_random_bytes(atr_req->nfcid3, NFC_NFCID3_MAXSIZE); in st21nfca_im_send_atr_req()
560 atr_req->did = 0x0; in st21nfca_im_send_atr_req()
562 atr_req->bsi = 0x00; in st21nfca_im_send_atr_req()
563 atr_req->bri = 0x00; in st21nfca_im_send_atr_req()
564 atr_req->ppi = ST21NFCA_LR_BITS_PAYLOAD_SIZE_254B; in st21nfca_im_send_atr_req()
566 atr_req->ppi |= ST21NFCA_GB_BIT; in st21nfca_im_send_atr_req()
569 atr_req->length = sizeof(struct st21nfca_atr_req) + hdev->gb_len; in st21nfca_im_send_atr_req()
576 info->dep_info.bri = atr_req->bri; in st21nfca_im_send_atr_req()
577 info->dep_info.bsi = atr_req->bsi; in st21nfca_im_send_atr_req()
578 info->dep_info.lri = ST21NFCA_PP2LRI(atr_req->ppi); in st21nfca_im_send_atr_req()