diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-04-10 19:43:09 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-12 21:10:37 +0200 |
commit | c4fbb6515a4dcec83d340247639b5644c4745528 (patch) | |
tree | 9123c1e0b56ea1f9910ce4db1e9046bd5a8a29c4 /include/net/nfc/nfc.h | |
parent | NFC: Add HCI documentation (diff) | |
download | linux-c4fbb6515a4dcec83d340247639b5644c4745528.tar.xz linux-c4fbb6515a4dcec83d340247639b5644c4745528.zip |
NFC: The core part should generate the target index
The target index can be used by userspace to uniquely identify a target
and thus should be kept unique, per NFC adapter. Moreover, some protocols
do not provide a logical index when discovering new targets, so we have to
generate one for them.
For NCI or pn533 to fetch their logical index, we added a logical_idx field
to the target structure.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/nfc/nfc.h')
-rw-r--r-- | include/net/nfc/nfc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/nfc/nfc.h b/include/net/nfc/nfc.h index 431a6c59b418..45f05634315b 100644 --- a/include/net/nfc/nfc.h +++ b/include/net/nfc/nfc.h @@ -79,6 +79,7 @@ struct nfc_target { u8 sensf_res_len; u8 sensf_res[NFC_SENSF_RES_MAXSIZE]; u8 hci_reader_gate; + u8 logical_idx; }; struct nfc_genl_data { @@ -88,6 +89,7 @@ struct nfc_genl_data { struct nfc_dev { unsigned idx; + unsigned target_idx; struct nfc_target *targets; int n_targets; int targets_generation; |