aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/ntf.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/nci/ntf.c')
-rw-r--r--net/nfc/nci/ntf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index 2e3dee42196d..99e1632e6aac 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -227,7 +227,7 @@ static void nci_add_new_target(struct nci_dev *ndev,
227 227
228 for (i = 0; i < ndev->n_targets; i++) { 228 for (i = 0; i < ndev->n_targets; i++) {
229 target = &ndev->targets[i]; 229 target = &ndev->targets[i];
230 if (target->idx == ntf->rf_discovery_id) { 230 if (target->logical_idx == ntf->rf_discovery_id) {
231 /* This target already exists, add the new protocol */ 231 /* This target already exists, add the new protocol */
232 nci_add_new_protocol(ndev, target, ntf->rf_protocol, 232 nci_add_new_protocol(ndev, target, ntf->rf_protocol,
233 ntf->rf_tech_and_mode, 233 ntf->rf_tech_and_mode,
@@ -248,10 +248,10 @@ static void nci_add_new_target(struct nci_dev *ndev,
248 ntf->rf_tech_and_mode, 248 ntf->rf_tech_and_mode,
249 &ntf->rf_tech_specific_params); 249 &ntf->rf_tech_specific_params);
250 if (!rc) { 250 if (!rc) {
251 target->idx = ntf->rf_discovery_id; 251 target->logical_idx = ntf->rf_discovery_id;
252 ndev->n_targets++; 252 ndev->n_targets++;
253 253
254 pr_debug("target_idx %d, n_targets %d\n", target->idx, 254 pr_debug("logical idx %d, n_targets %d\n", target->logical_idx,
255 ndev->n_targets); 255 ndev->n_targets);
256 } 256 }
257} 257}
@@ -372,10 +372,11 @@ static void nci_target_auto_activated(struct nci_dev *ndev,
372 if (rc) 372 if (rc)
373 return; 373 return;
374 374
375 target->idx = ntf->rf_discovery_id; 375 target->logical_idx = ntf->rf_discovery_id;
376 ndev->n_targets++; 376 ndev->n_targets++;
377 377
378 pr_debug("target_idx %d, n_targets %d\n", target->idx, ndev->n_targets); 378 pr_debug("logical idx %d, n_targets %d\n",
379 target->logical_idx, ndev->n_targets);
379 380
380 nfc_targets_found(ndev->nfc_dev, ndev->targets, ndev->n_targets); 381 nfc_targets_found(ndev->nfc_dev, ndev->targets, ndev->n_targets);
381} 382}