Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315633
b: refs/heads/master
c: 81b3039
h: refs/heads/master
i:
  315631: 3ce6f21
v: v3
  • Loading branch information
Eric Lapuyade authored and John W. Linville committed Jul 12, 2012
1 parent 5302972 commit 95e1512
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe020120cb863ba918c6d603345342a880272c4d
refs/heads/master: 81b3039557faf1359f40494003aaade745de6c24
15 changes: 15 additions & 0 deletions trunk/net/nfc/hci/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
struct nfc_target *targets;
struct sk_buff *atqa_skb = NULL;
struct sk_buff *sak_skb = NULL;
struct sk_buff *uid_skb = NULL;
int r;

pr_debug("from gate %d\n", gate);
Expand Down Expand Up @@ -205,6 +206,19 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
targets->sens_res = be16_to_cpu(*(u16 *)atqa_skb->data);
targets->sel_res = sak_skb->data[0];

r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE,
NFC_HCI_RF_READER_A_UID, &uid_skb);
if (r < 0)
goto exit;

if (uid_skb->len == 0 || uid_skb->len > NFC_NFCID1_MAXSIZE) {
r = -EPROTO;
goto exit;
}

memcpy(targets->nfcid1, uid_skb->data, uid_skb->len);
targets->nfcid1_len = uid_skb->len;

if (hdev->ops->complete_target_discovered) {
r = hdev->ops->complete_target_discovered(hdev, gate,
targets);
Expand Down Expand Up @@ -240,6 +254,7 @@ static int nfc_hci_target_discovered(struct nfc_hci_dev *hdev, u8 gate)
kfree(targets);
kfree_skb(atqa_skb);
kfree_skb(sak_skb);
kfree_skb(uid_skb);

return r;
}
Expand Down

0 comments on commit 95e1512

Please sign in to comment.