|
@@ -227,7 +227,7 @@ static void nci_add_new_target(struct nci_dev *ndev,
|
|
|
|
|
|
for (i = 0; i < ndev->n_targets; i++) {
|
|
for (i = 0; i < ndev->n_targets; i++) {
|
|
target = &ndev->targets[i];
|
|
target = &ndev->targets[i];
|
|
- if (target->idx == ntf->rf_discovery_id) {
|
|
|
|
|
|
+ if (target->logical_idx == ntf->rf_discovery_id) {
|
|
/* This target already exists, add the new protocol */
|
|
/* This target already exists, add the new protocol */
|
|
nci_add_new_protocol(ndev, target, ntf->rf_protocol,
|
|
nci_add_new_protocol(ndev, target, ntf->rf_protocol,
|
|
ntf->rf_tech_and_mode,
|
|
ntf->rf_tech_and_mode,
|
|
@@ -248,10 +248,10 @@ static void nci_add_new_target(struct nci_dev *ndev,
|
|
ntf->rf_tech_and_mode,
|
|
ntf->rf_tech_and_mode,
|
|
&ntf->rf_tech_specific_params);
|
|
&ntf->rf_tech_specific_params);
|
|
if (!rc) {
|
|
if (!rc) {
|
|
- target->idx = ntf->rf_discovery_id;
|
|
|
|
|
|
+ target->logical_idx = ntf->rf_discovery_id;
|
|
ndev->n_targets++;
|
|
ndev->n_targets++;
|
|
|
|
|
|
- pr_debug("target_idx %d, n_targets %d\n", target->idx,
|
|
|
|
|
|
+ pr_debug("logical idx %d, n_targets %d\n", target->logical_idx,
|
|
ndev->n_targets);
|
|
ndev->n_targets);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -372,10 +372,11 @@ static void nci_target_auto_activated(struct nci_dev *ndev,
|
|
if (rc)
|
|
if (rc)
|
|
return;
|
|
return;
|
|
|
|
|
|
- target->idx = ntf->rf_discovery_id;
|
|
|
|
|
|
+ target->logical_idx = ntf->rf_discovery_id;
|
|
ndev->n_targets++;
|
|
ndev->n_targets++;
|
|
|
|
|
|
- pr_debug("target_idx %d, n_targets %d\n", target->idx, ndev->n_targets);
|
|
|
|
|
|
+ pr_debug("logical idx %d, n_targets %d\n",
|
|
|
|
+ target->logical_idx, ndev->n_targets);
|
|
|
|
|
|
nfc_targets_found(ndev->nfc_dev, ndev->targets, ndev->n_targets);
|
|
nfc_targets_found(ndev->nfc_dev, ndev->targets, ndev->n_targets);
|
|
}
|
|
}
|