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
205 atr_req = (struct st21nfca_atr_req *)skb->data; in st21nfca_tm_recv_atr_req()
207 if (atr_req->length < sizeof(struct st21nfca_atr_req)) in st21nfca_tm_recv_atr_req()
210 r = st21nfca_tm_send_atr_res(hdev, atr_req); in st21nfca_tm_recv_atr_req()
217 NFC_COMM_PASSIVE, atr_req->gbi, gb_len); in st21nfca_tm_recv_atr_req()
495 struct st21nfca_atr_req *atr_req; in st21nfca_im_send_atr_req() local
515 atr_req = (struct st21nfca_atr_req *)skb->data; in st21nfca_im_send_atr_req()
516 memset(atr_req, 0, sizeof(struct st21nfca_atr_req)); in st21nfca_im_send_atr_req()
518 atr_req->cmd0 = ST21NFCA_NFCIP1_REQ; in st21nfca_im_send_atr_req()
519 atr_req->cmd1 = ST21NFCA_NFCIP1_ATR_REQ; in st21nfca_im_send_atr_req()
520 memset(atr_req->nfcid3, 0, NFC_NFCID3_MAXSIZE); in st21nfca_im_send_atr_req()
524 memcpy(atr_req->nfcid3, target->sensf_res, in st21nfca_im_send_atr_req()
527 get_random_bytes(atr_req->nfcid3, NFC_NFCID3_MAXSIZE); in st21nfca_im_send_atr_req()
529 atr_req->did = 0x0; in st21nfca_im_send_atr_req()
531 atr_req->bsi = 0x00; in st21nfca_im_send_atr_req()
532 atr_req->bri = 0x00; in st21nfca_im_send_atr_req()
533 atr_req->ppi = ST21NFCA_LR_BITS_PAYLOAD_SIZE_254B; in st21nfca_im_send_atr_req()
535 atr_req->ppi |= ST21NFCA_GB_BIT; in st21nfca_im_send_atr_req()
538 atr_req->length = sizeof(struct st21nfca_atr_req) + hdev->gb_len; in st21nfca_im_send_atr_req()
545 info->dep_info.bri = atr_req->bri; in st21nfca_im_send_atr_req()
546 info->dep_info.bsi = atr_req->bsi; in st21nfca_im_send_atr_req()
547 info->dep_info.lri = ST21NFCA_PP2LRI(atr_req->ppi); in st21nfca_im_send_atr_req()