Lines Matching refs:atr_req
141 struct st21nfca_atr_req *atr_req) in st21nfca_tm_send_atr_res() argument
149 gb_len = atr_req->length - sizeof(struct st21nfca_atr_req); in st21nfca_tm_send_atr_res()
150 skb = alloc_skb(atr_req->length + 1, GFP_KERNEL); in st21nfca_tm_send_atr_res()
159 atr_res->length = atr_req->length + 1; in st21nfca_tm_send_atr_res()
163 memcpy(atr_res->nfcid3, atr_req->nfcid3, 6); in st21nfca_tm_send_atr_res()
173 memcpy(atr_res->gbi, atr_req->gbi, gb_len); in st21nfca_tm_send_atr_res()
193 struct st21nfca_atr_req *atr_req; in st21nfca_tm_recv_atr_req() local
209 atr_req = (struct st21nfca_atr_req *)skb->data; in st21nfca_tm_recv_atr_req()
211 if (atr_req->length < sizeof(struct st21nfca_atr_req)) { in st21nfca_tm_recv_atr_req()
216 r = st21nfca_tm_send_atr_res(hdev, atr_req); in st21nfca_tm_recv_atr_req()
223 NFC_COMM_PASSIVE, atr_req->gbi, gb_len); in st21nfca_tm_recv_atr_req()
518 struct st21nfca_atr_req *atr_req; in st21nfca_im_send_atr_req() local
538 atr_req = (struct st21nfca_atr_req *)skb->data; in st21nfca_im_send_atr_req()
539 memset(atr_req, 0, sizeof(struct st21nfca_atr_req)); in st21nfca_im_send_atr_req()
541 atr_req->cmd0 = ST21NFCA_NFCIP1_REQ; in st21nfca_im_send_atr_req()
542 atr_req->cmd1 = ST21NFCA_NFCIP1_ATR_REQ; in st21nfca_im_send_atr_req()
543 memset(atr_req->nfcid3, 0, NFC_NFCID3_MAXSIZE); in st21nfca_im_send_atr_req()
547 memcpy(atr_req->nfcid3, target->sensf_res, in st21nfca_im_send_atr_req()
550 get_random_bytes(atr_req->nfcid3, NFC_NFCID3_MAXSIZE); in st21nfca_im_send_atr_req()
552 atr_req->did = 0x0; in st21nfca_im_send_atr_req()
554 atr_req->bsi = 0x00; in st21nfca_im_send_atr_req()
555 atr_req->bri = 0x00; in st21nfca_im_send_atr_req()
556 atr_req->ppi = ST21NFCA_LR_BITS_PAYLOAD_SIZE_254B; in st21nfca_im_send_atr_req()
558 atr_req->ppi |= ST21NFCA_GB_BIT; in st21nfca_im_send_atr_req()
561 atr_req->length = sizeof(struct st21nfca_atr_req) + hdev->gb_len; in st21nfca_im_send_atr_req()
568 info->dep_info.bri = atr_req->bri; in st21nfca_im_send_atr_req()
569 info->dep_info.bsi = atr_req->bsi; in st21nfca_im_send_atr_req()
570 info->dep_info.lri = ST21NFCA_PP2LRI(atr_req->ppi); in st21nfca_im_send_atr_req()