summaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/core.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-04-10 19:43:09 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 15:10:37 -0400
commitc4fbb6515a4dcec83d340247639b5644c4745528 (patch)
tree9123c1e0b56ea1f9910ce4db1e9046bd5a8a29c4 /net/nfc/nci/core.c
parent0efbf7fb308d0c6f8419922850a2d0b45d4d4401 (diff)
downloadblackbird-op-linux-c4fbb6515a4dcec83d340247639b5644c4745528.tar.gz
blackbird-op-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 'net/nfc/nci/core.c')
-rw-r--r--net/nfc/nci/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 9ec065bb9ee1..8737c2089fdd 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -477,7 +477,7 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, __u32 target_idx,
}
if (atomic_read(&ndev->state) == NCI_W4_HOST_SELECT) {
- param.rf_discovery_id = target->idx;
+ param.rf_discovery_id = target->logical_idx;
if (protocol == NFC_PROTO_JEWEL)
param.rf_protocol = NCI_RF_PROTOCOL_T1T;
OpenPOWER on IntegriCloud